How to use UART with flow control and synchronous clock

Hi Rulz

I working PK-S5D9 with SSP 1.5.0 and I want to use UART with flow control and input synchronous clock.

I found the sample project "an-r11an0085eu0101-synergy-sci-uart-hal-mod-guide" which had documents and example.

I follow the tip and the flow control is works fine, but the document did not mention how to use synchronous clock UART.

In my application the reception UART data with a clock, and with the clock change, the reception will change UART baud-rate in runtime.

Does SSP support clock synchronous mode, if supported, please give me the sample code or document.

thank you for your time for reading my poor english post

  • Hi Black-
    Will the baudSet API call help you change your baud rate? Do you need to change the clock source too or just the baud rate?

    Warren

  • In reply to WarrenM:

    The SCI peripheral can use an external clock when in Asynchronous mode. The External clock must be x8 or X16 the required bit rate :-

    This can be configured in the properties of the UART HAL driver :-

  • In reply to WarrenM:

    Hi WarrenM
    thanks for your reply, In my case, I need to change the baud rate in runtime base on the external clock, for example, the baud rate is 9600 at begin, but it will change to 115200 or another baud rate at runtime.

    the picture as below show the actual circuit wiring, and it also needs CTS/RTS to flow control( it did not show in the picture).

    Black.

  • In reply to Jeremy:

    Hi Jeremy 

    Thanks for your reply.

    In fact, I tried this configure.

    But it didn't work. 

    I found S5D9 user manual it did not mention about external clock x8 bit rate.

    thanks for your tip. 

    is it means if I want to use UART on 9600 baud, I need input clock (9600 * 8) to SCK pin? 

    Did I need to change baud rate on SSC? (Maybe 9600/8?)

    I studied S5D9 user manual and found "34.5 Operation in Clock Synchronous Mode", It illustrates how the register work in clock synchronous mode.

    And in "34.5.4 Serial Data Transmission in Clock Synchronous Mode" show how it works with synchronous clock and CTS/RTS.

    But I don't know how to achieve synchronous clock mode through SSP, I can't find and example or post.

    If there are any example or suggest I will appreciate it very much. 

    Black

  • In reply to black:

    Are you trying to achieve Asynchronous communications (UART) with an external baudrate clock , or Clock Synchronous communication with an external clock source?
  • In reply to Jeremy:

    Hi Jeremy

    Sorry for my terrible description.

    I search for some information about my application.

    It more like USART.

    please see this post's part of USART "https://embedded.fm/blog/2016/11/29/discovery-uarts-part-1", I think it's better than my description.

    Can synergy achieve USART?

  • In reply to black:

    The SCI peripheral on Synergy devices can operate in Asynchronous mode with external clock input into the Synergy device (x8 or x16 the baudrate), and the SSP supports this mode of operation. The USART would appear to be transmitting data in Asynchronous format, with a clock running at the baudrate.
  • In reply to Jeremy:

    Hi Jeremy 

    Thanks for your reply.

    In the post, It mentions

    "Instead of having a prearranged baud rate, one of the two devices can send out a clock signal, a square wave at the baud frequency. This clock signal is used to synchronize the two devices, getting rid of the need for the devices to have precise baud clocks."

    and USART it also provides flow control.

    I think that is what I need.

    In Synergy UART mode, I can configure the external clock 8x/16x clock to SCK pin, but it looks like a clock source to UART module, not the baud frequency.

    The principle of action more like SPI with flow control.

    Is there any way to achieve that on synergy?