2019-10-15 10:41 AM
I am currently working with UART in DMA mode for CLI implimentation. I would like to do some string parsing as part of the HAL_UART_RxCpltCallback.
Is this callback running in IRQ context or outside of IRQ context ? Is this the correct place for post processing IRQ data ? What would you recommend ?
Solved! Go to Solution.
2019-10-15 10:57 AM
That runs from within an IRQ. As for if that’s the right place to process data or not, it really depends on how long processing takes. If it’s heavy, transfer data, set a flag and do it in the main thread. Otherwise, in the IRQ is fine.
2019-10-15 10:57 AM
That runs from within an IRQ. As for if that’s the right place to process data or not, it really depends on how long processing takes. If it’s heavy, transfer data, set a flag and do it in the main thread. Otherwise, in the IRQ is fine.
2019-10-15 11:00 AM
the processing is basically string compares to about 2 dozen commands and tokenizing command and arguement.
2019-10-15 11:02 AM
String compares are quick. Try it in the irq and if you get overrun issues you’ll have to do something else.
2019-10-15 11:05 AM
The HAL interrupt callbacks run in IRQ context. Not a good place for lengthy processing.
-- pa