attiny167-esxz ATMEL Corporation, attiny167-esxz Datasheet - Page 215

no-image

attiny167-esxz

Manufacturer Part Number
attiny167-esxz
Description
8-bit Avr 8-bit Microcontroller Microcontroller With 16k Bytes In-system Programmable Flash And Lin Controller
Manufacturer
ATMEL Corporation
Datasheet
7728A–AUTO–07/08
Return:
Do_spm:
Wait_spm:
Wait_ee:
ld
cpse
rjmp
sbiw
brne
; To ensure compatibility with devices supporting Read-While-Write
; Return to RWW section
; Verify that RWW section is safe to read
in
sbrs
ret
; Clear temporary page buffer
ldi
call
rjmp
; Check for previous SPM complete
in
sbrc
rjmp
; Input: spmcsrval determines SPM action
; Disable interrupts if enabled, store status
in
cli
; Check that no EEPROM write access is present
sbic
rjmp
; SPM timed sequence
out
spm
; Restore SREG (to enable interrupts if originally enabled)
out
ret
r1, Y+
r0, r1
Error
loophi:looplo, 1
Rdloop
temp1, SPMCSR
temp1, RWWSB
spmcsrval, (1<<CPTB) | (1<<SELFPGEN)
Do_spm
Return
temp1, SPMCSR
temp1, SELFPGEN
Wait_spm
temp2, SREG
EECR, EEPE
Wait_ee
SPMCSR, spmcsrval
SREG, temp2
; If RWWSB is set, the RWW section is not ready yet
; use subi for PAGESIZEB<=256
ATtiny167
215

Related parts for attiny167-esxz