B
blisca
- Jan 1, 1970
- 0
hi,
i'm trying to save some data on flash with a 9s12e64 freescale MCU,
following instruction on application notes and examples
i did the following steps
1)set FCLKDIV to have the flash clock in the right range
2)do an ordinary write,data does'nt matter, in the sector that i want erase
3)put an erase command($40) in the FCMD register
3)then clear CBEIF bit in FSTAT by LDAA #$80 followed by STAA FSTAT
then i check the bit with a BITA instructtion ,then branching if the bit
results still set
at this point the CBEIF bit remains high
can anyone show me where my error is?thank you!
Diego
i'm trying to save some data on flash with a 9s12e64 freescale MCU,
following instruction on application notes and examples
i did the following steps
1)set FCLKDIV to have the flash clock in the right range
2)do an ordinary write,data does'nt matter, in the sector that i want erase
3)put an erase command($40) in the FCMD register
3)then clear CBEIF bit in FSTAT by LDAA #$80 followed by STAA FSTAT
then i check the bit with a BITA instructtion ,then branching if the bit
results still set
at this point the CBEIF bit remains high
can anyone show me where my error is?thank you!
Diego