MC68HC912 : how to debug an app when the MCU is in STOP mode ?

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

MC68HC912 : how to debug an app when the MCU is in STOP mode ?

1,655 Views
s_rivolet
Contributor I
Hi,
 
I'm trying to debug an app running on a MC68HC912DT128 using BDM probe (see below for configuration details).
 
The board is based on a MC68HC912DT128 microcontroller, and a PDIUSBD12 (Philips) parallel USB external controller.
 
The main loop of the programm calls periodically the "asm STOP" instruction since it is a way to reduce power consumption when there is no activity on the USB bus.
The external USB controller provides IRQ to HC12 on USB requests and thus awakes the HC12.
The external USB controller provides CLK to XTAL input of the microcontroller.
 
1st question : is this the good way to call the STOP instruction, i.e periodically in a main loop ?
2nd question : is there a way for running HIWAVE when the chip is in STOP mode ?
 
thank you for answers,
 
regards
 
s.rivolet
 
 
 
The configuration is the following :
CodeWarrior v 5.7.0 for HC12
P&E Systems BDM USB probe
HiWave v 6.1 build 6037


Message Edited by s.rivolet on 2008-01-11 03:54 PM
Labels (1)
0 Kudos
1 Reply

429 Views
Nabla69
Contributor V
Hello,

It depends on what you want to debug.
Debugging through STOP is usually instable because all clocks stop. The problem is not HiWave but the debug cable.
The best way would be to use an emulator, but even then, some are not too good at it.

If it's not really the STOP you wish to debug, you can replace it with a WAIT. As in WAIT the clocks are not stopping, a BDM tool won't have any trouble.

The STOP can be put in the main loop, yes. For instance with a state machine.

MC68HC912DT128 is old and probably expensive, you would benefit from the newer family MC9S12DT128.

A bientôt,
Alban.
0 Kudos