This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using a ring buffer to transmit

Using a LPC2400/LPC17xx family of microcontrollers, if I use a TX ring buffer, I think there is a risk of the THRE interrupt to come so quickly that the hardware TX buffer is emptied before any task can post data in the ring buffer - terminating the transmission. I solved this by checking in application (not ISR) whether there is a pending IRQ and starting a new transmission if there is data to send without a pending interrupt.
I am not fond of this. Any thought would be appreciated.