IMX8MP CAN Bus to be controller from CM7 MCU

Thank you for providing the system information! I can see you’re running TDX Wayland with XWayland RT version 6.5.0 on a Verdin iMX8M Plus with the Development Board, and that RemoteProc is already working correctly.

CAN1 Configuration for Cortex-M7

Since you have RemoteProc working and can communicate between cores, here’s how to proceed with CAN1 configuration:

1. Device Tree Overlay for HMP

For Verdin iMX8MP, Toradex provides a specific HMP (Heterogeneous Multicore Processing) overlay (1). You’ll need to enable the verdin-imx8mp_hmp_overlay.dts which is available in the toradex_6.6-2.2.x-imx branch and pre-compiled into your BSP (1).

2. Required Kernel Command Line Parameter

For RemoteProc to be functional on Verdin iMX8MP, you need a special kernel command line argument (1). Add the following command:

fw_setenv tdxargs "clk-imx8mp.mcore_booted=1"

(1), (2)

This ensures the clock configuration allows proper RemoteProc functionality (2).

3. Resource Domain Controller (RDC) Configuration

Since CAN1 is a shared peripheral, you need to ensure proper resource allocation between the Cortex-A53 (Linux) and Cortex-M7 cores. Your device tree overlay correctly disables CAN1 on the Linux side, which is the first step.

4. Firmware Development Considerations

For the Cortex-M7 firmware, you’ll need to:

  • Configure the CAN1 peripheral in your M7 application
  • Set up proper pin multiplexing for CAN1 pins
  • Ensure clock configuration matches the hardware setup
  • Handle CAN message processing in your real-time application

5. Device Tree Overlay Deployment

To deploy your overlay, you can use TorizonCore Builder or copy the compiled .dtbo file to the appropriate location and enable it in the overlays.txt file (3), (4).

Next Steps

  1. Enable the HMP overlay for your Verdin iMX8MP
  2. Ensure the kernel command line parameter is set
  3. Verify that CAN1 is properly disabled on the Linux side
  4. Configure CAN1 in your Cortex-M7 firmware
  5. Test the CAN communication from the M7 side

Which framework are you using for your Cortex-M7 development (FreeRTOS, Zephyr, or bare metal)? This will help me provide more specific guidance for the firmware implementation.

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.