About S32K144 FlexRAM used for EEPROM quick writes

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

About S32K144 FlexRAM used for EEPROM quick writes

Jump to solution
2,236 Views
jianguo_li
Contributor I

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:

pastedImage_2.png

thanks!

Labels (1)
Tags (2)
0 Kudos
1 Solution
1,923 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi jianguo.li@ev-ep.com,

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[7] = 0x00; 
FTFC->FCCOB[6] = 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:

pastedImage_2.png

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.”

Regards,

Daniel

View solution in original post

0 Kudos
6 Replies
1,923 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

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?

Thanks,

BR, Daniel  

0 Kudos
1,923 Views
jianguo_li
Contributor I

Hi, Daniel 

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.

 

thanks!

pastedImage_1.png

pastedImage_2.png

0 Kudos
1,923 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi jianguo.li@ev-ep.com,

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 3.2.1.4 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 (3.2.1.5 FlexRAM used to complete interrupted EEPROM quick write process).

Regards,

Daniel

0 Kudos
1,923 Views
jianguo_li
Contributor I

Hi, Daniel 

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.

Thanks.

0 Kudos
1,924 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi jianguo.li@ev-ep.com,

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[7] = 0x00; 
FTFC->FCCOB[6] = 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:

pastedImage_2.png

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.”

Regards,

Daniel

0 Kudos
1,923 Views
jianguo_li
Contributor I

Hi, Daniel 

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.

Thanks!

0 Kudos