Skip to main content
Associate II
October 25, 2024
Question

How to know if my stm32f401re is woke up

Hello, 

I developped a card around the stm32f401re MCU, and i want to know which one of Pin(s) can show me that my MCU is woke up. 

It's the first time I use a STM32F401 I never communicated with my MCU, it's for this that I want to know this.

 

Thank you community

 

Yassir OTMAN

This topic has been closed for replies.

5 replies

ST Technical Moderator
October 25, 2024

Hello @yassir 

You can configure a GPIO pin to toggle or change its state when the CPU wakes up from sleep mode. This can be done by setting the GPIO pin high or low in the wake-up interrupt service routine (ISR).

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om
yassirAuthor
Associate II
October 25, 2024

Hello,

 

I said on my previous post that I never communicated with my MCU, let me explain you the problem.

I can't connect my STLINK to my MCU, the SW communication dosen't work. So I wanted to know if, I have there is a PIN that can show me that the MCU is not sleeping. Just after power the my MCU.

Thanks

Yassir OTMAN

ST Technical Moderator
October 25, 2024

Hello @yassir 

It is possible to detect if your MCU is in sleep mode or not by measuring its power consumption.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om
STealthy_sneezer
ST Employee
October 25, 2024

Hi @yassir,

Can you give more details about the board you are using?

By default, you cannot see if the CPU is in sleep mode or not just from the pins. You would need to do some config first. Still, the quickest way would be to measure IDD and compare it with the values in Table.26 of Datasheet DS10086. Though, depending on your config, there is a chance it might not be reliable.

If you cannot use STlink, what about JTAG/SWD?

Best regards

Shirley.Ye
ST Employee
October 26, 2024

how do you program the MCU? for the pins, they can be set either high or low before standby. You cannot judge the pin to find if the MCU woke up or not