Skip to main content
Geoffrey1
Associate III
February 16, 2022
Question

wake up logic on stm32l4

  • February 16, 2022
  • 0 replies
  • 594 views

I want to wake up from standby for each transition on a wkup pin. For example, on waking, read the wakup pin and set/reset the bit in pwr_cr4.  (pin high -> bit high, pin low -> bit low).  

Is there a race condition ?  The reference manual is vague on the logic behind the wkup pins. The configuration is for detecting an edge. In the example above, changing the edge to be detected based upon the current line state introduces a possible race condition depending upon how the hardware works.

This topic has been closed for replies.