MC9S12DP512 won't run at power on or reset

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

MC9S12DP512 won't run at power on or reset

816 Views
gregmeagher
Contributor I

I have a board that is using a MC9S12DP512 controller.  We have used these many times in the past and I have never seen this problem before.  When running through CodeWarrior and the BDM, things go smoothly and I see no problem resetting and running my firmware.  However, at power on or upon a reset, the controller is failing to start.  From what I can see, the configuration and pin connections are the same as in all of our previous designs, so nothing is glaring at me.  I am a software engineer so I didn't do the design myself, but our electrical engineer took many aspects of this from legacy designs and will need to be pointed in the right direction for a solution.  I'm hoping that someone here can give me an idea of where to look for what could be keeping me from running without the BDM connection.  Thank you in advance for any advice that you can offer.

Labels (1)
0 Kudos
2 Replies

573 Views
gregmeagher
Contributor I

By hotsyncing to the controller and tracing my registers, I found that the code was in fact running, but I was getting a different value on an uninitialized pin in BDM mode than I was during normal mode.  In our current circuit design, that pin was critical in the next stages of the circuitry activation and the state it took in normal mode was not allowing the firmware to get any further or to hit the debug code that I was trying to troubleshoot with.  This issue is now resolved.

0 Kudos

573 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

When the reset pin is released, the MCU enters a mode of operation based on the state of MODC, MODB, MODA pins. Please refer to MC9S12DP512DGV1, Table 4-1.

So please check the states of the pins to see which mode the MCU enters without the debugger.

 

In Normal Single Chip mode or Emulation modes, some registers can be written only once, whereas in Special Single Chip mode anytime. The specification is always in the description of each register. So, I would check how many times you write these registers.

 

From your description, I’m unable to say what the MCU does. However, you can attach the debugger to running MCU (without reset). In CodeWarrior, you can choose Hotsync instead of Connect(Reset) and then halt the MCU, check registers such as MODE register.

 

If you are unable to Hotsync with the MCU, please check the reset pin with a scope. There is a chance the MCU keeps resetting itself.

 

Regards,

Daniel