cancel
Showing results for 
Search instead for 
Did you mean: 

Can You Explain the Current Mode and Status of My Microcontroller?

kkim6
Associate II

I am currently developing a board using the STM32WB09TEF7TR microcontroller.

Unfortunately, when the device is powered on, the microcontroller does not function properly.

It only starts working after manually resetting the reset pin.

To diagnose this issue, I am accessing the memory immediately after powering on the device in hot-plug mode to check its status.

The register bit log data is attached.

Could you help me understand the current state of this microcontroller?

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

Connecting with STM32CubeProgrammer and examining the register values will let you know where code execution is at by looking at the PC register. Probably it is in 0x08xxxxxx somewhere, which means it's in user code, possibly waiting for a clock to start up.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

6 REPLIES 6
TDK
Guru

Connecting with STM32CubeProgrammer and examining the register values will let you know where code execution is at by looking at the PC register. Probably it is in 0x08xxxxxx somewhere, which means it's in user code, possibly waiting for a clock to start up.

If you feel a post has answered your question, please click "Accept as Solution".
kkim6
Associate II

Thanks for letting me know.

Now, I understood how to analyze the status of the microcontroller.

My system is held on 0x10043D34 address when power is on, which means that the machine is in the Flash memory area. (LR : 0x10043A35)

Do you have any idea what this address exactly means?

 

kkim6
Associate II

I found the function having problem.

That is MX_RTC_Init().

I'm checking it more detail...

kkim6
Associate II

I found that 0x10043D34 is a "while" function in the Error_Handler.

So, a Problem happened here, LR : 0x10043A35 (MX_RTC_Init). 

Now I can understand the detailed situation...

Insufficient LSE startup time is a somewhat common issue that causes this.

If you feel a post has answered your question, please click "Accept as Solution".
kkim6
Associate II

I want to conclude here.

This microcontroller is held on the "while" in the Error_Handler function.

So, I put the software restart command in the while function to address the initial booting problem like below. 

 

void Error_Handler(void)

{

__disable_irq();

while (1)

{

NVIC_SystemReset();

}

}