Uncategorized

SK-AM62A-LP: GPIO Access using python. – Processors forum – Processors


Part Number: SK-AM62A-LP

When I am using TI.GPIO module in python, I am getting following error.

root@am62axx-evm:/opt/ti-gpio-py/samples# python3 test_all_pins.py
Traceback (most recent call last):
File "/opt/ti-gpio-py/samples/test_all_pins.py", line 27, in <module>
import RPi.GPIO as GPIO
File "/usr/lib/python3.10/site-packages/RPi/GPIO/__init__.py", line 1, in <module>
from TI.GPIO import *
File "/usr/lib/python3.10/site-packages/TI/GPIO/__init__.py", line 1, in <module>
from .gpio import *
File "/usr/lib/python3.10/site-packages/TI/GPIO/gpio.py", line 74, in <module>
model, BOARD_INFO, _channel_data_by_mode = gpio_pin_data.get_data()
File "/usr/lib/python3.10/site-packages/TI/GPIO/gpio_pin_data.py", line 253, in get_data
raise Exception('Could not determine TI SOC model')
Exception: Could not determine TI SOC model

Later I have gone through this thread https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1282941/sk-am62a-lp-could-not-determine-ti-soc-mode-with-gpio-python3 
It says about the transition of GPIO userspace interface from SYSFS to Chardev.

Now how can I access GPIO Pins in python?
It is working fine in the terminal, but i want it in python.

NOTE: 
I am using YOCTO Build. If it is needed to add different packages to get TI.GPIO, I can do it.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *