Can I ensure keeping data ,Although after SW reset using SCB->AIRCR reset Mask ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can I ensure keeping data ,Although after SW reset using SCB->AIRCR reset Mask ?

Jump to solution
700 Views
Seongyon_Jeong
Contributor III

In Q&A , from https://community.nxp.com/t5/LPC-Microcontrollers/What-s-the-easiest-way-to-execute-a-reset/td-p/801... ,   now I  found NVIC_SystemReset() is usable.   but,

For  get the reson of reset,  I want to use some register 

In case of AVR.,   I did  this like below

void reset_action(int code)     // the  code is  reason type, or  path of reset
 {
   volatile avr32_pm_t *pm = &AVR32_PM;       //   this is one of  AVR power management  registers
    // reboot reason value save
      pm->gplp[0] = code;

   ~~~

    //Reset_mcu

    wdt_reset_mcu();

   }

Please Let me know  good ways to  keep the data ,after  SW reset  with data value

(not  file log..it is big load)

anyway,.  I tried to use reserved region of AIRCR[14:3], but already  AIRCR[14:8]  is used (priority group ??) , so  AIRCR[7:3]  but  It is cleared  after  Reset. 

0 Kudos
Reply
1 Solution
663 Views
Seongyon_Jeong
Contributor III
0 Kudos
Reply
2 Replies
664 Views
Seongyon_Jeong
Contributor III

Refering to below page,

https://community.nxp.com/t5/i-MX-RT/RT1064-System-Reset-Controller-SRC-General-Purpose-Registers/m-...

@kerryzhou ,  It is good ,intuitive & clear example. thanks.

0 Kudos
Reply
660 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Seongyon_Jeong ,

    Thanks for your trust!

     Next time, please use your company email to create the question, then your question will have higher support priority, don't use the 3rd part email to create the question, thanks.

    If your question is solved, please help to mark the correct answer, just to close this case.

    Any new issues, welcome to use the company email to create the new case.

Best Regards,

Kerry

0 Kudos
Reply