Skip to main content
Aku
Associate II
Apr 27, 2023 8:26 AM UTC
Solved

STM32WB55 Random Core2 Hard Faults

Hi,

we've been testing STOP2 modes and faced random core2 crashes.

We use radio stack 1.15.0 Light

Crash data at 0x20030000: 0x1170fd0f   0x00000000   0x00000939   0x2003fa20

Any ideas?

This topic has been closed for replies.
Aku
AkuBest answer
Associate II
Oct 9, 2023 8:42 AM UTC

Issue was caused by incorrect clocking scheme caused by clock configuration condition race on deep sleep enter/exit. Happens only if 64 MHz PLL used for system clock.

Solution is kinda tricky: core1 is not allowed to perform switch to PLL, instead it must use SHCI_C2_SetSystemClock(available in radio stack 1.17.3 or later) to perform transition. Also if FreeRTOS used then IPCC SYS must be used in blocking mode since interrupts are not available at the moment of transition to stop mode.

12 replies

Remy ISSALYS
ST Technical Moderator
Apr 27, 2023 9:02 AM UTC

Hello,

When the hardfault occurs, can you check the value of FLASH_SR registrer?

Best Regards

Aku
AkuAuthor
Associate II
Apr 27, 2023 9:07 AM UTC

Hi Remi,

FLASH_SR were containing 0x0

We are using keystore in RAM, so core2 shouldn't write anything to flash.

Also no HSEMs were locked by core2

Remy ISSALYS
ST Technical Moderator
Apr 27, 2023 10:03 AM UTC

Hello,

How did you enter in stop2 low power mode? Are you using the low power manager used in STM32CubeWB package example? You can look BLE_HeartRate example that allow to reach stop2 low power mode.

Best Regards

Aku
AkuAuthor
Associate II
Apr 27, 2023 10:13 AM UTC
Remy ISSALYS
ST Technical Moderator
Apr 28, 2023 12:52 PM UTC

Hello,

After how long does the hard fault appear? Do you have a precise scenario that generate the hard fault?

Best Regards

Aku
AkuAuthor
Associate II
Apr 28, 2023 12:55 PM UTC

Some device crashes every couple hours, other can work days. We don't have exact way to reproduce it.

Remy ISSALYS
ST Technical Moderator
Apr 28, 2023 2:39 PM UTC

Hello,

Using your code to enter/exit in stop2 low power mode, I reproduce the hard fault on nucleo-wb55, issue is under investigation. I keep you inform as soon as possible.

Best Regards

Aku
AkuAuthor
Associate II
May 2, 2023 11:34 PM UTC

Awesome, waiting for results. Also can you link this to case 00178410 ?

Remy ISSALYS
ST Technical Moderator
May 11, 2023 12:41 PM UTC

Hello,

Issue is still under investigation to find the root causes.

Best Regards

Aku
AkuAuthor
Associate II
May 25, 2023 9:45 AM UTC

Any updates? This issues is severely affects our customers and we literally tried everything on our side. Most infuriating is that we can not restart core2 without restarting whole MCU.

Aku
AkuAuthorBest answer
Associate II
Oct 9, 2023 8:42 AM UTC

Issue was caused by incorrect clocking scheme caused by clock configuration condition race on deep sleep enter/exit. Happens only if 64 MHz PLL used for system clock.

Solution is kinda tricky: core1 is not allowed to perform switch to PLL, instead it must use SHCI_C2_SetSystemClock(available in radio stack 1.17.3 or later) to perform transition. Also if FreeRTOS used then IPCC SYS must be used in blocking mode since interrupts are not available at the moment of transition to stop mode.