This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Storing floats to int. flash on Cygnal

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.

Parents
  • According to the data sheet on this part "Writes to Flash can clear bits but cannot set them. Only an erase operation can set bits in Flash. Therefore, the byte location to be programmed must be erased before a new value can be written."

    So if you try to just write, you will get the and of the previous contents and the current byte to be written.

    This is typical of how flash memories operate...

Reply
  • According to the data sheet on this part "Writes to Flash can clear bits but cannot set them. Only an erase operation can set bits in Flash. Therefore, the byte location to be programmed must be erased before a new value can be written."

    So if you try to just write, you will get the and of the previous contents and the current byte to be written.

    This is typical of how flash memories operate...

Children
No data