Hola. I'd like to use the age-old trick of using a software interrupt to kick off USART data transmission.
It's the usual sort of thing. I have a software FIFO (not the USART's built-in FIFO, and not the ring buffer that is part of the USART driver) that holds data packets to transmit, and I have a flag indicating whether the transmitter is busy sending anything.
The only place where this FIFO is popped is in the USART's ISR as triggered by a transmit-complete interrupt. In that ISR, I check to see if the FIFO has any packets to send. If so, the packet is popped and written to the transmitter, and the transmit-busy flag is set. If not, then the transmit-busy flag is cleared and nothing new is sent.
Outside of the interrupt context, after a new packet is pushed to the FIFO, that routine checks to see if the transmitter is busy. If not, then it should trigger the USART's transmit-done interrupt to kick off the transmission. If the transmitter is already busy, then that doesn't happen as eventually there will be a TX-done interrupt which will pop the FIFO.
I don't see any obvious way to assert a software interrupt in the MCUXpresso SDK. Is such a function/feature buried elsewhere?
Thanks!