I porting my old project from ChibiOS 17.x to current 19.x ( STM32F303). I used EXTI driver for processing pin change interrupt and analog comparator interrupt. Also it is used for event generation to start ADC from external pin, wake up the CPU from sleep mode by UART. New PAL functions for enabling and processing PIN CHANGE interrupts work well. Analog Comparator Interrupt also is working, I used extiEnableLine for this.
One question is about how to setup HARDWARE PIN EVENT for generation ADC START event for example.
palEnablePadEvent is setup only interrupt mode:
Code: Select all
file "..\os\hal\ports\STM32\LLD\GPIOv2\hal_pal_lld.c"
...
193 EXTI->IMR1 |= padmask;
194 EXTI->EMR1 &= ~padmask;
...
When I used EXTI driver - it do it. extiEnableLine do not work because it stopped by debug assertion:
Code: Select all
file "..\os\hal\ports\STM32\LLD\EXTIv1\stm32_exti.h"
...
66 /* Masked out lines must not be touched by this driver.*/
67 osalDbgAssert((mask & STM32_EXTI_IMR1_MASK) == 0U, "fixed lines");
...
What is the reason to do such check?
Also I used UARTs events (line 25 and 26) for wake up the CPU from deepsleep mode and it is also stopped by extiEnableLine.
Maybe there is another way to set EXTi in new 19.x version, but I can't found?