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.

TMS320F280039C: Maximum SCI Baud rates

Part Number: TMS320F280039C
Other Parts Discussed in Thread: LAUNCHXL-F280039C, SYSCONFIG

Tool/software:

Hi,

I am using a LAUNCHXL-F280039C. I want to test which maximum baud rate works for my application.

I have set the low speed clock divider to 1 (LSPCLK = 120MHz). It works for a baud rate of 3.75 MBaud (BRR = 3). However, if I now want to set a baud rate of 5 MBaud (BRR = 2) via SysConfig, the following error occurs:

Enter an integer for baud rates between LSPCLK/65536 and LSPCLK/16!

But this condition is actually fulfilled for an LSPCLK of 120 MHz, isn't it? What is the reason for this? Is a baud rate greater than 3.75 MBaud even possible for the hardware?

For setting the higher baud rate, I have adjusted the macro to:

#define DEVICE_LSPCLK_FREQ          (DEVICE_SYSCLK_FREQ / 1)

and the function to:

SysCtl_setLowSpeedClock(SYSCTL_LSPCLK_PRESCALE_1);

Thank you and best regards

Joshua

  • Hi Joshua,

    I will get back to you with a response tomorrow.

    Best Regards,

    Delaney 

  • Hi Delaney,

    thanks. I'm looking forward to your answer.

    Best Regards,

    Joshua

  • Hi Joshua,

    I apologize for the delay. 

    You are correct, the maximum baud rate for the SCI module on this device with a 120MHz LSPCLK set is 7.5 Mbps, so a 5Mbps baud rate is possible.

    The Sysconfig error calculations you are seeing use the clock divider set by the clock tree tool in Sysconfig, which is defaulted to /2. The clock tree tool will generate its own defines for DEVICE_SYSCLK_FREQ and DEVICE_LSPCLK_FREQ and if Device Support in Sysconfig is enabled, it will use these defines to set the clock divider values. So even if you are setting the LSPCLK to use a certain divider manually in your code (which will correctly change the LSPCLK frequency), Sysconfig won't recognize this unless you set the divider in the clock tree tool as well. 

    In order to get rid of this error in Sysconfig, you can set the divider in the clock tree tool to match. The steps to change the divider are shown in the screenshots below: 

    Let me know if this fixes the issue.

    Best Regards,

    Delaney

  • Hi Delaney,

    thank you for your reply.

    I will test it tomorrow when I am back in office. But I am positive that this will resolve my issue.

    Best Regards,

    Joshua

  • Hi Joshua,

    Sounds good, I will close this thread for now but please upvote my previous response if it fixes the issue. If not, feel free to open another thread and I will try to provide further guidance.

    Best Regards,

    Delaney