zephyr/samples/drivers/eeprom
Henrik Brix Andersen 4828fa0649 samples: drivers: eeprom: fix spelling
Fix spelling in the EEPROM driver sample application.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2022-03-08 10:23:53 +01:00
..
boards board: gd32e103v_eval: add at24 eeprom. 2022-03-01 18:06:14 +01:00
src samples: drivers: eeprom: fix spelling 2022-03-08 10:23:53 +01:00
CMakeLists.txt cmake: increase minimal required version to 3.20.0 2021-08-20 09:47:34 +02:00
prj.conf
README.rst samples: eeprom: add gd32f450i_eval board 2022-01-14 10:42:24 -06:00
sample.yaml samples: eeprom: add gd32f450i_eval board 2022-01-14 10:42:24 -06:00

.. _samples_eeprom:

EEPROM Sample
#############

Overview
********

This sample demonstrates the EEPROM driver API in a simple boot counter
application.

Building and Running
********************

In case the target board has defined an EEPROM with alias ``eeprom-0`` the
sample can be built without further ado. This applies for example to the
:ref:`native_posix` board:

.. zephyr-app-commands::
   :zephyr-app: samples/drivers/eeprom
   :host-os: unix
   :board: native_posix
   :goals: run
   :compact:

Otherwise either a board specific overlay needs to be defined, or a shield must
be activated. Any board with Arduino headers can for example build the sample
as follows:

.. zephyr-app-commands::
   :zephyr-app: samples/drivers/eeprom
   :board: nrf52840dk_nrf52840
   :goals: build
   :shield: x_nucleo_eeprma2
   :compact:

For :ref:`gd32f450i_eval` board. First bridge the JP5 to USART with the jumper cap,
Then the sample can be built and executed for the  as follows:

.. zephyr-app-commands::
   :zephyr-app: samples/drivers/eeprom
   :board: gd32f450i_eval
   :goals: build flash
   :compact:

Sample Output
=============

.. code-block:: console

    Found EEPROM device "EEPROM_M24C02"
    Using eeprom with size of: 256.
    Device booted 7 times.
    Reset the MCU to see the inceasing boot counter.