UART Problems on STM32F103C8T6
Hi Community
I could use some help regarding UART on the "Bluepill" board so I can get my night sleep back again
I'm working on a small project where I'm creating some interrupt driven bit frames on 16 outputs. Each frame is 16mSec long and consists of a 4.3mS start bit followed by 16 data-bits.each with a fixed 310uS low period, a fixed 155uS high period and the last part of each bit it 155us and is low or high dependent on the set value
So far so good, this part is working very stable and reliable
Then I need to receive commands on the UART and use these commands to set the bits in the frames, but I have big problems receiving these commands via the UART.
The problem is that sending eg. abc and then cr to the UART is given me aabbbccc\0 in the Command buffer
As a test, looping the received byte back directly in the interrupt handler is given me ee when I send a single e to the UART port. Same for all chars.....I get 2 chars back
What am I missing or what am I doing wrong?
My understanding is that reading the USART1 DR register resets the interrupt.
Why do I get double number of chars and numbers both in the test-loopback but also in the created command-buffer?
