![Infineon SPI F-RAM FM33256B Manual Download Page 14](http://html1.mh-extra.com/html/infineon/spi-f-ram-fm33256b/spi-f-ram-fm33256b_manual_2055116014.webp)
Application Note
14 of 19
001-87564 Rev.*D
2021-06-01
A Design Guide to SPI F-
RAM™ Processor Companion
- FM33256B
Pseudo Code Examples
r e s t r i c t e d
10.3
Set VTP Voltage Detect Trip Point
/******************
Set VTP Voltage Detect Trip Point **********************/
// From the factory, VTP bits are cleared to 0. If user wants to set trip
point to
// the higher setting, then write VTP bits to 11b in Reg 18h control
register.
data[0] = 0x03;
// Data for setting both the VTP bits
WRITE_RTC (0x18,
// Sets the address pointer to Register 0Bh
data,
// Writes data 0x03 which sets the VTP bits
0x01);
// Number of bytes to be written
10.4
Read RTC Registers
/************************
Read RTC Registers *******************************/
// Step #1 Set R bit which takes snapshot of RTC registers
data[0] = 0x01;
// Data for setting the R bit
WRITE_RTC (0x00,
// Sets the address pointer to Register 00h
data,
// Writes data 0x01 which sets the R bit
0x01);
// Number of bytes to be written
// Step #2 Read RTC Registers
READ_RTC (0x02,
// Sets the address pointer to Register 02h
data,
// Data buffer to read RTC registers
0x07);
// Number of bytes to be read
// data buffer contains the following
// 0x59
–
Seconds
// 0x15
–
Minute
// 0x14
–
Hour
// 0x03
–
Third day of the week
// 0x04 - Fourth day in March
// 0x03 - March
// 0x08 - 2008
// Step #3 Clear R bit
data[0] = 0x00;
// data=0x00 clears the W bit
WRITE_RTC (0x00,
// Sets the address pointer to Register 00h
data
, //
Data=0x00 clears the R bit to allow RTC read next
time
0x01);
// Number of bytes to be written