Require sample code or document for Cortex M7 to Cortex A linux communuication on Toradex Verdin imx8mp

Hello Team,

I am working on Toradex Verdin imx8MP SOM from Toradex… I wish to establish communication between Cortex M7 and Cortex A (linux running on A core). I downloaded SDK_25_03_00_MIMX8ML8xxxKZ and tried various sample code in it to establish communication with Cortex A….I have tried with various option with device tree… But I am getting only one data from Cortex M to A…. Contineous data I am not able to read… Can you please provide any working sample so that I can customize it as per my requirenment.

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


I’d be glad to help you establish communication between the Cortex-M7 and Cortex-A53 cores on your Verdin iMX8M Plus! First, could you let me know which OS and version you are running on the device? You can use the tdx-info command to get this information: tdx-info documentation.

Recommended Communication Method

For Verdin iMX8M Plus, RPMsg is the recommended method for inter-core communication(1). The Verdin iMX8M Plus features a Cortex-M7 processor that can run at up to 800 MHz alongside the main Cortex-A53 cores(2).

Working Sample Code Examples

Here are the proven working examples from the MCUXpresso SDK:

1. RPMsg String Echo Example

This example demonstrates continuous bidirectional communication(1):

Location: ./boards/evkmimx8mp/multicore_examples/rpmsg_lite_str_echo_rtos

Build Steps(1):

$ export ARMGCC_DIR=<PATH_TO_GCC_TOOLCHAIN>/<GCC_TOOLCHAIN_FOLDER>
$ cd armgcc/
$ ./build_debug.sh

2. RPMsg Ping Pong Example

This demonstrates request-response communication(1):

Location: ./boards/evkmimx8mp/multicore_examples/rpmsg_lite_pingpong_rtos

Device Tree Configuration

You need to apply the HMP device tree overlay for proper memory allocation(1):

Overlay: verdin-imx8mp_hmp_overlay.dtbo

The overlay configures shared memory regions at these addresses(1):

  • vdev0vring0: 0xb8000000
  • vdev0vring1: 0xb8008000
  • rsc_table: 0xb80ff000
  • vdevbuffer: 0xb8400000

Linux Side Setup

After booting Linux with the M7 firmware loaded, you’ll see(1):

# dmesg | grep -i rpmsg
[    0.045793] imx rpmsg driver is registered.
[    1.329068] virtio_rpmsg_bus virtio0: rpmsg host is online
[    1.329111] virtio_rpmsg_bus virtio0: creating channel rpmsg-virtual-tty-channel-1 addr 0x1e

Load the RPMsg TTY driver(1):

# sudo modprobe imx_rpmsg_tty

This creates the device node /dev/ttyRPMSG30 for continuous communication(1).

Continuous Data Exchange

For continuous data transfer, you can write to the device(1):

# echo Toradex! > /dev/ttyRPMSG30

The M7 side will receive continuous messages and can send responses back through the same channel(1).

Troubleshooting

If you’re only getting one data transfer, ensure:

  1. The HMP overlay is properly applied
  2. The RPMsg driver is loaded correctly
  3. Your M7 firmware is in a continuous loop for message handling

The working examples I’ve referenced should provide the foundation for continuous bidirectional communication between your Cortex-M7 and Cortex-A53 cores.

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.