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.

Parents
  • Where should I start. I know. You write about if I use a TX ring buffer like there is only one solution. Well there isn't. See. Your implementation might work in a way that you are not fond of, but other implementations are likely to be different (aka better). You don't even give the slightest detail of the implementation you're using or where you (obviously) copied it from.

    I will not waste any more time on you. Goodbye.

Reply
  • Where should I start. I know. You write about if I use a TX ring buffer like there is only one solution. Well there isn't. See. Your implementation might work in a way that you are not fond of, but other implementations are likely to be different (aka better). You don't even give the slightest detail of the implementation you're using or where you (obviously) copied it from.

    I will not waste any more time on you. Goodbye.

Children