Page 1 of 1

Another technical question about controlling the RMT device

Posted: Tue Dec 24, 2019 4:17 pm
by szguyer
I'm wondering if anyone out there can answer a fairly low-level question about the RMT device (in TX mode):

I have the hardware/software set up to generate an interrupt after a certain number of RMT items have been sent. In the interrupt handler, I refill the RMT memory buffer with the next sequence of items. My question is how and when does the RMT device know to continue processing the items after the interrupt is invoked? Does it wait until the interrupt handler returns (and how does that work)? Or does it just continue sending items even as the interrupt handler runs?

Thanks to all the amazing experts on this forum!

Re: Another technical question about controlling the RMT device

Posted: Tue Dec 24, 2019 9:30 pm
by WiFive
Or does it just continue sending items even as the interrupt handler runs?
Yes

Re: Another technical question about controlling the RMT device

Posted: Tue Dec 24, 2019 9:43 pm
by szguyer
Ok, so if the interrupt handler is refilling the buffer it needs to do it very quickly or there could be a race condition between the software writing RMT values and the hardware reading them.

Do you have a reference for this information? I'd like to be able to read more.

Thanks!

Re: Another technical question about controlling the RMT device

Posted: Wed Dec 25, 2019 3:59 am
by szguyer
Never mind. I reread the hardware spec, and now I think I understand.