1.. zephyr:code-sample:: ipm-esp32
2   :name: IPM on ESP32
3   :relevant-api: ipm_interface
4
5   Implement inter-processor mailbox (IPM) between ESP32 APP and PRO CPUs.
6
7Overview
8********
9This simple example can be used with multicore ESP32 Soc, and demonstrates
10the software intercore messaging mechanism to be used in AMP applications.
11
12ESP32 has two CPU named APP and PRO, in this simple example PRO send a
13message to the APP using the IPM driver, and waits for the APP response
14message and prints its contents on console.
15
16ESP32 intercore messaging has up two four channels, the 0 and 1 are
17reserved for BT and WIFI messages, and channels 2 and 3 is free to
18any application, each channel supports up to 64 bytes of data per
19message, so high level protocol is responsible to fragment larger
20messages in chunks of 64 bytes.
21
22Building and Running the Zephyr Code
23************************************
24
25Build the ESP32 IPM sample code as follows:
26
27.. zephyr-app-commands::
28   :zephyr-app: samples/drivers/ipm/ipm_esp32
29   :board: esp32s3_devkitm/esp32s3/procpu
30   :west-args: --sysbuild
31   :goals: build
32   :compact:
33
34Sample Output
35*************
36
37To check the output of this sample, run ``west espressif monitor`` or any other serial
38console program (e.g., minicom, putty, screen, etc).
39
40.. code-block:: console
41
42   *** Booting Zephyr OS build v4.0.0-rc2-61-ga24efebe15e2 ***
43   PRO_CPU is sending a request, waiting remote response...
44   PRO_CPU received a message from APP_CPU : APP_CPU uptime ticks 502
45   PRO_CPU is sending a request, waiting remote response...
46   PRO_CPU received a message from APP_CPU : APP_CPU uptime ticks 10502
47   PRO_CPU is sending a request, waiting remote response...
48   PRO_CPU received a message from APP_CPU : APP_CPU uptime ticks 20503
49   PRO_CPU is sending a request, waiting remote response...
50   PRO_CPU received a message from APP_CPU : APP_CPU uptime ticks 30504
51   PRO_CPU is sending a request, waiting remote response...
52   PRO_CPU received a message from APP_CPU : APP_CPU uptime ticks 40505
53   PRO_CPU is sending a request, waiting remote response...
54   PRO_CPU received a message from APP_CPU : APP_CPU uptime ticks 50506
55   PRO_CPU is sending a request, waiting remote response...
56   PRO_CPU received a message from APP_CPU : APP_CPU uptime ticks 60507
57   PRO_CPU is sending a request, waiting remote response...
58   PRO_CPU received a message from APP_CPU : APP_CPU uptime ticks 70508
59