cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H5 Comparator with EXTI_RPR1 and EXTI_FPR1 issue.

CChen.19
Associate

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.
_legacyfs_online_stmicro_images_0693W00000dJtNJQA0.png

3 REPLIES 3
Foued_KH
ST Employee

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.

CChen.19
Associate

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.​

https://community.st.com/s/question/0D73W000000bIEKSA2/detail?fromEmail=1&s1oid=00Db0000000YtG6&s1nid=0DB0X000000DYbd&s1uid=0053W000001sxBz&s1ext=0&emkind=chatterBestAnswerNotification&emtm=1686065354640

Piranha
Chief II

The comparator status register has a clearable interrupt flag and output status bit.