1.. _x_nucleo_eeprma2_shield:
2
3X-NUCLEO-EEPRMA2 EEPROM memory expansion board
4##############################################
5
6Overview
7********
8
9The ST X-NUCLEO-EEPRMA2 expansion board can be used to evaluate M24xx series I2C
10and M95xx series SPI EEPROM devices.
11The X-NUCLEO-EEPRMA2 expansion board is compatible with the Arduino UNO R3
12connector pin assignment. Additionally the pins are routed to dedicated headers
13and ST morpho connectors can be mounted if required.
14
15The I2C EEPROMs are compatible with the ``atmel,at24`` driver and
16the SPI EEPROMs are compatible with the ``atmel,at25`` driver.
17
18.. figure:: x_nucleo_eeprma2.jpg
19   :align: center
20   :alt: X-NUCLEO-EEPRMA2
21
22More information about the board can be found at the
23`X-NUCLEO-EEPRMA2 website`_.
24
25Requirements
26************
27
28This shield can only be used with a development board that provides a
29configuration for Arduino connectors and defines a node alias for the
30SPI or I2C interface (see :ref:`shields` for more details).
31
32The SPI EEPROM devices can write protect complete memory blocks by setting
33the corresponding block protect bits in the status register.
34As the driver does not change this status register, make sure this protections
35are disabled in case writes to the EEPROM should be supported.
36
37For more information about interfacing the M24xx and M95xx series EEPROM devices
38and the X-NUCLEO-EEPRMA2 in particular, see these ST Microelectronics documents:
39
40- `X-NUCLEO-EEPRMA2 EEPROM memory expansion board User Manual`_
41
42- `M24C02-F Serial I2C bus EEPROM Datasheet`_
43- `M24256-DF Serial I2C bus EEPROM Datasheet`_
44- `M24M01-DF Serial I2C bus EEPROM Datasheet`_
45
46- `M95040-R Serial SPI bus EEPROM Datasheet`_
47- `M95256-DF Serial SPI bus EEPROM Datasheet`_
48- `M95M04-DR Serial SPI bus EEPROM Datasheet`_
49
50Samples
51*******
52
53The :zephyr:code-sample:`eeprom` sample can be used to demonstrate the expansion boards
54functionality.
55Per default the shield sets an ``eeprom-0`` alias for the M24C02-FMC6TG EEPROM,
56which can be overwritten to use the other EEPROM devices instead.
57
58Programming
59***********
60
61Set ``-DSHIELD=x_nucleo_eeprma2`` when you invoke ``west build``. For example:
62
63.. zephyr-app-commands::
64   :zephyr-app: samples/drivers/eeprom/
65   :board: nucleo_g0b1re
66   :shield: x_nucleo_eeprma2
67   :goals: build
68
69.. _X-NUCLEO-EEPRMA2 website:
70   https://www.st.com/en/evaluation-tools/x-nucleo-eeprma2.html
71
72.. _X-NUCLEO-EEPRMA2 EEPROM memory expansion board User Manual:
73   https://www.st.com/resource/en/user_manual/dm00671710-getting-started-with-the-xnucleoeeprma2-standard-ic-and-spi-eeprom-memory-expansion-board-based-on-m24xx-and-m95xx-series-for-stm32-nucleo-stmicroelectronics.pdf
74
75.. _M24C02-F Serial I2C bus EEPROM Datasheet:
76   https://www.st.com/resource/en/datasheet/m24c02-f.pdf
77
78.. _M24256-DF Serial I2C bus EEPROM Datasheet:
79   https://www.st.com/resource/en/datasheet/m24256-df.pdf
80
81.. _M24M01-DF Serial I2C bus EEPROM Datasheet:
82   https://www.st.com/resource/en/datasheet/m24m01-df.pdf
83
84.. _M95040-R Serial SPI bus EEPROM Datasheet:
85   https://www.st.com/resource/en/datasheet/m95040-r.pdf
86
87.. _M95256-DF Serial SPI bus EEPROM Datasheet:
88   https://www.st.com/resource/en/datasheet/m95256-df.pdf
89
90.. _M95M04-DR Serial SPI bus EEPROM Datasheet:
91   https://www.st.com/resource/en/datasheet/m95m04-dr.pdf
92