Code runs correctly with BDM pod attached but not standalone

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Code runs correctly with BDM pod attached but not standalone

跳至解决方案
2,180 次查看
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 项奖励
回复
1 解答
2,167 次查看
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 项奖励
回复
3 回复数
2,168 次查看
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 项奖励
回复
2,158 次查看
kef2
Senior Contributor V

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 项奖励
回复
2,151 次查看
e_taylor
Contributor III

Thank you!

0 项奖励
回复