Hi,
I have modified the LED_Blinky project with inserting the software reset code, I suppose that the software reset functions, because the LED dies not toggle after inserting the software reset.
BR
XiangJun Rong
int main(void)
{
/* Init output LED GPIO. */
GPIO_PortInit(GPIO, BOARD_LED_PORT);
/* Board pin init */
/* set BOD VBAT level to 1.65V */
POWER_SetBodVbatLevel(kPOWER_BodVbatLevel1650mv, kPOWER_BodHystLevel50mv, false);
BOARD_InitBootPins();
SystemCoreClockUpdate();
asm("nop");
asm("nop");
asm("nop");
asm("nop");
PMC->RESETCTRL|=1<<3;
SYSCON->SWR_RESET= 0x5a000001;
asm("nop");
asm("nop");
asm("nop");
asm("nop");
asm("nop");
/* Set systick reload value to generate 1ms interrupt */
if (SysTick_Config(SystemCoreClock / 1000U))
{
while (1)
{
}
}
while (1)
{
/* Delay 1000 ms */
SysTick_DelayTicks(1000U);
GPIO_PortToggle(GPIO, BOARD_LED_PORT, 1u << BOARD_LED_PIN);
}
}