ATmega88PA Automotive Atmel Corporation, ATmega88PA Automotive Datasheet - Page 289

no-image

ATmega88PA Automotive

Manufacturer Part Number
ATmega88PA Automotive
Description
Manufacturer
Atmel Corporation
9223B–AVR–09/11
Return:
Do_spm:
Wait_spm:
Wait_ee:
Atmel ATmega48PA/88PA/168PA [Preliminary]
; return to RWW section
; verify that RWW section is safe to read
in
sbrs temp1, RWWSB
ret
; re-enable the RWW section
ldi
call Do_spm
rjmp Return
; check for previous SPM complete
in
sbrc temp1, SELFPRGEN
rjmp Wait_spm
; input: spmcrval determines SPM action
; disable interrupts if enabled, store status
in
cli
; check that no EEPROM write access is present
sbic EECR, EEPE
rjmp Wait_ee
; SPM timed sequence
out
spm
; restore SREG (to enable interrupts if originally enabled)
out
ret
temp1, SPMCSR
spmcrval, (1<<RWWSRE) | (1<<SELFPRGEN)
temp1, SPMCSR
temp2, SREG
SPMCSR, spmcrval
SREG, temp2
; If RWWSB is set, the RWW section is not ready yet
289

Related parts for ATmega88PA Automotive