2021-08-11 06:27 AM
I have Timer 2 interrupt and an UART 4 interrupt for reading from a GPS module. But they don't work with each other. When I disable Timer 2 interrupt UART 4 interrupt starts to work.
I did set Timer 2 interrupt preemption priority to 1 and UART 4 interrupt preemption priority to 0. And nothing changed.
If I understood it correctly it looks like Timer interrupt is so fast and distrupts the UART interrupt. But again If I understood it correctly with preemption priority settings software shouldn't call Timer interrupt when in UART interrupt because UART interrupt has a priority. What I'm doing wrong in here? Thank you for reading.
Solved! Go to Solution.
2021-08-11 06:34 AM
The MCU won't interrupt a higher priority interrupt in order to service a lower priority one. There has to be a bug somewhere.
2021-08-11 06:34 AM
The MCU won't interrupt a higher priority interrupt in order to service a lower priority one. There has to be a bug somewhere.
2021-08-13 03:34 PM
You're right it turned out my problem wasn't about priority. It turned out I wasn't able to give enough current to my circuit via USB connection. When I connected a external battery it worked.