TS-7180 FRAM: Difference between revisions

From embeddedTS Manuals
(Formatting normalization)
(Migrate to the transcluded FM25L16B page to reduce copies of the same text. The FM25L16B was updated to be more compatible with both platforms where its always included, and platforms where its optional.)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{:FM25L16B_FRAM}}
{{:FM25L16B_FRAM}}


The EEPROM file can be found at <source inline>/sys/class/spi_master/spi2/spi2.2/eeprom</source>, and should be accessed like a normal file to write and read data in the FRAM.
 
The FRAM can be accessed as a flat file from Linux:
<syntaxhighlight lang=bash>
# xxd -a /sys/class/spi_master/spi2/spi2.2/eeprom | head
00000000: 0000 0000 0000 0000 0000 0000 0000 0000  ................
*
000007f0: 0000 0000 0000 0000 0000 0000 0000 0030  ...............0
</syntaxhighlight>
 
If U-Boot's [http://www.denx.de/wiki/view/DULG/UBootBootCountLimit bootcount tracking] environment variable is enabled, the last byte of FRAM is reserved for storing the boot count, and care should be taken to not overwrite it inadvertently. In U-Boot, the boot count can be accessed with the <code>fram</code> command.

Latest revision as of 15:27, 12 June 2023

This platform supports a soldered-down, non-volatile Ferroelectric RAM (FRAM) device. The Cypress FM25L16B is a 2 KiB FRAM device in a configuration not unlike an SPI EEPROM. The nature of FRAM means it is non-volatile, incredibly fast to write, and is specified with 100 trillion read/write cycles (per each of the 256 sequential 8 byte rows) with a 150 year data retention at temperatures below 65 °C. The device is connected to Linux and presents itself as a flat file that can be read and written like any standard Linux file.


The FRAM can be accessed as a flat file from Linux:

# xxd -a /sys/class/spi_master/spi2/spi2.2/eeprom | head
00000000: 0000 0000 0000 0000 0000 0000 0000 0000  ................
*
000007f0: 0000 0000 0000 0000 0000 0000 0000 0030  ...............0

If U-Boot's bootcount tracking environment variable is enabled, the last byte of FRAM is reserved for storing the boot count, and care should be taken to not overwrite it inadvertently. In U-Boot, the boot count can be accessed with the fram command.