2016-08-03 09:13 AM
I have a new board that uses the rev 3 silicon and it will not reset under software control. I have an older board design that uses the rev 1 silicon and the software reset logic works properly. The new board design is based on the previous one.
The code I use from core_cm4.h and is:___STATIC_INLINE
void
NVIC_SystemReset(
void
)
{
__DSB();
/* Ensure all outstanding memory accesses included
buffered write are completed before reset */
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 */
}
After I execute the macro I break the debugger and its stuck in the while() loop.
Any thoughts?
Thanks...Keith Rhodes
2016-08-03 09:20 AM
Any thoughts?
What do you have connected externally to the NRST line?2016-08-03 07:06 PM
NRST is tied to logic high. It has circuitry to have a reset button which brings it low when pressed. This same circuit works correctly on an older board with the rev1 silicon.
2016-08-03 07:52 PM
Driving the pin high with a push-pull driver, or connecting it to the supply rail, will induce the failure you describe. NRST is considered bidirectional in ARM designs, and I've seen people do this and fail for many years.
I'm surprised the previous design worked, evidently it was able to clamp it close enough to ground to hit VIL and reset. You should perhaps plot the voltage/current when it does that.2016-08-05 01:10 PM