Code runs correctly with BDM pod attached but not standalone

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

Code runs correctly with BDM pod attached but not standalone

Jump to solution
1,791 Views
e_taylor
Contributor III

Hello,

9S12XDP512 processor Win 7 CW 5.1 Absolute Assembly

I have written code to read data through an SCI port into RAM and then program it into the EEPROM. The code works as expected while I have the BDM pod connected. If I run the code without the BDM pod attached it does not. The processor boots up correctly and the rest of the code runs properly, it seems to be in the saving of the EEPROM. I have the exact data that was there originally. The code structure is:

Read data and save in RAM

Erase EEPROM

Program EEPROM with RAM data.

Any suggestions greatly appreciated.

Thanks in advance!

Ed

0 Kudos
1 Solution
1,778 Views
e_taylor
Contributor III

Problem solved! I was getting a PVIOL error from writing to the 0x13_FFFC location. For some reason the BDM pod was allowing it to pass. It was a challenge as debugging without the BDM is pretty limited.

 

Ed

View solution in original post

0 Kudos
3 Replies
1,779 Views
e_taylor
Contributor III

Problem solved! I was getting a PVIOL error from writing to the 0x13_FFFC location. For some reason the BDM pod was allowing it to pass. It was a challenge as debugging without the BDM is pretty limited.

 

Ed

0 Kudos
1,769 Views
kef2
Senior Contributor IV

Hi

In special single chip mode write once restrictions and (IIRC?) illegal address reset are disabled. But you can BDM debug in normal mode. In debugger communications settings look for Hotplug mode. You program you code as usual, you cycle power or do similar reset and use Hotplug to debug in normal mode. Since in normal mode MCU is running out of reset, to debug from start of program you need to loop somewhere waiting for change in some volatile variable. Once you Hotplug connect, you change that variable and debug as usual. 

Please use search to find more details. 

Regards,

Edward

0 Kudos
1,762 Views
e_taylor
Contributor III

Thank you!

0 Kudos