STM8S103 UART1 latency issue (delay between event and interrupt execution)
Hi, I bought me some mini mp3/wav players frome china. Serial communication is executed at a fixed baudrate of 9600baud. Messages to and from the unit do both have a size of 10 bytes. Transmitting serial messages works perfect. Receiving messages do not work. I use the UART1 RX interrupt vector 18 which is executed if the receive data byte buffer (UART_DR) is not-empty. I put a PC3 pin-toggle in the receive interrupt handler after the data (UART_DR) register is read. On my logic analyser I see that the pin toggle takes more time per received byte. I measure the time between the end of the first received STOP bit and the PC3 toggle being 354us which to my opinion is awfully long... With each received byte the time between de end of the STOP bit and a PC3 toggle increases. At byte 6 it is 870us and then PC3 starts oscillating (9us) as if the data (UART_DR) register is not read anymore and contains an unread value. I disabled all other interrupts. What could be going on?
