NVIC_SystemReset() is not working with MiMxRT1020

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

NVIC_SystemReset() is not working with MiMxRT1020

2,558 Views
meeras
Contributor I

I am using MiMxRT1020 development kit.. I want to update firmware via TCP with bootloader. As soon as I receive my new firmware I want to reset application and I want to jump to the bootloader mode. But NVIC_SystemReset() is not working. So I can not update my firmware. Here is sample of my code.

if(ack_offset == 0xffff) {

/* received complete firmware */

osDelay(2000);

__disable_irq();

/* reset application */
NVIC_SystemReset();

}

0 Kudos
Reply
2 Replies

204 Views
davenadler
Senior Contributor II

@Sabina_Bruce that is not a proper test!
If you look at the NVIC_Reset inline function, you will see that the attempt at reset is followed by an infinite loop: 

for(;;) {}

So you have not proved the reset works. You need to test an application that has actual reset capability and without debug pod attached.

@meeras - Have you resolved this issue?
I'm also seeing an apparent reset failure on RT1024.
Also FYI see this similar issue and patch for M55 etc. ARM cores:
https://github.com/ARM-software/CMSIS_6/issues/195 

I'm going to try applying ARM's CMSIS patch.
Interested to hear what you've found!
Thanks,
Best Regards, Dave

 

0 Kudos
Reply

2,478 Views
Sabina_Bruce
NXP Employee
NXP Employee

Hello ,

Hope you are doing well.

I have tested this one my end without any issue. 

I used the simple hello world example. Placed the NVIC_SystemReset after it prints hello world. 

pastedImage_1.png

It will not reach the next printf as it resets the application.

I am using the latest IDE and SDK version.

Best Regards,

Sabina

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

----------------------------------------------------------------------------------------------------------------------- 

0 Kudos
Reply