Other Parts Discussed in Thread: CONTROLSUITE
Hello all,
I have troubles with invoking isr. Below initialization code and my try of invoking isr (2 ways)
BL_PROGRAM_L1:
SETC OBJMODE ;Set OBJMODE for 28x object code
; --- disable WD
EALLOW ;Enable EALLOW protected register access
MOVZ DP, #WDCR>>6 ;Set data page for WDCR register
MOV @WDCR, #0068h ;Set WDDIS bit in WDCR to disable WD
EDIS ;Disable EALLOW protected register access
;--------
LB _c_int00 ;
_main: ;
;--------
eallow
DINT; // Global Disable all Interrupts
; lcr INIT_PINS_SUB ;
movz DP, #PCLKCR0>>6
mov @PCLKCR0, #0xFFFF
;-------------- init PIE interrupts ---------------------------
and IER, #0x0000 ; // Disable CPU interrupts
and IFR, #0x0000 ; // Clear all CPU interrupt flags
movz DP, #PIECTRL>>6
or @PIECTRL, #0000000000000001b
;
movl XAR7, #PIEIER1 ;
rpt #(PIEIFR12 - PIEIER1)
||mov *XAR7++, #0x0
;-- init isr vectors
movz DP, #ADCINT1_VECT>>6
mov @ADCINT1_VECT, #BL_ADCINT1_ISR_L
mov @ADCINT1_VECT+1, #BL_ADCINT1_ISR_L>>16
; add other isr addresses
;
;
;-- enable ADC irq
movz DP, #PIEIER1>>6
mov @PIEIER1, #0000000000000001b
; switch other irq's on
;
;
;
;
;
;---
or IER, #0000000000000001b
movz DP, #PIEACK>>6
or @PIEACK, #0xFFFF
EINT
L1:
nop
nop
nop
cmp @AL, #1
bf L2, NEQ
INTR INT1
L2:
nop
nop
cmp @AL, #2
bf L3, NEQ
movz DP, #PIEIFR1>>6
or @PIEIFR1, #0000000000000001b
L3:
nop
nop
nop
bf L1, UNC
In the code above INTR INT1 works, and isr invoking propely.
but when execute
or @PIEIFR1, #0000000000000001b
respective flags in PIE and PIEACK is set, but isr is not invoked.
Can isr be invoked this way at all ?
Any help, please.