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?
Do not use pin as PWM, keep it gpio
short Pin 31 and 32
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
##check voltage at pin 32, it should be 3.3V
echo 0 > /sys/class/gpio/gpio200/value
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.
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:
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.
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).
Hi Jacopo,
Sorry for the late response. I cannot reproduce this rightnow due to lockdown.
But I would like to ask few questions:
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?
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
pin 15 as output (GPIO=194) and pin 31 as input (GPIO=168)
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.
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?
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