快捷导航
Ni hao, hello,

we're trying to use the Jetson.GPIO Python library with the MIVII EVO Xavier. Unfortunately this does not work (out of the box). How can we use Python (and if possible the very useful Jetson.GPIO library (https:/ /github.com/NVIDIA/jetson-gpio)) with the new device?

This would in my opinion be a very useful addition for many customers to use the DI/DO ports with Python.

Best regards!
tfc.ai
举报 使用道具
| 回复

共 3 个关于本帖的回复 最后回复于 2021-2-9 17:45

贺老师 游客 发表于 2021-2-8 23:27 | 显示全部楼层
Hi

For DO port, the GPIO port on chip is mentioned here.
https://docs.miivii.com/product/ ... /03.interfaces.html
Since python library is also manipulate the device node, if the Jetson.GPIO is not written too bad, you should be able to use it. (But sorry we don't maintain it and can't check more.)
It's open drain, hardware connection should be mentioned.

For DI port, it should also work if Jetson.GPIO can manipulate the specific device node.
Pin mapping is also mentioned in the above link.

Our suggest procedure is:
https://docs.miivii.com/product/ ... ommon/02.EN_io.html
1. use the way manual mentioned, to make sure hardware connection is good.
2. use python to wrap device node operation

The repo you mentioned seems only for dev kit.
Since dev kit only have 1.8/3.3V gpio for test, and only little GPIO there, I'm not sure whether it can let you change GPIO pin freely.
miivii_tfc 游客 发表于 2021-2-9 12:57 | 显示全部楼层
Thank you for the quick response. With a little knowledge from your side I'm sure we could write a patch / pull request for the Jetson.GPIO software and also enable it for your MIIVII Evo Xavier.

If you look at https://github.com/NVIDIA/jetson ... IO/gpio_pin_data.py you can see that only little knowledge about the pinmux is required and the Jetson.GPIO support could be easily added for the benefit of a lot of your users. This is the required information according to the source code:
  1. # These arrays contain tuples of all the relevant GPIO data for each Jetson
  2. # Platform. The fields are:
  3. # - Linux GPIO pin number (within chip, not global),
  4. #   (map from chip GPIO count to value, to cater for different numbering schemes)
  5. # - Linux exported GPIO name,
  6. #   (map from chip GPIO count to value, to cater for different naming schemes)
  7. #   (entries omitted if exported filename is gpio%i)
  8. # - GPIO chip sysfs directory
  9. # - Pin number (BOARD mode)
  10. # - Pin number (BCM mode)
  11. # - Pin name (CVM mode)
  12. # - Pin name (TEGRA_SOC mode)
  13. # - PWM chip sysfs directory
  14. # - PWM ID within PWM chip
  15. # The values are used to generate dictionaries that map the corresponding pin
  16. # mode numbers to the Linux GPIO pin number and GPIO chip directory
复制代码


If you can provide me with this I can try to write and make available as Open Source the code for your users.
贺老师 游客 发表于 2021-2-9 17:45 | 显示全部楼层
miivii_tfc 发表于 2021-2-9 12:57
Thank you for the quick response. With a little knowledge from your side I'm sure we could write a p ...

Hi

Due to the Chinese festival, our company will on leave from 8th Feb to 18th Feb.
The following is per my understanding, we don't have engineer to check with Nvidia during the holiday.

# These arrays contain tuples of all the relevant GPIO data for each Jetson
# Platform. The fields are:
# - Linux GPIO pin number (within chip, not global),
#   (map from chip GPIO count to value, to cater for different numbering schemes)
It's mentioned here.
https://docs.miivii.com/product/ ... /03.interfaces.html

# - Linux exported GPIO name,
#   (map from chip GPIO count to value, to cater for different naming schemes)
#   (entries omitted if exported filename is gpio%i)
We didn't remap the name, not sure whether this is valid or not.

# - GPIO chip sysfs directory
This part is mentioned here.
https://docs.miivii.com/product/ ... ommon/02.EN_io.html

# - Pin number (BOARD mode)
# - Pin number (BCM mode)
# - Pin name (CVM mode)
# - Pin name (TEGRA_SOC mode)
# - PWM chip sysfs directory
# - PWM ID within PWM chip
# The values are used to generate dictionaries that map the corresponding pin
# mode numbers to the Linux GPIO pin number and GPIO chip directory
For this part, I'm sorry, we don't know what it means in this lib...
I checked the python code as well, but still don't know what Nvidia is saying.

您需要登录后才可以回帖 登录 | 点我注册

精彩推荐

  • MIIVII EVO ORIN的最新镜像中米文的源报404
  • 求助,储存空间不够,如何解决
  • APEX AD 10问题见图片
  • 相机启动launch
  • APEX AD-10 GPS授时修改串口波特率

明星用户