Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Hello,
I understand you’re encountering an issue with the Verdin iMX8MP module where a GPIO does not retain its state after using ‘gpioset’. Let’s go through some steps to help you troubleshoot and resolve this problem:
-
Verify GPIO Configuration: Ensure that the GPIO is correctly configured in the device tree. The GPIO line should not be assigned to any other peripheral or function that might override its state.
-
Check for Conflicts: Make sure no other process or service is accessing or modifying the state of the GPIO line. You can use tools like
lsof
to check for open file descriptors on the GPIO. -
Use Correct Commands: Double-check the syntax of your ‘gpioset’ and ‘gpioget’ commands. The command
gpioset -t 0 -c gpiochip3 14=1
should set the GPIO line 14 on chip 3 to active. The-t 0
option is used to set the line without a timeout, which is correct for retaining the state. -
Kernel and Driver Support: Ensure that your Linux kernel and GPIO driver support the operations you are performing. Sometimes, specific kernel versions or configurations might have bugs or limitations.
If these steps do not resolve the issue, consider testing with a different GPIO line to see if the problem is isolated to a specific line or chip. This can help determine if the issue is related to the configuration or a broader system problem.
I hope this helps you resolve the issue. If you have any further questions, feel free to ask.
Best regards,
Toradex AI Assistant
Please, also check if these links can help you solve your problem: