Using reset in debugger erases DFlash

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

Using reset in debugger erases DFlash

558 Views
RodneyMcGee
Contributor IV

I am pretty familiar with "hotsync" debugging a running microcontroller on many different kinds of Freescale parts and family , but the issue I am having is whenever I use the BDM (USBDM or PE Micro Multilink) to debug it erases the DFlash. The trigger for erasure is hitting the reset button in CW. It has no trouble connecting to the device and at no point in time does it ever say erasing or indicate that is it erasing portions of memory in the logs. The program (PFlash) data stays intact.

 

Steps to reproduce the issue:

1. Program my HCS12XE.

2. Load the data into DFlash via UART. 

3. Hotsync or debug running code.

4. Hit the red reset button, which immediately taking code back to the reset vector, but as a side-effect erases my DFlash. 

 

Is there anything about the way the memory is setup in my project that would cause the real-time debugger to erase the DFlash upon debugger initiated reset. By the way, it does not happen during a normal power-on or external reset.

 

Is any more information needed for advice on this issue?

Labels (1)
2 Replies

272 Views
trytohelp
NXP Employee
NXP Employee

Hi Rodney,

Just see you're already in touch with a colleague through a Service Request 1-1347639175.

By default a Reset command will perform a reset and execute the reset.cmd file defined in the "Command Files ..."

We will work with my colleague to understand the cause of the behavior.

However it will be interesting to know if the problem (DFLASH erase) occurs immediately after the Reset of during startup code.

To check it can you:

      - check the reset.cmd file is empty.

            the file should be named and located in project folder

                  cmd\P&E_Multilink_USB_Reset.cmd

      - check the DFLASH is not empty,

      - reset.

            the application should switch to the startup entry function.

      - check the DFLASH memory.

            Is it empty or not at this time ?

Regards

Pascal

0 Kudos

272 Views
trytohelp
NXP Employee
NXP Employee

Hi Rodney,

I think you're using CW for HC12 V5.1 which is the last version we've released.

I'm surprised the reset debugger button (black row with red circle) erase the DFLASH memory.

For my understanding the reset should change load the startup function on PC only.

I will check it on my side and will keep you informed.

If you're using another version, let me know.


Have a great day,
Pascal

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

0 Kudos