• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

src/11-Mar-2024-5037

CMakeLists.txtD11-Mar-2024253 106

README.rstD11-Mar-20242.5 KiB7655

prj.confD11-Mar-202486 54

sample.yamlD11-Mar-2024417 1817

README.rst

1.. _ipm_imx:
2
3i.MX IPM example
4################
5
6Overview
7********
8This simple example can be used with multicore i.MX SoCs containing a
9Messaging Unit peripheral. It reads the received data from the Messaging Unit
10using the IPM and transmits it back unchanged. The information about
11the received data is printed to the console. When sending the data back,
12it blocks until the data are read by the remote side.
13
14The i.MX Messaging Unit peripheral consists of four 32-bit transmit and receive
15registers. The sample uses the option :kconfig:option:`CONFIG_IPM_IMX_MAX_DATA_SIZE_4`,
16which effectively creates four IPM channels. Selecting the option
17:kconfig:option:`CONFIG_IPM_IMX_MAX_DATA_SIZE_8` or
18:kconfig:option:`CONFIG_IPM_IMX_MAX_DATA_SIZE_16` would result in two 64-bit channels
19or a single 128-bit channel respectively.
20
21Note that this is just a simple demo to demonstrate the i.MX IPM functionality
22and blocking sending of the data back is done in the interrupt handler, which
23would not be appropriate for a real world application.
24
25Building and Running the Zephyr Code
26************************************
27
28The sample requires that data are being sent by the remote core so it can echo
29it back. The other core is usually not running Zephyr but Linux on i.MX
30multicore processors.
31
32This project outputs data to the console.
33It can be built as follows:
34
35.. zephyr-app-commands::
36   :zephyr-app: samples/drivers/ipm/ipm_imx
37   :board: udoo_neo_full_m4
38   :goals: build flash
39   :compact:
40
41Follow the instructions in the :ref:`udoo_neo_full_m4` board documentation
42for how to load the Zephyr binary to the desired core and execute it.
43
44Building and Running the Linux Code
45***********************************
46
47The remote code is in the form of a loadable Linux kernel module. It creates
48four character devices /dev/mu0 till /dev/mu3, which are used to read data from
49and write data into the Messaging Unit.
50
51The remote code and the instructions how to build and run it are located at:
52
53https://source.codeaurora.org/external/imxsupport/imx-mu/
54
55Sample Output
56=============
57
58Typing this in the Linux console:
59
60.. code-block:: console
61
62     # cat > /dev/mu0
63     abcdefgh
64     ^D
65
66Results in the following output on the Zephyr side:
67
68.. code-block:: console
69
70    ***** Booting Zephyr OS v1.12.0-291-g8cc508b *****
71    IPM initialized, data size = 4
72    ipm_callback: id = 0, data = 0x03323130
73    ipm_callback: id = 0, data = 0x03353433
74    ipm_callback: id = 0, data = 0x03383736
75    ipm_callback: id = 0, data = 0x02000a39
76