samples/drivers/eeprom/README.html · samples/drivers/eeprom/README.rst 공식 원문 ↗

Zephyr 3.7.0 · Samples · Drivers · EEPROM

EEPROM Boot Counter

Alias·overlay·shield 세 구성 방식으로 EEPROM boot counter를 실행합니다.

Official pathsamples/drivers/eeprom/README.html
Source filesamples/drivers/eeprom/README.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

본문 기준: Zephyr 3.7.0 LTS3 · 이후 유지보수 패치는 별도입니다.

Part 1

요약·해설

native_sim, Arduino shield와 GD32 jumper 조건 및 전체 출력을 보존합니다.

Stored value

Boot count

Alias

eeprom-0

Example size

256 bytes

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 77B746B9EB209FC2A71108735DB46CE8690F28FD6766D0F91FEFCA5C2029BC16
.. zephyr:code-sample:: eeprom
   :name: EEPROM
   :relevant-api: eeprom_interface

   Store a boot count value in EEPROM.

Overview
********

This sample demonstrates the :ref:`EEPROM driver API <eeprom_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_sim` board:

.. zephyr-app-commands::
   :zephyr-app: samples/drivers/eeprom
   :host-os: unix
   :board: native_sim
   :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 increasing boot counter.

Part 3

한국어 전문 번역

개요

이 sample은 간단한 boot counter application에서 EEPROM driver API를 사용하는 방법을 보여줍니다.

Build와 실행

대상 board가 eeprom-0 alias를 사용하는 EEPROM을 정의했다면 추가 작업 없이 sample을 build할 수 있습니다. 예를 들어 native_sim board가 이에 해당합니다.

west build -b native_sim samples/drivers/eeprom
west build -t run

그렇지 않으면 board 전용 overlay를 정의하거나 shield를 활성화해야 합니다. Arduino header가 있는 board라면 다음 예와 같이 sample을 build할 수 있습니다.

west build -b nrf52840dk/nrf52840 --shield x_nucleo_eeprma2 samples/drivers/eeprom

gd32f450i_eval board에서는 먼저 jumper cap으로 JP5를 USART 쪽에 연결합니다. 그런 다음 다음과 같이 sample을 build하고 실행할 수 있습니다.

west build -b gd32f450i_eval samples/drivers/eeprom
west flash

Sample 출력

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

Source

출처

영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.