ENTS-tock
Environmental NeTworked Sensor firmware on Tock OS
Loading...
Searching...
No Matches
fram.h File Reference

Storage interface for onboard FRAM chips. More...

#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Typedefs

typedef uint32_t fram_addr
 

Enumerations

enum  fram_status {
  FRAM_OK = 0 , FRAM_ERROR = -1 , FRAM_OUT_OF_RANGE = -2 , FRAM_BUFFER_FULL = -3 ,
  FRAM_BUFFER_EMPTY = -4
}
 

Functions

fram_status fram_write (fram_addr addr, const uint8_t *data, size_t len)
 Write bytes at the given address.
 
fram_status fram_read (fram_addr addr, size_t len, uint8_t *data)
 Read bytes at the given address.
 
fram_addr fram_size (void)
 Get the total size of FRAM in bytes.
 

Detailed Description

Storage interface for onboard FRAM chips.

Ported from the baremetal STM32 HAL implementation in ENTS-node-firmware. Uses libtock-c I2C master API instead of HAL_I2C_Mem_Write/Read.

Datasheet: https://www.fujitsu.com/uk/Images/MB85RC1MT.pdf

Author
Pritish Mahato
Date
2026-02-25

Copyright (c) 2026 jLab, UCSC

Definition in file fram.h.