Hi everyone!
I’m working on a Cortex M7 microcontroller and, for educational/research purposes, I need to observe every interrupt on an oscilloscope. My approach is to replace each default handler with a wrapper function that raises a GPIO line before calling the “real” handler, and lowers it afterward. This works like a charm for all interrupts - except PendSV.
Whenever I try to wrap PendSV, I see weird behavior and the system doesn’t act as expected. I realize PendSV is special because FreeRTOS (and the Cortex architecture in general) use it for context switching. Before giving up on wrapping it, I wanted to ask: has anyone successfully done this or found a clever workaround? I’d love to keep the same approach for all interrupts, but PendSV is resisting my efforts!
Any advice or insights would be super appreciated. Thanks!