Erroneous Code?

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

Erroneous Code?

Jump to solution
1,655 Views
CMBL
Contributor II

I've been working with this problem for two days now.  Not only is my board with the MC9S12XD64 sensitive and require a VERY precise power up sequence but, after several uses the debugger thorugh the P&E USB Multilink cable stop working together or something.

 

What happens is that is loads the code to the MC9S12XD device but when in debugger and I try to step through my code it jumps over lines of code. If I view the assembly code i'm missing instructions and they're replaced with BGND.

 

What happened? i can't get it to work anymore.

Thanks

Labels (1)
Tags (1)
0 Kudos
1 Solution
549 Views
CMBL
Contributor II

So it looks like my MC9S12XD was not in Special Single Chip mode like I thought it would be by using the USB-ML-12 device.  I had used a reset IC to provide a stable reset to my devices but somewhere along the way the reset device that is on the board has a strong pull up and the USB-ML-12 was not able to assert reset in conjunction with BKGD being low to put the MC9S12XD device in Special Single chip mode.

 

I think I've got it fixed now.  The assembled code no longer has the garbage BGND statements and I can finally toggle my LEDs!

View solution in original post

0 Kudos
3 Replies
549 Views
stanish
NXP Employee
NXP Employee

Hi CMBL,

 

It seems the code execution is lost due to resets or there is no valid code.

I'd suggest first you to verify if the code is correctly flased into MCU. (see attached screenshot)

What is the value of PC at BGND instruction?

Do you reach the main() after startup?

 

 

Stanish

0 Kudos
549 Views
CMBL
Contributor II

The loading verification failed

 

I've attached the screenshot.

 

After startup I have been reaching main.  The assembly code window has MANY BGND statements.

 

PC value says: 82FA.  I've attached a screenshot of this.

 

Any suggestions. My project is at a standstill due to this.

 

 

0 Kudos
550 Views
CMBL
Contributor II

So it looks like my MC9S12XD was not in Special Single Chip mode like I thought it would be by using the USB-ML-12 device.  I had used a reset IC to provide a stable reset to my devices but somewhere along the way the reset device that is on the board has a strong pull up and the USB-ML-12 was not able to assert reset in conjunction with BKGD being low to put the MC9S12XD device in Special Single chip mode.

 

I think I've got it fixed now.  The assembled code no longer has the garbage BGND statements and I can finally toggle my LEDs!

0 Kudos