I am currently working with the i.MX8ULP EVK9 and attempting to read the status of a button present on the EVK. The button is connected to the GPIO pin PTE17_PTE17 (Switch 2). However, I am facing issues when trying to read or set the status of this pin using the gpioset and gpioget commands.
Here are the details of the commands and the errors encountered:
Command : gpioset /dev/gpiochip4 17=0
Error : gpioset: invalid line value: '/dev/gpiochip4' Command : gpioget 4 17
Error : gpioget: invalid line value: '4' gpioget: invalid line value: '17' Are there any other changes we are supposed to do in the DTSI file further?
HI @dhruvinrajpura!
Thank you for contacting NXP Support!
You are using wrong the commands.
To set a gpio you should use:
gpioset -c gpiochip4 17=0
gpioset -c gpiochip4 17=1
To get a value you should use:
gpioget -c gpiochip4 17
Best Regards!
Chavira
Hi @dhruvinrajpura!
You have to modify the device tree according to your needs.
You can refer to the next community post:
Best Regards!
Chavira