ST72321AR6-Auto STMicroelectronics, ST72321AR6-Auto Datasheet - Page 235

no-image

ST72321AR6-Auto

Manufacturer Part Number
ST72321AR6-Auto
Description
8-bit MCU for automotive with 32 Kbyte Flash, 10-bit ADC, timers, SPI, SCI and I2C interfaces
Manufacturer
STMicroelectronics
Datasheet

Specifications of ST72321AR6-Auto

Hdflash Endurance
100 cycles, data retention 20 years
Clock Sources
crystal/ceramic resonator oscillators, internal RC oscillator and bypass for external clock
4 Power Saving Modes
Halt, Active Halt, Wait and Slow
ST72321xx-Auto
To avoid this, a semaphore is set to ‘1’ before checking the level change. The semaphore is
changed to level '0' inside the interrupt routine. When a level change is detected, the
semaphore status is checked. If it is ‘1’, it means that the last interrupt has been missed. In
this case, the interrupt routine is invoked with the call instruction.
There is another possible case, that is, if PxOR or PxDDR are written to with global
interrupts disabled (interrupt mask bit set). In this case, the semaphore is changed to ‘1’
when the level change is detected. Detecting a missed interrupt is done after the global
interrupts are enabled (interrupt mask bit reset) and by checking the status of the
semaphore. If it is ‘1’, it means that the last interrupt was missed and the interrupt routine is
invoked with the call instruction.
To implement the workaround, the following software sequence is to be followed for writing
into the PxOR/PxDDR registers. The example is for Port PF1 with falling edge interrupt
sensitivity. The software sequence is given for both cases (global interrupts disabled / global
interrupts enabled):
Case 1: Writing to PxOR or PxDDR with global interrupts enabled:
LD A,#01
LD sema,A
; set the semaphore to '1'
LD A,PFDR
AND A,#02
LD
; store the level before writing to PxOR/PxDDR
LD A,#$90
LD PFDDR,A
; Write to PFDDR
LD A,#$ff
LD
LD A,PFDR
AND A,#02
LD Y,A
; store the level after writing to PxOR/PxDDR
LD A,X
; check for falling edge
cp A,#02
jrne OUT
TNZ Y
jrne OUT
LD A,sema
; Write to PFOR
X,A
PFOR,A
Doc ID 13829 Rev 1
Known limitations
235/243

Related parts for ST72321AR6-Auto