ST92141 STMicroelectronics, ST92141 Datasheet - Page 107

no-image

ST92141

Manufacturer Part Number
ST92141
Description
8/16-bit Mcu For 3-phase Ac Motor Control
Manufacturer
STMicroelectronics
Datasheet
EXTENDED FUNCTION TIMER (Cont’d)
Note: A single access (read/write) to the SR regis-
ter at the beginning of the interrupt routine is the
first step needed to clear all the EFT interrupt
flags. In a second step, the lower bytes of the data
; INTERRUPT ROUTINE EXAMPLE
L6:
L2:
L3:
L4:
L5:
L7:
iret
push R234
spp #28
cp R254,#0
jxz L7
tm R254,#128
jxz L2
ld r1,R241
; Insert your code here
tm R254,#16
jxz L3
ld r1,R243
; Insert your code here
tm R254,#64
jxz L4
ld r1,R249
; Insert your code here
tm R254,#8
jxz L5
ld r1,R251
; Insert your code here
tm R254,#32
jxz L6
ld r1,R245
; Insert your code here
jx L6
pop R234
; Check Input Capture 2 flag
; Check Input Compare 1 flag
; Check Input Compare 2 flag
; Save current page
; Set EFT page
; while E0_SR is not cleared
; Check Input Capture 1 flag
; else go to next test
; Dummy read to clear IC1LR
; else go to next test
; Dummy read to clear IC2LR
; else go to next test
; Dummy read to clear OC1LR
; else go to next test
; Dummy read to clear OC1LR
; Check Input Overflow flag
; else go to next test
; Dummy read to clear Overflow flag
; Restore current page
ST92141 - EXTENDED FUNCTION TIMER (EFT)
registers must be accessed if the corresponding
flag is set. It is not necessary to access the SR
register between these instructions, but it can
done.
107/179
9

Related parts for ST92141