Hi there,
I am using USART on atmega128 with BR 9600 and buffersize 64. I use RX isr and there is a 10ms wait in this isr.when i send data of 10 byte and resend it from micro to pc..it can be seen that there is a loss always in certain position. for e.g. by sending 0 1 2 3 4 5 6 7 8, I receive 0 1 2 3 4 5 7...
that makes me mad...pls help...tnx
If this is a busy wait without the possibility to receive new UART data, then it is quite obvious.
Sending a single byte with 9600 baut will need 10s/9600 = 1.04ms.
Why is it waiting? Within the OSR it makes no sense.
Ther should be another function to read received data from the buffer. Here a 10ms timeout in case of empty buffer may makes sense - as long as it is interruptable by the receive_ISR.