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

Zephyr 3.7.0 · Samples · Drivers · IPM

ARM MHU Dual-Core IPM

CPU 0·1 image를 결합해 MHU0 interrupt 왕복을 검증합니다.

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

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

Part 1

요약·해설

CPU별 build, srecord image 결합과 양쪽 ISR 출력을 보존합니다.

Unit

MHU0

CPUs

2

Image

Intel HEX

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 B5E7833D01C913F817E45A3772ABD67646703C8D0D382CF03DFC43D34C9BC3D4
.. zephyr:code-sample:: ipm-mhu-dual-core
   :name: IPM with ARM MHU
   :relevant-api: ipm_interface

   Implement inter-processor mailbox (IPM) using an MHU (Message Handling Unit)

Overview
********
An MHU (Message Handling Unit) enables software to raise interrupts to
the processor cores. This sample is a simple dual-core example for a
Musca A1 board that has two MHU units. This sample only test MHU0, the
steps are:

1. CPU 0 will wake up CPU 1 after initialization
2. CPU 1 will send to CPU 0 an interrupt over MHU0
3. CPU 0 return the same to CPU 1 when received MHU0 interrupt
4. Test done when CPU 1 received MHU0 interrupt

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

On Musca B1
-----------

This project outputs 'IPM MHU sample on musca_b1' to the console.
It can be built and executed on Musca B1 CPU 0 as follows:

.. zephyr-app-commands::
   :zephyr-app: samples/drivers/ipm/ipm_mhu_dual_core
   :board: v2m_musca_b1/musca_b1
   :goals: run
   :compact:

This project outputs 'IPM MHU sample on v2m_musca_b1_ns' to the console.
It can be built and executed on Musca B1 CPU 1 as follows:

.. zephyr-app-commands::
   :zephyr-app: samples/drivers/ipm/ipm_mhu_dual_core
   :board: v2m_musca_b1/musca_b1/ns
   :goals: run
   :compact:

Combine images for Musca
========================

A third-party tool (srecord) is used to generate the Intel formatted hex image.
For more information refer to the `Srecord Manual`_.

.. code-block:: bash

   srec_cat zephyr.bin -Binary -offset $IMAGE_OFFSET zephyr_nonsecure.bin -Binary -offset $IMAGE_NS_OFFSET -o dual_core_zephyr.hex -Intel

   # This command is an example for Musca B1
   srec_cat zephyr.bin -Binary -offset 0xA000000 zephyr_nonsecure.bin -Binary -offset 0xA060400 -o dual_core_zephyr.hex -Intel

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.

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

.. code-block:: console

   ***** Booting Zephyr OS zephyr-v1.13.0-3378-g3625524 *****
   IPM MHU sample on musca_a
   CPU 0, get MHU0 success!
   ***** Booting Zephyr OS zephyr-v1.13.0-3378-g3625524 *****
   IPM MHU sample on musca_a_nonsecure
   CPU 1, get MHU0 success!
   MHU ISR on CPU 0
   MHU ISR on CPU 1
   MHU Test Done.


.. _Srecord Manual:
   https://srecord.sourceforge.net/man/man1/srec_cat.1.html

Part 3

한국어 전문 번역

개요

MHU(Message Handling Unit)는 software가 processor core에 interrupt를 발생시킬 수 있게 합니다. 이 sample은 MHU unit 두 개를 가진 Musca A1 board용 간단한 dual-core 예제입니다. Sample은 MHU0만 시험하며 단계는 다음과 같습니다.

  1. 초기화 뒤 CPU 0이 CPU 1을 깨웁니다.
  2. CPU 1이 MHU0를 통해 CPU 0에 interrupt를 보냅니다.
  3. CPU 0은 MHU0 interrupt를 받으면 같은 방식으로 CPU 1에 돌려보냅니다.
  4. CPU 1이 MHU0 interrupt를 받으면 시험이 끝납니다.

Build와 실행

Musca B1에서 실행

이 project는 console에 IPM MHU sample on musca_b1을 출력합니다. Musca B1 CPU 0용으로 다음과 같이 build하고 실행할 수 있습니다.

west build -b v2m_musca_b1/musca_b1 samples/drivers/ipm/ipm_mhu_dual_core
west build -t run

이 project는 console에 IPM MHU sample on v2m_musca_b1_ns를 출력합니다. Musca B1 CPU 1용으로 다음과 같이 build하고 실행할 수 있습니다.

west build -b v2m_musca_b1/musca_b1/ns samples/drivers/ipm/ipm_mhu_dual_core
west build -t run

Musca용 Image 결합

Third-party tool인 srecord를 사용해 Intel 형식 hex image를 생성합니다. 자세한 내용은 Srecord Manual을 참조하십시오.

srec_cat zephyr.bin -Binary -offset $IMAGE_OFFSET zephyr_nonsecure.bin -Binary -offset $IMAGE_NS_OFFSET -o dual_core_zephyr.hex -Intel

# This command is an example for Musca B1
srec_cat zephyr.bin -Binary -offset 0xA000000 zephyr_nonsecure.bin -Binary -offset 0xA060400 -o dual_core_zephyr.hex -Intel

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

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

Board를 reset하면 해당 serial port에 다음 message가 나타납니다.

Sample 출력

***** Booting Zephyr OS zephyr-v1.13.0-3378-g3625524 *****
IPM MHU sample on musca_a
CPU 0, get MHU0 success!
***** Booting Zephyr OS zephyr-v1.13.0-3378-g3625524 *****
IPM MHU sample on musca_a_nonsecure
CPU 1, get MHU0 success!
MHU ISR on CPU 0
MHU ISR on CPU 1
MHU Test Done.

Source

출처

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