Chip Dead after hibernation wakeup when using OTA

Learn MoreFAQsTutorials

8 posts / 0 new
Last post
wanhuaqifang
Offline
Last seen:1 week 1 day ago
加入:2020-01-02 07:07
Chip Dead after hibernation wakeup when using OTA

I found maybe a bug in the SDK. When I put secondary bootloader into external Flash, when the chip wake-up from hibernation. It will stuck at "system_DA14531.c" re-applying BANDGAP regs.

if ((GetBits16(HIBERN_CTRL_REG, HIBERNATION_ENABLE) == 1) && (GetBits16(SYS_CTRL_REG, REMAP_ADR0) > 1)) { // Apply the BANDGAP_REG value SetWord16(BANDGAP_REG, booter_val.bandgap_reg); // Apply the CLK_RC32M_REG value SetWord16(CLK_RC32M_REG, booter_val.clk_rc32m_reg); // Apply the CLK_RC32K_REG value SetWord16(CLK_RC32K_REG, booter_val.clk_rc32k_reg); // Apply the debugger configuration SetBits16(SYS_CTRL_REG, DEBUGGER_ENABLE, booter_val.dbg_cfg); }

When we wakeup from hibernation the secondary botloader store in ExtFlash, whenever what we set before hibernate,the REMAP_ADR0 will always > 1 after wakeup. And it will reapply these regs.

But in the bootloader the Scatter File not define "otp_cs_booter" section `s address. It will cause apply incorrect value to these regs. It will cause the chip dead!

LR_1 0x07FC0000 0x00008000 { ; load region size_region ER_1 +0 0x00002000 { ; load address = execution address *.o (RESET, +First) *(InRoot$$Sections) startup_DA14531.o system_DA14531.o } ER_2 0x07FC8000 0x3000 { ; push it to the end of SysRAM .ANY (+RO) .ANY (+RW +ZI) .ANY (STACK) } ; *************************************************************************** ; Above the address 0x07FCB000 (0x07FC8000 + 0x3000) the RAM shall not be ; used by the secondary bootloader and shall remain uninitialized. The buffer ; used by the DA14531 TRNG software mechanism must use only uninitialized ; RAM space in order to generate random seeds. ; ; The maximum size of the uninitialized RAM data, which can be fed to the ; TRNG buffer, is 0xA00 since the DA14531 flash programmer (UART version) ; leaves unattached the memory space from 0x07FCB000 to 0x7FCBA00. ; *************************************************************************** }

This is the scatter file that bootloader use. No "otp_cs_booter" section in it.

Now, let`s see the SDK`s Scatter file about "otp_cs_booter" section.

LR_IROM1 0x07fc0000 0xc0 { ; ER_IROM1 0x07fc0000 0xc0 { ; load address = execution address *.o (RESET, +FIRST) .ANY (otp_cs_booter) } }

它集.ANY (otp_cs_booter)。所以唤醒摇来摇去m hibernation won`t cause Application stuck, It only cause secondary bootloader stuck!

Please, tell me will the bug disappear when I burn bootloader to OTP?

or, can I use this way to solve it?

ER_1 +0 0x00002000 { ; load address = execution address *.o (RESET, +First) .ANY (otp_cs_booter) ;Add section here *(InRoot$$Sections) startup_DA14531.o system_DA14531.o }

Add section to bootloader scatter .ANY (otp_cs_booter) ;Add section here

Device:
PM_Dialog
Offline
Last seen:10 hours 39 min ago
Staff
加入:2018-02-08 11:03
Hi There,

Hi There,

Thanks for you feedback. Could you please indicate the SDK version that you are using?

Thanks, PM_Dialog

wanhuaqifang
Offline
Last seen:1 week 1 day ago
加入:2020-01-02 07:07
I`m using SDK version: 6.0.14

I`m using SDK version: 6.0.14.1114 with hotfix_001

PM_Dialog
Offline
Last seen:10 hours 39 min ago
Staff
加入:2018-02-08 11:03
Hi There,

Hi There,

Thanks for your inputs. Let me evaluate them and I'll let you know shortly.

Thansk, PM_Dialog

eddwhite1
Offline
Last seen:1 month 4 weeks ago
加入:2020-10-02 23:29
Is this a confirmed bug in

Is this a confirmed bug in the SDK? I'm also facing problems with hibernation and having the secondary bootloader in Flash

wanhuaqifang
Offline
Last seen:1 week 1 day ago
加入:2020-01-02 07:07
Why the Dialog_PM haven't

Why the Dialog_PM haven't notice it yet?

PM_Dialog
Offline
Last seen:10 hours 39 min ago
Staff
加入:2018-02-08 11:03
Hi Everyone,

Hi Everyone,

Apologies for the delay. We are working on this and will get back by the end of this week.

Thanks, PM_Dialog

PM_Dialog
Offline
Last seen:10 hours 39 min ago
Staff
加入:2018-02-08 11:03
Hi Everyone,

Hi Everyone,

Please check out an updated SW Example demonstrating how to configure the DA14531 in hibernation mode. This is the link for downloading it :DA14531 Configuring Hibernation and State-aware hibernation mode. Before running this example, I would recommend first checking the README file.

Thanks, PM_Dialog