About FlexRAM used for EEPROM quick writes:
Are there any examples of quick write? I can't write data when I configure quick write. Here is an example of my configuration:
Hi jianguo li,
The quick-write mode expects a number of bytes to be written.
1.If the number of FlexRAM bytes allocated for EEPROM quick writes is:
FTFC->FCCOB = 0x00; FTFC->FCCOB = 0x10; // 16 bytes
and there are only two 32-bit writes before reset, the brown-out code returned by the EEPROM quick write status query after the reset is:
And the two records are lost.
2.Yes, that’s correct. Once the expected number of bytes is reached, the EEPROM starts the maintenance on the flash block.After that, subsequent data can be written as normal writes.
Please refer to AN11983, Appendix A EEPROM examples.On p.22, there is a quick-write use case described.“Quick write mode is intended to be used to save critical status records prior brownout events.”
I don't see anything wrong in the configuration.
What does it mean that you can't write the data?
How do you write the data?
Here are my write function and read function, after i write a 32bits variable into the eeeprom by CAN, it is then read and the value of the variable is reported through the CAN module.
After reset my brassboard, the report is still 0xffffffff.
But I can read and write normally without QUICK WRITE mode.
Hi jianguo li,
In the quick-write mode, all requested bytes (SetRAM command 0x81 (FCCOB5, FCCOB4), in this case 512 bytes) have to complete the program operation for any of them to be valid. If write operation interrupted by reset or power lost before last byte written, none of the writes are valid and last records are the valid. Because the maintenance is performed only once the last byte has been written.
You should be able to see all the data in the FlexRAM after reset if you lower the number of quick-write bytes to the number of bytes that you are actually writing to the FlexRAM.
To check any EEPROM issue after reset, please use the SetRAM command EEPROM quick write status query (0x77) as explained in AN11983 Section 220.127.116.11 FlexRAM used for querying write status on EEPROM.
In this case, I expect the returned brownout code to be 0x02.
If the the brownout code is 0x01, you can use the SetRAM command Complete interrupted EEPROM quick write process (0xAA) to complete the maintenance (18.104.22.168 FlexRAM used to complete interrupted EEPROM quick write process).
Thanks for your help，my problem has been solved. I set the minimum value (0x10 bytes) for EEPROM quick writes and the actual number of bytes also written to 0x10. After reset, the data can be read.
But there are two more questions:1. I set the minimum value (0x10 bytes) for EEPROM quick writes and the actual number of bytes written to 0x08(<0x10). The brownout code returned is the last data I wrote in, not 0x01 or 0x02, and the data cannot be read after reset.2. I set the minimum value (0x10 bytes) for EEPROM quick writes and the actual number of bytes written to 0x20(>0x10). The data can still be read after reset.
I don't know why, and the AN11983 does not mention.
Thank you very much for your help.
I can use EEE normally.
What I have been reading is the old version AN11983, and the new version AN11983 explains the use of EEE in detail.
Retrieving data ...