2017-11-29 01:16 AM
Hello,
I am interested in the the STM32L063C8. In my application I will be using an USART in synchronous mode and there are some things about the clock signal that I do not understand. In the reference manual RM0367 the note on page 774 says:
'The CK pin works in conjunction with the TX pin. Thus, the clock is provided only if the transmitter is enabled (TE=1) and data is being transmitted (the data register USART_TDR written). This means that it is not possible to receive synchronous data without transmitting data.'
Does this mean, that there are no clock pulses on the CK pin, when there is no outgoing data transmission? How does the receiver send data, when the clock is out after the master has finished transmitting? According to this manual, during the Idle state, preamble and send break, the external CK clock is not activated (page 773). My application requires a constant clock, even when no data is being sent to the receiver. Is this possible with this controller? In my previous experience with USART there was always a clock signal on the line after the transmitter has been enabled. Could someone explain the behaviour of the clock during a simple transaction, e.g. master sends some bytes, receiver responds, then a short pause and another data transmission?
Thanks!
2017-11-29 08:27 AM
It probably has the least useful implementation possible...
Perhaps the SPI peripheral can be used in a more continuous and synchronous fashion.
Are you using some existing chips/protocols currently?
2017-11-30 01:45 AM
From your reply I assume that there is no clock on the line when the master is not transmitting. How does the recieving end respond, when the clock is not always present? I am planning on using the peripheral in single-wire half-duplex mode. Currently I use an AVR chip (which does not have half-duplex) with TX and RX connected to each other. Is it possible to use the SPI in a similar manner?
2018-07-13 07:26 AM
Just send a dummy byte(such as 0x00/0xff) to the slave.