Interesting..
I'd always thought that I could change the prescaler AT or before
activation without going through the dance, and apparently it works
SOMETIMES that way.
Shifting to the WDCE dance does it for me, and now my 200mS resets
work fine, and a reboot takes about 2 seconds from the command (long
story) as it should..
Thanks!
Now playing with bootloader code.
I have recieved a packet by Xmodem, done all the checking, and wish to
write it to Flash.. First I must erase the appropriate page:
FlashPage:
clr ZL
lds ZH,XmodemBlk ;The block number
;00000100 00000000 ;Assume block 4
dec ZH ;
;00000011 00000000
lsr ZH ;
;00000001(C) 00000000
ror ZL ;
;00000001 10000000
movw YH:YL,ZH:ZL ;Temp store of the page number
;I KNOW I get to this point
ldi TEMP,$03 ;00000011 PGERS + SPMEN
sts SPMCSR,TEMP ;
spm ; Flash page erase
FP_WaitForErase:
call Pip ;<<<--- I never see this happen!
lds TEMP,SPMCSR ;
sbrc TEMP,SPMEN ;
rjmp FP_WaitForErase ;Message
Re: [AVR-Chat] Further Adventures
2007-07-11 by David VanHorn
Attachments
- No local attachments were found for this message.