Not Going in Bootloader Code?

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

Not Going in Bootloader Code?

1,223 Views
sanketkulkarni
Contributor III

Not Going in Bootloader Code?

I am working on NXP Kinetis K20.

My Application Code is at 0x8000.

My Bootloader code is at 0x0000.

But When I am Reseting my Device as shown in Screen shots, the code is not behaving as required. As Program Counter is correct.

Please help me in this I am very much under pressure.

To Reset I am using SFR:

SCB_AIRCR = SCB_AIRCR_VECTKEY(0x5FA)| SCB_AIRCR_SYSRESETREQ_MASK;

6 Replies

1,127 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Sanket kulkarni ,

Thank you for your interest in NXP kinetis product, I would like to provide service for you.
I didn't find your screen shots, please also tell me your K20 chip detail part number, then I will recommend some official bootloader code to you.
After the chip reset, the code will return back to flash bootloader.
You also can try to use external reset pin, whether it works on your side or not.
You said you use the software reset, do you use it in bootloader code or in app code?

Waiting for your updated information.


Have a great day,
Kerry

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

1,127 Views
sanketkulkarni
Contributor III

ApplicationCode.PNGBattBkup.PNGBootloaderCode.PNGDisassemblyView.PNGErrorInReset.PNG

This are the screenshots...as you can see the PC is correct but still it goes to unexpected location.

1,127 Views
sanketkulkarni
Contributor III

We have our own hardware using K20. And using our own customised bootloader.

1,127 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Thank you for your updated information.

1. What the detail chip part number of your K20, as you know K20 have a lot of part number.

2. What's the project you are running, the bootloader or the application code?

   When you debug the bootloader code directly, whether it has problems or not?


Have a great day,
Kerry

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

1,127 Views
sanketkulkarni
Contributor III

Thank you for your prompt responses.

1. It is MK20DX256VLL7.

2.Both Bootloader and application working independently without any problem.

3. The problem arises when I am doing a Sw Reset to Start the code from 0x0000 instead of Main(); ,i.e., 0x8000.

I dont know how to go more deeper, as I think it is SFR issue, but clueless on how to find the issue.

1,127 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Sanket Kulkarni,

   Thank you for your updated information.

  Where you debug the code? the application or the bootloader? Do you do the software reset in the application and debug it? Do you try to download it and test it directly without debugger? Whether it is still blocked after do the software reset in the app?

 


Have a great day,
Kerry

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------