Xavier NX GPIO Accurate

Hi everyone, I want to create a IO signal that will be HIGH for 1 ms and LOW for 99 ms but when I tried GPIO pins in Xavier NX it doesn’t work well. Signal width for 1 ms and frequency is not accurate, error is more than I expect due to real time system. I use this code:


echo 402 > /sys/class/gpio/export
echo “out” > /sys/class/gpio/gpio402/direction


while :
echo “On”
echo 0 > $trig_sig_1
sleep 0.001

echo "Off"
echo 1 > $trig_sig_1
sleep 0.099


hello maravich,

please try configure below clocks to get better GPIO performance.
for example,

root@tegra-ubuntu:/sys/kernel/debug/bpmp/debug/clk/axi_cbb# cat rate
root@tegra-ubuntu:/sys/kernel/debug/bpmp/debug/clk/axi_cbb# echo 409600000 > rate  #.. or whatever is the max rate
root@tegra-ubuntu:/sys/kernel/debug/bpmp/debug/clk/axi_cbb# echo 1 > mrq_rate_locked

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.