cancel
Showing results for 
Search instead for 
Did you mean: 

Reset request

geoff2399
Associate II
Posted on July 01, 2010 at 06:40

Reset request

3 REPLIES 3
John F.
Senior
Posted on May 17, 2011 at 13:56

If it's of any interest, the version 3.2 of the library implements it like this,

static __INLINE void NVIC_SystemReset(void)

{

  SCB->AIRCR  = ((0x5FA << SCB_AIRCR_VECTKEY_Pos) |

  (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk)           |

  SCB_AIRCR_SYSRESETREQ_Msk); /* Keep priority group unchanged */

  __DSB();                    /* Ensure completion of memory access */             

  while(1);                   /* wait until reset */

}

John F.

geoff2399
Associate II
Posted on May 17, 2011 at 13:56

Answered it myself, the above snippet works great!

My toolchain was not setup properly causing me greif

damh
Associate II
Posted on May 17, 2011 at 13:56

The softreset has a curious feature:

In my tests the softreset is about 150 times slower than a hardreset!

The resethandler did only the respective reset. Time measured between two consecutive resets:

- softreset ~760µs

- hardreset ~5µs