What Registers, if Any, Remain Uncleared on a Watchdog Reset

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Are there any registers that can be used to transfer data from before a watchdog reset to after?

0 Likes
1 Solution
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

I have tested bob's advice, and verify it make sense after wdt reset.

#define __no_init __attribute__((section(".noinit")))

uint32 mydata[2]__no_init ={1,3};

View solution in original post

0 Likes
3 Replies
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

The IC will not clear the RAM, but it need to re-initialize the ram after the reset.

Every register will initialize after a watchdog reset.

Or you can describe what do you want to do.

If someone has another opinion, welcome to discuss.

0 Likes

One way will be to save data in internal flash or external flash/ram.

There is a compiler directive (not much time to investigate). Try

#define __no_init    __attribute__ ((section (".noinit")))

and later:

uint32 MyData[50] __no_init;

Problem might be to check whether data is valid (after a power-down)

Bob

0 Likes
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

I have tested bob's advice, and verify it make sense after wdt reset.

#define __no_init __attribute__((section(".noinit")))

uint32 mydata[2]__no_init ={1,3};

0 Likes