2023-06-02 12:02 AM - edited 2023-11-20 04:09 AM
I get a STM32H5 Nucleo board (MB1814) and configured comparator with neccessary settings using CubeIDE and LL library and got next generated piece of code.I trigger mode choice Rising/Falling Edge Interrupt.
LL_EXTI_EnableFallingTrig_0_31(LL_EXTI_LINE_29);
LL_EXTI_EnableRisingTrig_0_31(LL_EXTI_LINE_29);
LL_EXTI_ClearRisingFlag_0_31(LL_EXTI_LINE_29);
LL_EXTI_ClearFallingFlag_0_31(LL_EXTI_LINE_29);
LL_EXTI_DisableEvent_0_31(LL_EXTI_LINE_29);
LL_EXTI_EnableIT_0_31(LL_EXTI_LINE_29);
After referring to the manual, I found that there are no such register bits as mentioned.
2023-06-06 11:30 AM
Hello @CChen.19 ,
It's a direct event to EXTI but we provide an errata for this and no workaround.
errata sheet : STM32H503CB/EB/KB/RB device errata - Errata sheet
"The Comparator cannot wakeup the device from low power mode (sleep/stop) when the COMP_OUT state is changed from 1 to 0 ." section 2.4 COMP ( 2.4.1)
Foued
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-06-06 08:27 PM
So when I trigger a falling or rising edge interrupt, am I unable to clear the flag?
When I use COMP and enable interrupts, I am currently unable to clear the interrupt flag. Can you help me confirm if my approach is correct? I have posted a separate question with detailed steps.
2023-06-07 04:04 PM
The comparator status register has a clearable interrupt flag and output status bit.