This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LS3137: SCI/LIN interface configuration changes

Part Number: TMS570LS3137
Other Parts Discussed in Thread: HALCOGEN

Hello,

I am using TMS570LS3137 micro-controller SCI/LIN interface configured as SCI for our communications. I have below questions related to the configuration:

1. Do you have sample code for Receiving data in polling mode?

2. Is it possible to change the communication parameters like Baudrate, Loopback enable, Parity, data format, Number of start bits, number of stop bits after its initial configuration??

3. If the answer for question#2 is Yes, can you please share the procedure?

Thanks for your support.

Regards,

Kalyan

  • Hello,
    If SCI RX interrupt is not enabled then sciReceive function from sci.c will receive data using polling method.
    Yes, you can change sci configuration after initial setup.
    In chapter 27.5 of device TRM is described how to perform SCI configuration. Some settings can be changed with APIs generated in sci.c by HALCoGen.

    Best regards,
    Miro
  • Hi Miro,

    Thanks for your response.

    I see below listed APIs generated in sci.c by HALCoGen:
    sciSetBaudrate
    sciEnableLoopback
    sciDisableLoopback

    But i don't see any APIs related to parity configuration, Data format etc. does it mean that SCI configuration cannot be changed for these communication parameters after initial setup?

    Thanks,
    Kalyan
  • Hello,
    As described in Section 27.5 SCI Configurations, writing SCIGCR1 (Section 27.7.2) with appropriate values will set parity, number of stop bits and some other configurations. In SCIFROMAT (Section 27.7.10) register you could set Character length.
    There are no HALCoGen generated APIs for all settings. You could write your own.


    Best regards,
    Miro