Low-latency HAL timer interrupts
Posted: Wed Oct 28, 2015 9:08 am
Hi all,
I'm using a HAL GPT with a callback to generate a pulse train as part of my current project. It's important that the edges of the pulses are as accurately timed as possible, with minimal jitter, so I've raised the appropriate GPT interrupt priority to just below that of the kernel (I'm on STM32). Ideally I'd like to raise it even further so it becomes a 'fast interrupt', but that denies me access to the I-class functions that interact with the timer.
Is there a way I can stop, reload and restart a GPT timer from a fast interrupt in a portable way? I'm aware that I could just drop the HAL and access the timer directly, writing an ISR for it, but I like to use abstraction layers wherever I can for all the same reasons that the layers exist in the first place!
Thanks in advance...
I'm using a HAL GPT with a callback to generate a pulse train as part of my current project. It's important that the edges of the pulses are as accurately timed as possible, with minimal jitter, so I've raised the appropriate GPT interrupt priority to just below that of the kernel (I'm on STM32). Ideally I'd like to raise it even further so it becomes a 'fast interrupt', but that denies me access to the I-class functions that interact with the timer.
Is there a way I can stop, reload and restart a GPT timer from a fast interrupt in a portable way? I'm aware that I could just drop the HAL and access the timer directly, writing an ISR for it, but I like to use abstraction layers wherever I can for all the same reasons that the layers exist in the first place!
Thanks in advance...