Re: Programming Interrupts

Started by Doron Fael January 2, 2003

>Hi,
>I am having a Motorola HC12DG128 EVB and SDI cable. Using MCUEz as PC
>interface.
>I want to use PORTH key wakeup interrupt.
>I coded the following program segment and the linker parameter file listed
>at the end of the message.
>
>When I executed the program and after giving a signal to the PortH, pin 0 it
>gives an illegal break point error message and jumps to somewhere else.
>
>Please tell me how to configure the interrupts when we use the SDI cable and
>MCUEz software.
>
>I have been trying this for few weeks without any success and please help as
>soon as possible.
>
>Thank you in advance.
>
>Bandara

Bandara,

It is possible you are not holding the Port H interrupt pin, in the
interrupt state long enough. The data sheets specify the minimum time an
interrupt should be held on the Key-Wakeup pins, so an interrupt will be
recognized and processed.

In your case, it is also possible that the interrupt recognition is
beginning inside the HC12, but before the interrupt source is being
identified, the interrupt request is removed externally. In such cases, the
HC12 will fetch the SWI (software interrupt) vector at FFF6, and will start
execution at the specified address by this vector.

External switch debouncing, may also lead to similar behavior.

Doron
Nohau Corporation
HC12 In-Circuit Emulators
www.nohau.com



Hi,
I am having a Motorola HC12DG128 EVB and SDI cable. Using MCUEz as PC
interface.
I want to use PORTH key wakeup interrupt.
I coded the following program segment and the linker parameter file listed
at the end of the message.

When I executed the program and after giving a signal to the PortH, pin 0 it
gives an illegal break point error message and jumps to somewhere else.

Please tell me how to configure the interrupts when we use the SDI cable and
MCUEz software.

I have been trying this for few weeks without any success and please help as
soon as possible.

Thank you in advance.

Bandara

----
----
XDEF KWisr , entry
ConstData: SECTION
PORTH: EQU $0029 ;Select port H as inturrept pin numbers 52,51,50,49
DDRH: EQU $002B ;Data Direction registor port H
KWIEH: EQU $002D ;Key wakeup intrrupt enable reg port H
KWIFH: EQU $002F ;Key wakeup intrrupt flag reg port H
initStk: EQU $2E00 ;initialiation the stak
KWHVEC: EQU $FFCE ;Vector keywakeup port H
RSTVEC: EQU $FFEF ;vector reset
KWHNUM: EQU 7 ;Number of Key Wakeup H
SetVect: EQU $FE1A
PUCR: EQU $000C
ALLBITS: EQU %11111111
BIT_0: EQU %00000001
PORTBIT: EQU %01000000
;
datasec: SECTION

codesec: SECTION

entry:
lds #initStk
bclr DDRH,ALLBITS ;make bit inputs
ldaa #BIT_0
staa KWIFH ;Clear pending flags

bset PUCR,PORTBIT

bclr KWIEH,ALLBITS
bset KWIEH,BIT_0
cli ;unmask HC12 intrrupts
Foreground:
;nop
wai
;bra Foreground

KWisr: ;here goes isr
ldd #$45ac ;simple instruction i handle here
ldd #$4555
rti

Linker Parameter file:
----
-----------------------
LINK INTRR.abs

NAMES
INTRR.o
END SEGMENTS
MY_ROM1 = READ_ONLY 0x2000 TO 0x22FF;
MY_RAM1 = READ_WRITE 0x2300 TO 0x24FF;
MY_STK1 = READ_WRITE 0x2500 TO 0x2C00;
END

PLACEMENT
datasec,.data INTO MY_RAM1;
ConstData INTO MY_ROM1;
codesec,.text INTO MY_ROM1;
.stack INTO MY_STK1;

END INIT entry

VECTOR ADDRESS 0xF7CE KWisr
VECTOR ADDRESS 0xFFFE entry




Hello everybody,

Can I Know How to access the data while in LoopBack Self test mode.

I am using 12DP256pv, Motorolla Kit. Since in the Manual it is given that, During LoopBack Self Test mode, RXBG will not perform FIFO. Then how to access all the data that is send during transmission.

Let me know how to configure for this problem

Manju
---------------------------------