K10 frezes after Cpu_SystemReset()

cancel
Showing results for 
Search instead for 
Did you mean: 

K10 frezes after Cpu_SystemReset()

336 Views
lovro
Contributor II

Hi, I have written a CAN bootloader.

At some point I need to reset the processor. When I use the Cpu_SystemReset() the processor freezes.

It looks as there is a break point at

void __thumb_startup(void)

{

        // Setup registers

        __init_registers(); <----- here

in __arm_start.c file

If I go through the program in debug mode I can continue the execution of the program.

I have also downloaded the program to the board and when it resets and freezes I was able to attach the debug and continue the program. It seems the same situation as before with continued debug connection.

I have also read the reset source from the RCM register and it seems to be correct - the SW (Reset caused by software setting of SYSRESETREQ bit) is active

I would appreciate any help with the situation.

Best Regards, Lovro

0 Kudos
4 Replies

111 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Lovro Oreskovic:

Can you isolate the issue with a simple project and share it?

A possible cause for this if the software reset is working as expected and if your application was developed with CodeWarrior, then you might have selected one of the Console support library options. Check the library selected in both the bootloader and the application projects as explained in the next thread:

Re: MK10DX256VLK7 doesn't run standalone, just when debugging. Verified it's running from FLASH, not...

Let us know your results.


Regards!,
Jorge Gonzalez

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

111 Views
lovro
Contributor II

Here is a link to the minimal project I made.

http://s000.tinyupload.com/?file_id=34658100457442174968

The behavior is a little bit different than the problems I had before. Now it just stops at __init_registers() when I program the board (I checked with debug attach). If I power cycle the board the blinks as expected.

If I try to debug the code it stops at __init_registers() every time it resets.

Regards, Lovro

0 Kudos

111 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Lovro Oreskovic:

I guess I understood your issue now. The K10 resets as expected but you want the debugger to continue running, correct? The K10 is not freezing, instead the debugger is taking control of the CPU again and halting it when the reset occurs.

After some tests I found that the ability to restore connection and continue the debug session depends on the debug probe and also in the connection settings of CodeWarrior. It worked for me using J-Link but not with P&E tools (Multilink Universal or OSBDM).

If you have a J-Link and want to try, go to Run -> Debug Configurations -> Select the connection and click on "Edit" -> Target -> Edit again and from the Initialization tab check the option "Run out of reset", as in the next picture:

pastedImage_4.png


Regards!,
Jorge Gonzalez

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

0 Kudos

111 Views
lovro
Contributor II

Jorge, thnx for a quick reply

I have looked at the thread you linked. My project was compiled with ewl libraries, I have tried compiling it with ewl_noio but it does not seem to help. Its still doing the same thing.

I will try to put up a project with the same behavior by the end of the day.

Best regards, Lovro

0 Kudos