cancel
Showing results for 
Search instead for 
Did you mean: 

WKUP pin with internal Pull-Up

Aaron Pica
Associate III
Posted on July 19, 2017 at 12:42

I'm working with the STM32F769, and I want to configure the pin PA0 to wake up the MCU from Standby. The problem is that the board needs a Pull-Up in the pin to be able to detect the pulsation.

The sequence that I follow to enable the WKUP line is:

  1. Configure the PA0 GPIO pin with internal Pull-Up.
  2. HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN1_LOW);      

    //Configure the WKUP line with falling edge.
  3. PWR->CR2 |= PWR_CR2_CWUPF1;                                              //Clear the interruption flag (it's automatically set)

In the moment WakeUpPin is enabled, the Pull-Up disappears (the pin level goes down) even though the PUPDR is still configured.

I haven't found any reference about this behaviour in the Datasheet/Erratasheet/Reference manual. Is it limitation of the device? Is there a workaround? Am I missing something?

Thank you.

#stm32f7 #standby #pull-up #wkup
5 REPLIES 5
Posted on July 19, 2017 at 13:52

Hello!

According to manual RM0410  page 126:  The MCU exits from Standby low-power mode through an external reset (NRST pin), an IWDG reset,

a rising edge on one of the enabled WKUPx

pins or a RTC event occurs

so you need a pulldown .

Posted on July 20, 2017 at 09:29

Vangelis, thank you for your reply.

I've tested the circuit board with an external Pull-Up, and it works fine with the falling edge. The WKUP lines allow the polarity configuration, to either rising or falling edge triggers the interruption (WUPP1 flag), and they both wake the MCU from Standby. The problem is that I can only prepare this setup in the lab, so it's not a viable solution with the current version of the board.

The main problem is that once the WKUP flag (EWUP1) is set, all the other GPIO configuration is ignored (doesn't matter if the GPIO configuration is done before or after setting EWUP1). That's why I don't really understand what's going on here.

Thank you

Aaron Pica
Associate III
Posted on July 24, 2017 at 18:03

Does anyone have a clue about what is happening?

Thank you

Posted on July 24, 2017 at 18:38

Hello again

I found in another manual  (stm32f103c8)

this

'Bit 8 EWUP: Enable WKUP pin

This bit is set and cleared by software.

0: WKUP pin is used for general purpose I/O. An event on the WKUP pin does not wakeup

the device from Standby mode.

1: WKUP pin is used for wakeup from Standby mode and forced in input pull down

configuration (rising edge on WKUP pin wakes-up the system from Standby mode).

Note: This bit is reset by a system Reset.'

I am sure also that the same behavour is explained to another manual..   I dont remember which.

So, It is not an 'unknown behaviour'

In my L152 i its used by my 'power button'

In case you chose to trigger the wkup by falling edge, you will have increased consumption at stby mode by keeping the pin at hi state.

I may speculate a lot of explanations. 

I think it is better, to have an explanation for your 'problem' from ST.

Posted on July 25, 2017 at 10:06

Thank you Vangelis.

Yes, it seems the reason why I can't configure those pins. As you suggest, I'll wait if somebody from ST confirms this theory, because it is NOT explained in any F7 documents. I think each MCU should be fully explained with its own documentation (or at least be linked to the missing one).