⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
10 posts / 0 new
Last post
bobspam@free.fr
Offline
Last seen:1 month 2 weeks ago
Joined:2018-06-20 08:07
Reset Origin ?

Hello

I do need to execute some code to restart my software in case of BOR or Watchdog reset.

Are there any way to know if the system is out of such bad conditions ?

我的目标是

- clear flash if the system is normally started

- analyse flash and restore context if the system is out of bad conditions

Thanks

Device:
bobspam@free.fr
Offline
Last seen:1 month 2 weeks ago
Joined:2018-06-20 08:07
RESET_STAT_REG (0x5000005E)

RESET_STAT_REG (0x5000005E)

I get 0x1F in that register after reset from JTAG and normal Power-On.

Figure 30 of DS_3v1.pdf in chapter 5 suggest that Watchdog generates a hardware reset that generates a software reset.

Can you confirm to me that after a watchdog reset the value is 0xE ?

Thanks

PM_Dialog
Offline
Last seen:1 day 19 hours ago
Staff
Joined:2018-02-08 11:03
Hi Bob,

Hi Bob,

Can you please clarify what you are trying to accomplish?

Thanks, PM_Dialog

bobspam@free.fr
Offline
Last seen:1 month 2 weeks ago
Joined:2018-06-20 08:07
Hello

Hello

I need my software to reboot in case of watchdog reset and to resume its execution thanks to flash memory. This means that I need to ditinguish power-on reset and watchdog reset so I can erase status memory in the former case and resume execution in the latter case.

I am currently testing this register using "0x5000005E != 0x1F" test to identify normal reset but I am not sure of the value of that register in case of watchdog reset (that only occur in some case that I am not able to reproduce voluntarily.)

PM_Dialog
Offline
Last seen:1 day 19 hours ago
Staff
Joined:2018-02-08 11:03
Hi Bob,

Hi Bob,

Please check dg_configWDOG_RESET_VALUE macro under bsp_defaults.h header file. The default reset value is 0xFF. You can modify if it needed. You can also refer at the “Watchdog Timer” section of the DA14680 datasheet.

Thanks, PM_Dialog

bobspam@free.fr
Offline
Last seen:1 month 2 weeks ago
Joined:2018-06-20 08:07
Hello

Hello

I am asking for hardware value of 0x5000005E after a watchdog reset. I am testing if this value is not 0x1F (power on reset) but watchdog reset does not seem to be properly detected using this method.

The RESET_STAT_REG is documented to be a read/write register.

Can you please confirm to me that the latches behind this register are updated during a watchdog reset ?

Do I need to set it to zero after a power on reset so I have a chance to read something else than 0x1F after a watchdog reset ?

This would imply to set this value to zero before calling hw_watchdog_unfreeze();

Thank you

bobspam@free.fr
Offline
Last seen:1 month 2 weeks ago
Joined:2018-06-20 08:07
I tried to set that register

I tried to set that register at zero after a normal startup and I can successfully get 0x16 value after a software reset from JTAG probe.

Problem solved.

PM_Dialog
Offline
Last seen:1 day 19 hours ago
Staff
Joined:2018-02-08 11:03
Hi bobspam@free.fr,

Hibobspam@free.fr,

高兴你找到你的问题out and many thanks for your indication.

Thanks, PM_Dialog

bobspam@free.fr
Offline
Last seen:1 month 2 weeks ago
Joined:2018-06-20 08:07
For the record, value when

For the record, value when getting out of a watchdog reset is 0xE.

PM_Dialog
Offline
Last seen:1 day 19 hours ago
Staff
Joined:2018-02-08 11:03
Hi Bob, Thanks for your

Hi Bob, Thanks for your indication,

Thanks, PM_Dialog