hi when we use SPI0_SCK and SPI1_MOSI as GPIO output function. these two pins output 10Hz(50mS high and 50 mS low)signal. when setting the GPIO low, there is one 7.5uS pulse output. please help to solve.
the version info: Jetpack 6.0 L4T36.3.0
the schematic:
the test sh shell:
while true
do
gpioset -m time -u 50000 /dev/gpiochip0 124=1
gpioset -m time -u 50000 /dev/gpiochip0 124=0
done
when I change the value 50mS to 25mS+75mS 40+60,5mS+5mS, the result are the same.
but when i enlarge the time value to 1S, it’s ok.
custom board.
I need one 10Hz signal output on Orin NX CPU module 91 &104 pin。 10Hz means 100mS time。I set the GPIO output 50mS high and 50mS low with the shell script. but when I measure the gpio signal with oscilloscope, there 's one redundant 7.5uS high pulse, I don’t need this. this pulse will lead the failure in EMC RE test.
It sounds like you want to generate 10Hz PWM signal with 50% duty cycle.
Have you tried using either PIN15/PIN32/PIN33 from 40-pins expansion header for this use case?
Yes,GPIO7/13 can. GPIO 14 for CPU fan. GPIO12 for M2M alert signal.
in my design, GPIO7 and 13 are used for other GPIO function.
For normal GPIO application, SPI0_SCK and SPI1_MOSI can output 50mS high and 50mS low signal.we haven’t other control method to solve this issue. We need your support.
Do you mean all of those 3 pins are occupied by other function?
I would suggest you switching the use case for the pins since controlling GPIO manually to get 10Hz signal may be not accurate.
copy that, we will re-compile the Image and check it.
if we swap the GPIO pin, we need re-design the schematic, and we have no time to do this.
I can change the GPIO(7/13) output PWM in new project.
SH shell:
while true
do
gpioset -m time -u 5000 /dev/gpiochip0 133=1
gpioset -m time -u 95000 /dev/gpiochip0 133=0
done
the signal pictures was shown upper.
when the GPIO output correctly, the shell need be repaired as follows:
while true
do
gpioset -m time -u 1000000 /dev/gpiochip0 133=1
gpioset -m time -u 1000000 /dev/gpiochip0 133=0
done