That's weird. I've never used WRITECODE so I probably won't be of much help but I was thinking:
Erased FLASH contains $FF so, since the data at adress 0 is $00, it looks like "something" is actually writing to that location - just not what's supposed to be there. Have you tried to "manually" write some arbitrary data to the start of the FLASH? Likeand then read the chip back to see the correct data is being stored.Code:WriteCode $0000, $1234 WriteCode $0002, $4567
/Henrik.
Bookmarks