cancel
Showing results for 
Search instead for 
Did you mean: 

USART: need CLOCK ticking all the time

arro239
Associate III
Posted on December 08, 2012 at 04:37

The device I am trying to connect to via serial interface requires constant clock ticking. I have enabled USART clock with

    USART_ClockInitTypeDef USART_ClockInitStructure;

    USART_ClockStructInit(&USART_ClockInitStructure);

    USART_ClockInitStructure.USART_Clock = USART_Clock_Enable;

    USART_ClockInit(USART2, &USART_ClockInitStructure);

but it seems to be ticking only while transmitting data. Is it possible to have this clock ticking constantly? I do not see any related fields in USART_ClockInitTypeDef

#usart
3 REPLIES 3
Posted on December 08, 2012 at 14:26

Not really.

Does this clock need to be synchronous to the serial signal? If not just use one of the timers to generate a continuous clock.
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
arro239
Associate III
Posted on December 08, 2012 at 18:00

Wow :(

I have already implemented this via a timer but I was hoping this would only be an intermediate solution :( And the timer is obviously not in sync with the usart. While the chip does respond even like this is not cool, who knows if the chip will read control messages correctly all the time :( I guess I will implement TX via another timer channel to have them synched.

Different question while we are on the subject of times - is it possible to have an output channel and an input/capture channel configured on the same timer? I have spend some time trying to merge PWM_Input and PWM_Outout std examples to no avail.

Posted on December 09, 2012 at 00:22

Would SPI or I2S be a more suitable peripheral choice?

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..