How can I use Rpi GPIO Header of iMX93?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How can I use Rpi GPIO Header of iMX93?

跳至解决方案
1,459 次查看
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)

 

标记 (3)
0 项奖励
回复
1 解答
1,431 次查看
dpcivl
Contributor III
I found that those pins not working were used to do something else not for GPIO but SPI, SAI, CAN ...

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,432 次查看
dpcivl
Contributor III
I found that those pins not working were used to do something else not for GPIO but SPI, SAI, CAN ...
0 项奖励
回复