How can I use Rpi GPIO Header of iMX93?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can I use Rpi GPIO Header of iMX93?

Jump to solution
1,447 Views
dpcivl
Contributor III

Hello, I am currently working on a project with the iMX93 EVK board. I am trying to control an interface by running a blinking LED example, but I'm having trouble figuring out how to use the RPi GPIO header.

I suspect that the RPi GPIO header is associated with 'gpiochip2'. I tried using GPIO line 0, assuming it was related, but the LED didn't respond. I also tried changing the line to 17 (the BCM number), but that didn't work either. I ruled out a hardware issue because the LED lights up when I connect it directly to 3.3V.

Could you please guide me on how to resolve this issue? Which documentation should I refer to for more information?

Below is the Python code I executed:

import gpiod
from gpiod.line import Direction, Value
import time

LINE = 17

with gpiod.request_lines(
    "/dev/gpiochip2",
    consumer="blink-example",
    config={
        LINE: gpiod.LineSettings(
            direction=Direction.OUTPUT, output_value=Value.ACTIVE
        )
    },
) as request:
    while True:
        request.set_value(LINE, Value.ACTIVE)
        time.sleep(1)
        request.set_value(LINE, Value.INACTIVE)
        time.sleep(1)

 

Tags (3)
0 Kudos
Reply
1 Solution
1,419 Views
dpcivl
Contributor III
I found that those pins not working were used to do something else not for GPIO but SPI, SAI, CAN ...

View solution in original post

0 Kudos
Reply
1 Reply
1,420 Views
dpcivl
Contributor III
I found that those pins not working were used to do something else not for GPIO but SPI, SAI, CAN ...
0 Kudos
Reply