cancel
Showing results for 
Search instead for 
Did you mean: 

How to know if my stm32f401re is woke up

yassir
Associate III

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

5 REPLIES 5
Saket_Om
ST Employee

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

If your question is answered, please close this topic by clicking "Accept as Solution".

Thanks
Omar

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

Hello @yassir 

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

If your question is answered, please close this topic by clicking "Accept as Solution".

Thanks
Omar
STealthy_sneezer
ST Employee

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

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