cancel
Showing results for 
Search instead for 
Did you mean: 

Does the HAL_GPIO_EXTI_Callback inhibit the interruption until it ends?

amelendez
Associate III
Posted on June 13, 2017 at 16:54

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

3 REPLIES 3
S.Ma
Principal
Posted on June 13, 2017 at 18:13

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.

Posted on June 13, 2017 at 19:07

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on June 14, 2017 at 15:17

Thanks, solved