Use of UART Driver on STM32F3 Disco
Posted: Tue Oct 18, 2016 10:41 pm
Hi all,
i actually got a strange problem with a quite simple uart implementation.
i start the uart driver with CR3 HDSEL set, for half duplex. Then i dont call any api after start. I only wait for the rxchar callback, the driver is in receive idle state. I want to receive a two byte request an set a signal to the thread. So far so simple.
For the test i receive two bytes 0x7F and 0xCF every 800ms and with 4ms between the two bytes. But the rxchar callback is only called with 0x7f if i stop the mcu right in the callback an read RDR register i see the 0xCf, but the callback gets never called with that value only with the first one.
I am sure i miss something or use the driver wrong, but i have no clue where my error is?
any thoughts on this ?
regards
Tec
i actually got a strange problem with a quite simple uart implementation.
i start the uart driver with CR3 HDSEL set, for half duplex. Then i dont call any api after start. I only wait for the rxchar callback, the driver is in receive idle state. I want to receive a two byte request an set a signal to the thread. So far so simple.
For the test i receive two bytes 0x7F and 0xCF every 800ms and with 4ms between the two bytes. But the rxchar callback is only called with 0x7f if i stop the mcu right in the callback an read RDR register i see the 0xCf, but the callback gets never called with that value only with the first one.
I am sure i miss something or use the driver wrong, but i have no clue where my error is?
any thoughts on this ?
regards
Tec