AnsweredAssumed Answered

How To Use GPIO and CAN on i.MX8MM with Yocto

Question asked by Dave Nugent on Aug 7, 2019
Latest reply on Mar 13, 2020 by chayma hajjem



I am having a bit of trouble trying to control GPIO pins and CAN on the i.MX8MM with Yocto. I can control pins using:


echo XX > /sys/class/gpio/export


echo "out" > /sys/class/gpio/gpioXX/direction
echo "in" > /sys/class/gpio/gpioXX/direction


echo 1 > /sys/class/gpio/gpioXX/value
echo 0 > /sys/class/gpio/gpioXX/value


echo XX > /sys/class/gpio/unexport


But I have not been able to find any information on how to actually set an exposed pin (like on the J1003 header). The only information I have seen is to make sure the DTS file is correct, but not how to actually set it, and to use i.MX Pins Tool v6. When I try to select my board in i.MX Pins Tool v6 I get the error

"Disk operation error. Check disk space and write permissions for data folder C:\ProgramData\NXP\mcu_data_v6"

Which does not make sense because I have over 200GB of free space in that disk and no weird write permissions. So I am really not sure where to go for the GPIO.


With the CAN I am able to get it all configured in the kernel, set up the CAN bitrate and start it, but I have no idea how to actually send a message. Any help or links to information would be greatly appreciated.