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

Zephyr 3.7.0 · Samples · Drivers · Mailbox

MBOX

APP·NET core와 simulated nRF5340에서 channel 0·1 교환을 확인합니다.

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

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

Part 1

요약·해설

Sysbuild, serial 115200 8N1, 두 core 출력과 bsim 실행 명령을 보존합니다.

Cores

APP · NET

Channels

0 · 1

Boards

nRF5340 DK · bsim

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 03D9C65625285C260C47AB2F892C36E7280AC65F580FBEB86794157EA334613D
.. zephyr:code-sample:: mbox
   :name: MBOX
   :relevant-api: mbox_interface

   Perform inter-processor mailbox communication using the MBOX API.

Overview
********

This sample demonstrates how to use the :ref:`MBOX API <mbox_api>`.

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

The sample can be built and executed on boards supporting MBOX.

Building the application for nrf5340dk/nrf5340/cpuapp
*****************************************************

.. zephyr-app-commands::
   :zephyr-app: samples/drivers/mbox/
   :board: nrf5340dk/nrf5340/cpuapp
   :goals: debug
   :west-args: --sysbuild

Open a serial terminal (minicom, putty, etc.) and connect the board with the
following settings:

- Speed: 115200
- Data: 8 bits
- Parity: None
- Stop bits: 1

Reset the board and the following message will appear on the corresponding
serial port, one is the application (APP) core another is the network (NET)
core:

.. code-block:: console

   *** Booting Zephyr OS build zephyr-v3.1.0-2383-g147aee22f273  ***
   Hello from APP
   Pong (on channel 0)
   Ping (on channel 1)
   Pong (on channel 0)
   Ping (on channel 1)
   Ping (on channel 1)
   Pong (on channel 0)
   Ping (on channel 1)
   Pong (on channel 0)
   Ping (on channel 1)
   ...


.. code-block:: console

   *** Booting Zephyr OS build zephyr-v3.1.0-2383-g147aee22f273  ***
   Hello from NET
   Ping (on channel 0)
   Pong (on channel 1)
   Ping (on channel 0)
   Pong (on channel 1)


Building the application for the simulated nrf5340bsim
******************************************************

.. zephyr-app-commands::
   :zephyr-app: samples/drivers/mbox/
   :host-os: unix
   :board: nrf5340bsim/nrf5340/cpuapp
   :goals: build
   :west-args: --sysbuild

Then you can execute your application using:

.. code-block:: console

   $ ./build/zephyr/zephyr.exe -nosim
   # Press Ctrl+C to exit

You can expect a similar output as in the real HW in the invoking console.

Part 3

한국어 전문 번역

개요

이 sample은 MBOX API를 사용하는 방법을 보여줍니다.

Build와 실행

MBOX를 지원하는 board에서 sample을 build하고 실행할 수 있습니다.

nrf5340dk/nrf5340/cpuapp용 application build

# From the root of the zephyr repository
west build -b nrf5340dk/nrf5340/cpuapp --sysbuild samples/drivers/mbox/
west debug

Minicom이나 PuTTY 같은 serial terminal을 열고 다음 설정으로 board에 연결합니다.

  • Speed: 115200
  • Data: 8 bits
  • Parity: None
  • Stop bits: 1

Board를 reset하면 해당 serial port 두 곳에 다음 message가 나타납니다. 하나는 application(APP) core이고 다른 하나는 network(NET) core입니다.

*** Booting Zephyr OS build zephyr-v3.1.0-2383-g147aee22f273  ***
Hello from APP
Pong (on channel 0)
Ping (on channel 1)
Pong (on channel 0)
Ping (on channel 1)
Ping (on channel 1)
Pong (on channel 0)
Ping (on channel 1)
Pong (on channel 0)
Ping (on channel 1)
...
*** Booting Zephyr OS build zephyr-v3.1.0-2383-g147aee22f273  ***
Hello from NET
Ping (on channel 0)
Pong (on channel 1)
Ping (on channel 0)
Pong (on channel 1)

Simulation된 nrf5340bsim용 application build

# From the root of the zephyr repository
west build -b nrf5340bsim/nrf5340/cpuapp --sysbuild samples/drivers/mbox/

그런 다음 다음 명령으로 application을 실행할 수 있습니다.

$ ./build/zephyr/zephyr.exe -nosim
# Press Ctrl+C to exit

명령을 실행한 console에서 실제 hardware와 비슷한 출력을 확인할 수 있습니다.

Source

출처

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