Commit Graph

8 Commits (cf60266584a44f7cd595d460856449a670c0be7b)

Author SHA1 Message Date
Laurent MEUNIER 61648a53f5 Fix alignement 2017-07-07 17:27:46 +02:00
Laurent MEUNIER cea91306de STM32: Raise error in case of spurious interrupt
In case we've run through the entire GPIOs loop, withouth finding a
matching interrupt, we're in the case of a spurious interrupt, let's
raise an error to track it down.
2017-06-30 13:26:09 +02:00
Laurent MEUNIER ade981dc9e STM32: Store and restore rising falling config of gpio_irq
Now that rising / falling edge detection is disabled in the
gpio_irq_disable function, we also need to restore it when gpio_irq_enable
gets called.
2017-06-30 13:26:09 +02:00
Laurent MEUNIER 88770528bd STM32 Fuly disable GPIO irq settings
When disabling GPIO irq, also the falling / rising edge settings need
to be reset (EXTI_RTSR and EXTI_FTSR registers).

If not reset, the same EXTI line can be later enabled again with a wrong
Rising / Falling configuration. This was especially seen and reported in
ci-test tests-api-interruptin on NUCLEO_F446RE target where DIO2=PA_10 and
DIO6=PB_10 were successively tested: as they are sharing the same EXTI_LINE
(EXTI_10), this resulted in calling the irq_handler with wrong
IRQ_FALL/IRQ_RAISE parameter and donothing being called in loop.
2017-06-30 13:26:09 +02:00
Laurent MEUNIER 18abfdb604 STM32: gpio: style consistency 2017-02-16 19:34:08 +01:00
Laurent MEUNIER 3517eb108e STM32: Change Set_GPIO_Clock return type
Directly return a GPIO_TypeDef pointer to avoid extra casts.
Also move it to GPIO file.
2017-02-16 18:55:44 +01:00
Laurent MEUNIER 6bd488db4d STM32: gpio irq: Use LL registers access
Instead of using HAL_GPIO_Init / Deinit which makes a lot of registers
being written and re-written, and which creates extra gpio / pin / irq
dependencies, we directly set the IRQ related registers thanks for the
STM32 LL layers which provides APIs to modify registers.
2017-02-16 18:55:36 +01:00
Laurent MEUNIER 74774f9424 STM32 Make gpio_irq_api.c a common files
This requires the creation of gpio_irq_device.h file, where
family specific EXTI IRQ mapping is defined
2017-02-16 18:55:28 +01:00