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

cross mob
TiDo_3898341
Level 2
Level 2
10 sign-ins 5 replies posted 5 questions asked

To debug a sporadic crash, I want to examine Cy_SysLib_GetResetReason().  However, the main app is running from a bootloader which will clear the reset reason before executing the main app.  I guess I can write what the bootloader sees to NV Flash and read from main app.  Is that the best way?

0 Likes
1 Solution
Ekta
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hello @TiDo_3898341 

Yes you can store the reset reason on the flash region (the part of flash that is not occupied by your application). You can also store the reset reason in the supervisory flash. For PSoC 6, 0x1600 0800 - 0x1600 0FFF is User area. Up to 32 KB can be used by the application to store arbitrary data.

Ekta_0-1645427821385.png


Best Regards
Ekta

View solution in original post

0 Likes
3 Replies
Ekta
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hello @TiDo_3898341 

Yes you can store the reset reason on the flash region (the part of flash that is not occupied by your application). You can also store the reset reason in the supervisory flash. For PSoC 6, 0x1600 0800 - 0x1600 0FFF is User area. Up to 32 KB can be used by the application to store arbitrary data.

Ekta_0-1645427821385.png


Best Regards
Ekta

0 Likes

Thanks, I have plenty of room in the Application Flash for that.  I thought there might be a way to use SRAM, but I guess that will be reset.

0 Likes
Ekta
Moderator
Moderator
Moderator
750 replies posted First like given 250 solutions authored

Hello @TiDo_3898341 

You can store the reset reason on SRAM but since the SRAM will get cleared on reset storing it in SRAM will not fulfill the purpose of retaining the reset reason.

Best Regards
Ekta

0 Likes