2017-06-13 07:54 AM
STM32L100RC
I'm using PA3 as EXTI3
Once the interruption enters, I need to read pulses (data) from PA3
I read the data in HAL_GPIO_EXTI_Callback. These are 24 bits which could be 24 pulses after the first one. The first one only indicates the beginning of the communication (interruption for attending the communication)
Is every new edge a new interruption? or
while the HAL_GPIO_EXTI_Callback is being executed, is the interruption inhibited?
Thanks
2017-06-13 09:13 AM
As long as you are inside the interrupt, it won't recurse.
However, remember to keep the interrupt duration as short as possible.
Try to use the HW to assist the FW as much as possible.
Quick thinking would be Timer input capture with DMA. SW latency and interrupts become relaxed. You get timestamp on each edge in an array.
2017-06-13 10:07 AM
Yes, typically at the NVIC level.
Your IRQ Handler (or the default) calls into the HAL, which in turn calls your call-back, you must return for this to unravel and the NVIC clear, or tail-chain into the next pending call.
A lot of HAL implementation I see BLOCK, this is VERY bad, and frequently results in data loss. If something can't be done immediately, LEAVE. This is a very hard mindset for some developers used to linear execution to get their head around.
2017-06-14 08:17 AM
Thanks, solved