I seem to be chasing my tail on this problem. I'm trying to store floating point constants to the flash on a Cygnal C8051F005 over the serial port. It seems to work if I always erase the page first but if I don't I get some pretty weird results. I don't necessarily want to erase previously stored data. Does anyone have any code examples that may be helpful. Thanks in advance.
Dunno about this particulat case, but in my previous experience with Flash it has always been necessary to erase first before writing: Erasing sets all bits to '1' (ie, all bytes to 0xFF); programming can only clear bits from '1' to '0' - it can't change a '0' to a '1'. Would that explain the results you're seeing? BTW: I can't see that the type of your data (float) would have any relevance?