|
EOR R0,R0
STS RAMPZ,R0// page erase
LDI ZL,0
LDI ZH,0
LDI SPMCSR_VAL,(1<RCALL Do_SPM
// re-enable the RWW section
LDI SPMCSR_VAL,(1<RCALL Do_SPM
Do_SPM: PUSH R17
// check for previous SPM complete
Wait_spm:
LDS R17,SPMCSR
SBRC R17,SPMEN
RJMP Wait_spm
CLI// SPM timed sequence
STS SPMCSR,SPMCSR_VAL
SPM
POP R17
RET
E-mail: info@telesys.ru