Code runs correctly with BDM pod attached but not standalone

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Code runs correctly with BDM pod attached but not standalone

ソリューションへジャンプ
2,936件の閲覧回数
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,923件の閲覧回数
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,924件の閲覧回数
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,914件の閲覧回数
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,907件の閲覧回数
e_taylor
Contributor III

Thank you!

0 件の賞賛
返信