RESET on MC9S12XDP512 without BDM

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

RESET on MC9S12XDP512 without BDM

Jump to solution
1,695 Views
tnriley
Contributor III

I am having issue with the board working as expected when running under codeWarrior with PE Micro BDM pod but continually resets itsself with pod detached. The RESET pulse width is ~8.3 uSecs (with 24Mhz PLLCLK about 199 cycles) so internal source for cause.

I have checked all the usual suspects, GNDS, 5vPWR, both LVR and POR, ILAF, COP, CME.

I am confused as to why code executes with BDM but fails without. Any ideas

0 Kudos
1 Solution
1,685 Views
lama
NXP TechSupport
NXP TechSupport

Hi,

In this case I would focus on the SW. There are registers or bits which are write once only in the normal mode but writeable anytime in BDM mode. It is possible that something is already set somewhere and you try to do it again but it is ignored in the normal mode.
Have you observed the same behavior when you used the software containing only for(;;); or toggling some port/pin in the cycle?

Best regards,
Ladislav

 

View solution in original post

2 Replies
1,647 Views
tnriley
Contributor III

Ladislav,

Thanks for the info. I was able to trace the problem back to an external Real Time Clock connected to IRQ pin. RTC outputs a 1Hz square wave which I use as a timing pulse on the falling edge. I was writing IRQE more than once, first time @ startup to clear out IRQCR, then later to set IRQE as edge triggered and enable the IRQEN. Obviously the second write wasn't accepted for IRQE, since its write once in normal mode. But what I am still unsure of is why the RESET. I can understand multiple IRQ interrupts because the RTC is LOW for 500mSecs. So I get back in as soon as I exit. The BDM is no help in cases such as this because it was happily running with no issues.

0 Kudos
1,686 Views
lama
NXP TechSupport
NXP TechSupport

Hi,

In this case I would focus on the SW. There are registers or bits which are write once only in the normal mode but writeable anytime in BDM mode. It is possible that something is already set somewhere and you try to do it again but it is ignored in the normal mode.
Have you observed the same behavior when you used the software containing only for(;;); or toggling some port/pin in the cycle?

Best regards,
Ladislav