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.

TMS470M HDK

Other Parts Discussed in Thread: HALCOGEN

Hi,

I have one question.  

Our customer is trying to use UART with the following setting on HDK.

115.2Kbps, 8bit, Even Parity, 1 stop, system clock of the HDK board is 80Mhz, external oscillator is 16MHz 

Can UART communication work with the above setting? If HDK board can work well,  please let me know how is setting of the board.

Quick reply is very helpful for us. Customer hope to get the answer on tomorrow.

Best regards,

Michi

 

  • Hello Michi,

    The UART on the 470M product should be capable of supporting the parameters you list in your post. The baude rate and UART parameters are set up within the SCI/LIN registers of the MCU by using the SCI/LIN in the SCI mode. See section 18.6 of the SPNU495B.pdf for guidance on how to configure the IP in SCI mode with the proper buade rate and message configuration. Sections 18.3 and 18.4 describe the relavent information regarding the operation of the SCI/LIN module in SCI mode.

    Please let me know if the information you are looking for is not contained within these sections or if there is a need for futher support.

     

  • Dear Chuck-san,

    Thank you for your quick reply.

    Do you have some sample code for UART communication that can work with HDK EVM board?

    TMS470M HDK is included some demo code. But it seems UART I/F is not used on the demo.  After I installed TMS470 CD to my PC, I found  an icon "Demo COM support". But this application does not run in my PC.  What is "Demo COM support"?

    Also I found other sample code in the below web site.

    >http://processors.wiki.ti.com/images/6/67/TMS470M_HDK_Demo.zip

    Does this  demo code work with HDK board? 

    Please let me know.

    Best regards,

    Michi

  • Hello Michi-san,

    The safety demo that comes with the HDK and the USB development stick both use SCI to communicate between the development boards and the PC. The TMS470M_HDK_Demo.zip also has SCI code included. Please have a look at these to see if they will meet your needs.

    I would also suggest usng HalCoGen to setup and generate some SCI code. There is an example in the Help section of the tool that walks through creation of some SCI/UART code. The example is specific to the 470M and sets up the UART for 9600bps. Also, please note that the baud rate generation will have some inaccuracy to your desired baud rate of 115.2kbps due to the resolution of the prescaler. The closest baude rate using the standard prescalar is approx 116.3kbps. To achieve more exact baude rates, there are register to fine tune this baude rate using superfractional dividers.

    Please let me know if this helps.

  • Chuck-san,

    Thank you for your advice.

    Your HalCoGen information is very helpful for me. I will try to test it.

    By the way, I have one more question.

    At first, I asked whether HDK board can work with the below setting or not.

    115.2Kbps, 8bit, Even Parity, 1 stop, system clock of the HDK board is 80Mhz, external oscillator is 16MHz 

    Our customer would like to use the UART communication with this setting on their production board.

    Do you know there are some customers that use the UART communication with the above settings on their production board?

    Our customer is worried aobut the results. If some customer already works UART with its setting, its information ease our customer mind.

    Best regards,

    Michi 

  • Hello Michi-san,

    I hve checked with several engineers in the Hercules development team and several have used the same IP with similar settings as you describe. However, this IP was on different devices with different HCLK and VCLK frequencies. Below are some of the settings that have been used successfully:

    Using the TMS570LS31xx, 90MHz VCLK, 8 data bits, no parity, 2 stop bits, 115.2kpbs

    Using  TMS570LS12xx, 96MHz VCLK, 8 data bits, no parity, 2 stop bits, 115.2kpbs

    For 80MHz HCLK/80MHz VCLK, the closest baud rate that can be achieved to 115.2kbps is 116.3kbps using only the main prescalar for baud rate generation. Given UART is specified to absorb around 4% error in the baud rate, this setting should work fine given this represents an error of approximately 1.5%.

    If a more exact baude rate needs to be achieved, then the fractional divider can be calculated and programmed in the baud register along with the main prescale divider.

  • Hello Michi-san,

    Did the information provided answer your questions? If so, please verify the suggested answers so we may close the thread.