Skip to main content
srain
Associate
August 12, 2019
Question

No wake up possibility after a discontinuity power supplies

  • August 12, 2019
  • 10 replies
  • 2097 views

Hi,

Someone could help me, please?

When I remove battery on my system (NO VDD and NO Vbat on the MCU), and I connect it back, the system do not start!!!!

The only way to start the system is a NRST signal.

OR

Switch OFF and ON only the VDD power supply (VBAT still 1.8V).

What should be investigated ?

Thank's for any reply.

Stef

This topic has been closed for replies.

10 replies

Piranha
Principal III
August 14, 2019

Hardware problem. Look for respective "Getting started with STM32xx Series MCU hardware development" application note.

P.S. My crystal ball is at a repair shop, so I can't guess the MCU part number...

srain
srainAuthor
Associate
August 14, 2019

Thanks for your answer.

The hardware used is quiet the same as Nucleo demo board (STM32l476RG).

The system goes in shutdown mode and restart properly on wakeup pin (PC13).

But if the system lost power (Batt too low) when power goes back, the wake up pin doesn't work !

In that case I need to do Hard reset by NRST signal or just turn OFF and ON VDD on the MCU.

Does the MCU need to follow an order power sequence (Vbat first and then VDD, VDDA ...) ?

Thx

Stef

Piranha
Principal III
August 25, 2019

AN4555 section 2.3.2:

Note: VBAT is an independent supply and has no constraint versus VDD.

> But if the system lost power (Batt too low) when power goes back, the wake up pin doesn't work !

Maybe in that situation the system actually starts and goes into shutdown mode without configuring the wake-up pin?

srain
srainAuthor
Associate
September 2, 2019

Thanks,

How can I check that? Or how can I fix that?

BR

Stef

Piranha
Principal III
September 2, 2019

Exactly as almost everything - by reading documentation and debugging.

No schematics, no code, no detailed description of what and how You've tested. How do You imagine someone to be able to help You?

Ozone
Principal
September 3, 2019

> When I remove battery on my system (NO VDD and NO Vbat on the MCU), and I connect it back, the system do not start!!!!

This is no "wake up", but a restart.

Perhaps you have the BOOT pins floating.

srain
srainAuthor
Associate
September 3, 2019

Hi Ozone(O3), thanks for your reply.

I checked the BOOT0 and it's pulled down (Res10k).

0690X00000AQTBeQAP.png

Here the screenshot after a battery deconnection. The wake up should work properly but it is stuck in SysTick_Handler!

Tel me if you can see the picture!!!

Any ideas ?

Thx

Ozone
Principal
September 3, 2019

You should have told that an OS (presumably FreeRTOS) is involved.

First, the terminology is not clear.

If you disconnect both VDD and Vbat, the MCU is basically power supply. Reconnecting it constitutes a POR, not a wakup.

No system states (variables, values) are defined then, and need initialisation (done in the startup code before calling _main).

Caps on the board might keep some RAM cells and register values alive for a short period, but better not rely on it.

If the system hangs in the systick handler, you could possible check what goes wrong. Better switch to assembly mode, and check addresses and register contents.

Since (as I understand it) the code works after a hard reset (NRST), I assume skipped parts of the initialization (or reliance on unitialized values) is the culprit.

srain
srainAuthor
Associate
September 3, 2019

Sorry for that it is the first time for me !

Thank you very much for explanation.

I will try to have a look in that direction.

BR

Stef

Piranha
Principal III
September 3, 2019

So the hardware works and the problem is purely software related... An the last lines in a console shows very clearly what has happened!

OS_ERR_CPU_STATE_ISR_ILLEGAL     (166 = 0xA6) *** OS-function called from ISR with high priority

Also, as You have commented out HAL_Init(), but are using HAL, then HAL_GetTick() & Co must be properly implemented in Your code.