Strange behaviour with Jetson Nano DevKit PWM signal

Hi Jacopo,
SW pinmux is looking fine. There is no issue from pinmux side.
Also, with servomotor, pwm signals are fine (means 3.3V going?)
For voltage confirmation: can you try below experiment?

  1. Do not use pin as PWM, keep it gpio
  2. short Pin 31 and 32
  3. echo 168 > /sys/class/gpio/export
  4. echo 200 > /sys/class/gpio/export
  5. echo out > /sys/class/gpio/gpio200/direction
  6. echo in > /sys/class/gpio/gpio168/direction
  7. echo 1 > /sys/class/gpio/gpio200/value
  8. cat /sys/class/gpio/gpio168/value
    ##check voltage at pin 32, it should be 3.3V
  9. echo 0 > /sys/class/gpio/gpio200/value
  10. cat /sys/class/gpio/gpio168/value
    ##check voltage at pin 32, it should be 0V
    Repeat from step 7 for 3-4 times.
    Let me know the results.
    If voltage is toggling perfectly, also you see PWM signals fine with servomotor, I suspect issue with camera voltage levels on Jetson.

Hi Shubhi,

I’m so sorry but I don’t understand well what I have to do.
I did the following in su mode and PWM disabled.

Screenshot from 2020-05-05 11-06-13

  1. Voltmeter to measure voltage on pin 32 (with GND)

  2. Voltmeter attached only after step 8 and 10 to check toggle.

     ~$ echo 168 > /sys/class/gpio/export
     ~$ echo 200 > /sys/class/gpio/export
     ~$ echo out > /sys/class/gpio/gpio200/direction
     ~$ echo in > /sys/class/gpio/gpio168/direction
     ~$ echo 1 > /sys/class/gpio/gpio200/value
     ~$ cat /sys/class/gpio/gpio168/value
     1
     ~$ echo 0 > /sys/class/gpio/gpio200/value
     ~$ cat /sys/class/gpio/gpio168/value
     1
     ~$echo 1 > /sys/class/gpio/gpio200/value
     ~$ cat /sys/class/gpio/gpio168/value
     0
     ~$ echo 0 > /sys/class/gpio/gpio200/value
     ~$ cat /sys/class/gpio/gpio168/value
     0
     ~$ echo 1 > /sys/class/gpio/gpio200/value
     ~$ cat /sys/class/gpio/gpio168/value
     0
     ~$ echo 0 > /sys/class/gpio/gpio200/value
     ~$ cat /sys/class/gpio/gpio168/value
     0
     ~$ echo 1 > /sys/class/gpio/gpio200/value
     ~$ cat /sys/class/gpio/gpio168/value
     0
     ~$ echo 0 > /sys/class/gpio/gpio200/value
     ~$ cat /sys/class/gpio/gpio168/value
     0
     ~$ echo 1 > /sys/class/gpio/gpio200/value
     ~$ cat /sys/class/gpio/gpio168/value
     0
    

(please note I finished test with echo 1)

  1. I have made this experiment more times in different moments and I can’t detect toggle, sometimes gpio168 value is 0 and sometimes 1, but I can’t note logic. However I can measure 3.3V at 1 and 0V at 0.
    Value of gpio168 toggles only if I try to change it long time later, not change in short time.

Here-after the output of later attempt, always continuing previous one:

~$ echo 0 > /sys/class/gpio/gpio200/value
~$ cat /sys/class/gpio/gpio168/value
1
~$ echo 1 > /sys/class/gpio/gpio200/value
~$ cat /sys/class/gpio/gpio168/value
0
~$ echo 0 > /sys/class/gpio/gpio200/value
~$ cat /sys/class/gpio/gpio168/value
1
~$ echo 1 > /sys/class/gpio/gpio200/value
~$ cat /sys/class/gpio/gpio168/value
1
~$ echo 0 > /sys/class/gpio/gpio200/value
~$ cat /sys/class/gpio/gpio168/value
1
~$ echo 1 > /sys/class/gpio/gpio200/value
~$ cat /sys/class/gpio/gpio168/value
1

I decided to test again with servomotor, so I successfully changed 0x700031fc value to 0x05 to enable PWM and servomotor works fine: I mean I can rotate it as I want (don’t know about voltage, if I attach oscilloscope in parallel I can’t detect signal in both device and oscilloscope). I tried to measure signal with oscilloscope, but nothing. Always same situation.

There is something strange, I can’t find the logic.
Maybe I did something wrong, so tell me please.

Thank you
Jacopo

Hello!

I’m wondering if you were able to reproduce my problem in another board, because there is something wrong with configuration in my opinion.
I don’t think in camera issue, because I can’t measure right pwm signal with oscilloscope and I can manage camera features with Raspberry (and NVIDIA itself compares its Jetson nano with it).
So, I really need well-working PWM and I can’t go on in my project. Next days I’ll install again OS in a SD Card and I’ll try again, waiting for a response from you (also last experiment by directly gpio using produced bad response).

Thanks for your help
Jacopo

Hi Jacopo,
Sorry for the late response. I cannot reproduce this rightnow due to lockdown.
But I would like to ask few questions:

  1. Are you saying that Pin 32 toggles but takes time to reflect correct value in voltmeter? It does not toggle within 2-3 seconds? If this is the case, can you tell me how long it approximately takes to toggle?
  2. If it does not toggle at all then it is serious issue with the pin.
    Can you please do one more experiment to debug further:
    do same experiment with
  3. pin 15 as output (GPIO=194) and pin 31 as input (GPIO=168)
  4. pin 33 as output(GPIO=38) and pin 31 as input (GPIO=168)

Pin 15, 32 goes through same level shifter and Pin 31,33 goes in other level shifter, if it is issue with level shifter then we will come to know with above test results.
Please let me know the results.

Thanks,
Shubhi

Hello!
Long time passed and hope you’re safe!
I’m not able to solve the problem yet.

So, I flashed a fresh new JetPack 4.4 on my Jetson SD card, hoping this could solve my issue, but It was a bust.

Researching on web and documentations, PWM should work with no problems.
Then, I think my Jetson Nano is faulty.

I ask you to try configuring PWM via jetson-io.py and generate simple signal (I know you’ve surely already tested), if you have no issues this could confirm my theory.
In this case could you replace my Jetson Nano? How?

Waiting for replay

Thank you

Jacopo

You can find the RMA process in jetson FAQ.

@Jacopo
Hi i had the same issue like you that no pwm output.
Did you solve it?
Hope your advice, thanks

Hello libsong,
I’m so sorry for my late reply.
Unfortunately I did not solve PWM issue.

Hello to everyone,

I did some attempts and I figured out my issue.

I bought a new Jetson Nano, and I immediately noted layout is difference from my other, so something is changed.
So, my following considerations are about 945-13450-0000-100 model of Jetson Nano.

The problem is always the same: no pwm signal producing.

Obviously pwm pin enabled with jetson-io.py

SUCCESSFUL ATTEMPT
I used BJT (simple BC547) with this configuration:

  • Collector connected to 5V
  • Base connected to pwm pin 32 with 10k ohm of R
  • Emitter to GND

I was able to correctly produce PWM signal with this configuration.

Measuring signal with oscilloscope (between Base and GND of Emitter), waveforms are clearly recognisable.

I tried with simple LED, next days I will prove with camera.

However, the behaviour of Jetson Nano is very different from Raspberry (which needs no BJT, but PWM pin generates right signal), and considering also this long period with no solution, I’m wondering if Jetson Nano PWM has to work in this way, or my solution is only a workaround.

Waiting for you response, and also ask for suggestions to use PWM with my camera

Thank you

Jacopo

1 Like

Hello I cannot use PWM to deam LED too, never with pin 33 nor 32 and activating PWM with jetson-io.py.

Do you have a solution ?

Hi trkodpd,

Please help to open a new topic if it’s still an issue.

Thanks