This post was last edited by maskmoo on 2024-7-21 21:07
The heterogeneous core GPIO experiment uses RPMSG's heterogeneous core communication to implement the operation of sending control commands from the A55 core to the M33 core for control execution.
1 Modify the device tree
Modify the kernel device tree file imx93-11x11-atk.dts. Disable Linux's call to the LED driver, that is, assign the status attribute in the LED node to disabled.
The path of the imx93-11x11-atk.dts file is /arch/arm64/boot/dts/freescale/imx93-11x11-atk.dts
After the modification is completed, you need to recompile the device tree and replace the generated imx93-11x11-atk.dtb file into the Linux kernel.
cp imx93-11x11-atk.dtb /run/media/mmcblk0p1/
2 Program customization and modification
LED0 is connected to GPIO_IO04, so the pin multiplexing needs to be modified (the default SDK file has been modified).
3 Compile M33 core firmware
Enter the 01_rpmsg_rtos_tty_led project folder and execute the build_all.sh script to build the Cortex-M33 firmware file.
4 Loading M33 core firmware
cd /lib/firmware
modprobe imx_rpmsg_tty
./load_remoteproc.sh rpmsg_rtos_led_imxcm33.elf
5 Control Testing
The Cortex-A55 terminal executes the following instructions to control the onboard LED light.
Cortex-A55 终端执行以下指令点亮板载 LED 灯
echo "ON" > /dev/ttyRPMSG<num>
Cortex-A55 终端执行以下指令熄灭板载 LED 灯
echo "OFF" > /dev/ttyRPMSG<num>
During the A55 control process, the Cortex-M33 terminal will print relevant messages, and the controlled red LED will also light up and turn off normally.
rpmsg-led