HC08 monitor mode using SWI

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
I'm currently trying to put a HC08 into monitor mode by setting the
appropriate voltage on the IRQ pin and then executing a software
interrupt instruction (SWI) rather than using the reset pin (page 170
of the manual).

When I execute a SWI, all that happens is my software interrupt vector
just gets executed.  Nothing seems to change in the operation of the
HC08.  If I ground the reset pin, the HC08 goes happily into monitor
mode.

The chip that I'm using is an old sample chip stamped "XC68HC98AZ60"
(note the missing 0 such that instead of being HC908 it is an HC98). I
don't know if this has anything to do with the problem.

Anyone got any suggestions or comments?

Anna

Re: HC08 monitor mode using SWI


Quoted text here. Click to load it
Vtst level is sampled during hardware reset and based on this the chip
is put into normal or monitor mode.

Quoted text here. Click to load it
That's exactly how it SHOULD work.


Re: HC08 monitor mode using SWI
Quoted text here. Click to load it

Cool.  So why does the manual say you can execute an SWI to get into
monitor mode? What's an SWI got to do with the Vtst/hardware reset
combo?  I'm a bit confused.

Thanks,
Anna

Re: HC08 monitor mode using SWI
Quoted text here. Click to load it

I have not used to HC08, but for the SWI to work, you would need to have
the interrupt routine for the SWI do the processing to enter the monitor
at the appropriate entry point.  Since SWI is often used by monitors for
breakpoints, the code there would normally save some machine state,
determine whether a breakpoint had been encountered (by comparing the
SWI with its breakpoint list), and starting monitor code.  Check the
monitor documentation wrt SWI.

Thad

Re: HC08 monitor mode using SWI
snipped-for-privacy@frungy.org (AMP) wrote in message
Quoted text here. Click to load it

If the SWI-vector address is _programmed_ (by you) with the address of
the on-chip monitor, then you should get what you want.

The manual may be referring to 'user-access monitor' operation: see
Motorola application-note AN2305. This is a handy lash-up that
sacrifices a few pins and the SWI for the gift of not having to read
all that confusing monitor-entry stuff over and over, as well as
seamless debugging with P&E tools (and others?)
Wade Hassler

Site Timeline