Hello,
I use the adafruit-blinka library on Jetson TX2 for my project, it works with the Jetson.GPIO library.
Now I’m trying to turn on LEDs (using an additional circuit) - all LEDs can be switched on as long as the code is running.
Now my problem comes, as soon as the code has finished, some LEDs turn off, the others stay on.
code:
turn on all LEDs (all pins to HIGH)
Sleep for 10 seconds
LEDs Pins:
gpio398 (29) - is on while code is running (10 sec), off when it ends
gpio427 (23) - turns on with code and stays on gpio397 (13) - is on while code is running (10 sec), off when it ends
gpio396 (7) - turns on with code and stays on
gpio395 (35) - turns on with code and stays on
gpio394 (38) - turns on with code and stays on
gpio481 (18) - turns on with code and stays on
gpio392 (12) - turns on with code and stays on
gpio428 (21) - turns on with code and stays on
gpio429 (19) - turns on with code and stays on
gpio255 (15) - turns on with code and stays on
gpio389 (33) - turns on with code and stays on gpio297 (32) - is on while code is running (10 sec), off when it ends
gpio430 (24) - turns on with code and stays on
gpio254 (22) - turns on with code and stays on gpio393 (40) - is on while code is running (10 sec), off when it ends
Now my question:
How can I configure the GPIOs[gpio398 (29), gpio397 (13), gpio297 (32), gpio393 (40) ]so that they stay on?
so it’s the pin back to the default settings, you may have update the board configuration file to modify the default behavior.
please access pinmux spreadsheets to have customization,
please also check developer guide, To customize the pinmux spreadsheet for reference,
thanks
Why are the entries in the table “Pin State
after Pinmux
Config” in the “JetsonTX1_TX2_Developer_Kit_Carrier_Board_Specification.pdf” page 26 different from the entries in the “Jetson-TX2-Series-Pinmux-Template_3.21.xlsm” ?
Please see image - entries in pink have been added, these are default entries from the “Jetson-TX2-Series-Pinmux-Template_3.21.xlsm”
Thanks for pointing out that there is a new PDF version.
code:
turn on all LEDs (all pins to HIGH)
Sleep for 10 seconds ( → All LEDs are ON for 10 sec)
→ after code LEDs market yellow ON (e.g on Pin 12) and on Pins 13, 29, 32, 40 are OFF
Unfortunately I cannot see in the default settings: why e.g. pin 12 is HIGH (LED on), but pin 13, pin 29, pin 32, pin 40 are LOW (LED off). Except for the name, these have exactly the same default settings. Or am I missing something? What is the difference between these pins?
See picture - all pins are marked yellow that are HIGH after the code ran (LED ON). And on the side the notes for pins 12 (HIGH), 13, 29, 32, 40 (LOW).
since these pin works with the Jetson.GPIO library, may I know what’s the function calls your code did.
please also examine the pin state with # cat /sys/kernel/debug/gpio.
thanks
If I enter sudo cat /sys/kernel/debug/gpio in terminal I get the following back:
But I don’t see the gpio-numbers that belong to the 40 pin header.
gpiochip4: GPIOs 216-223, parent: platform/max77620-gpio, max77620-gpio, can sleep:
gpio-216 ( |external-connection:) in hi
gpio-221 ( |spmic_gpio_input ) in lo
gpio-222 ( |spmic_gpio_input ) in hi
gpiochip3: GPIOs 224-239, parent: i2c/0-0077, tca9539, can sleep:
gpio-227 ( |en-vdd-sys ) out lo
gpio-228 ( |lcd-bias-rails ) out hi
gpio-233 ( |en-vdd-cam ) out lo
gpio-234 ( |en-vdd-cam-1v2 ) out lo
gpiochip2: GPIOs 240-255, parent: i2c/0-0074, tca9539, can sleep:
gpio-240 ( |vdd-usb2-5v ) out hi
gpio-241 ( |en-vdd-ts-1v8 ) out hi
gpio-242 ( |en-vdd-ts-hv-3v3 ) out hi
gpio-243 ( |en-vdd-disp-3v3 ) out lo
gpio-244 ( |vdd-fan ) out hi
gpio-247 ( |en-mdm-pwr-3v7 ) out lo
gpio-249 ( |en-vdd-disp-1v8 ) out lo
gpio-250 ( |dis-vdd-1v2 ) out hi
gpio-252 ( |vdd-hdmi ) out hi
gpio-253 ( |en-vdd-cam-hv-2v8 ) out lo
gpiochip1: GPIOs 256-319, parent: platform/c2f0000.gpio, tegra-gpio-aon:
gpio-272 ( |temp-alert ) in hi
gpio-312 ( |Power ) in hi
gpio-313 ( |Volume Up ) in hi
gpio-314 ( |Volume Down ) in hi
gpio-315 ( |wifi-wake-ap ) in lo
gpio-316 ( |bt_host_wake ) in lo
gpiochip0: GPIOs 320-511, parent: platform/2200000.gpio, tegra-gpio:
gpio-381 ( |reset_gpio ) out lo
gpio-412 ( |vdd-usb0-5v ) out lo
gpio-413 ( |vdd-usb1-5v ) out lo
gpio-420 ( |eqos_phy_reset ) out hi
gpio-424 ( |wlan_pwr ) out hi
gpio-426 ( |camera-control-outpu) out lo
gpio-441 ( |hdmi2.0_hpd ) in lo
gpio-444 ( |wp ) in hi
gpio-445 ( |cd ) in hi
gpio-446 ( |en-vdd-sd ) out lo
gpio-456 ( |cam_pwdn_gpio ) out lo
gpio-457 ( |camera-control-outpu) out lo
gpio-461 ( |cam_reset_gpio ) out lo
gpio-479 ( |external-connection:) in hi
gpio-484 ( |bt_ext_wake ) out hi
why there’re so less info shown, I’m able to see all pin configurations.
for example, all those 4 pins were available if checking them via debug nodes.
I will rewrite my code in Jetson-GPIO only and reproduce that behavior, but first I have to understand Jetson-GPIO properly. For this I have opened a new forum post.