Closed TuringTW closed 2 years ago
Hi @TuringTW
Normally, when using Timer Interrupt, you've possessed a better knowledge about hardware, core, etc.
You must be aware of the duplication, priority, etc. of Interrupt Then UART messages must not have enough priority, or the system will crash.
Check your code, read the core code to know what wrong with the UART. BTW, Portenta_H7 core is still new and possibly have many issues, especially with using multicore M7/M4, if you don't have enough experience.
If you still can't solve the problem, post an issue on Arduino mbed_portenta.
I'm closing this now as this certainly has nothing to do with TimerInterrupt.
I see. Thanks for the reply
Describe the bug
I use the M7 core for the UART reading and the M4 core for the timer interrupt. I found the UART message screw up when the timer interrupt was enabled in the M4 core.
Steps to Reproduce
The following two example codes can reproduce the problem.
The message is from my GPS module, but I think the UART source can be replaced by anything else. When the timer interrupt is enabled, the UART message screw up, while it works fine when the timer interrupt is disabled.
I also try to remove all of the actions in the interrupt function. But the result is the same. I suspect the UART frequency is somehow interfered with by the timer interrupt.
Expected behavior
UART and timer interrupt should work independently.
Information