Skip to main content
geoff2399
Associate III
July 1, 2010
Question

Reset request

  • July 1, 2010
  • 3 replies
  • 882 views
Posted on July 01, 2010 at 06:40

Reset request

    This topic has been closed for replies.

    3 replies

    geoff2399
    geoff2399Author
    Associate III
    May 17, 2011
    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

    John F.
    Associate III
    May 17, 2011
    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.

    damh
    Associate III
    May 17, 2011
    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