Bill Of Materials And Hardware Setup - SmartAsphalt159/smart_asphalt GitHub Wiki

Bill of Materials


Setting Up PWM Pins Jetson Nano

Steps to configure the GPIO pins to PWM format.

  1. On the Jetson it seems there are two main pins that are preconfigured to support PWM, those being pins 32 and 33, which are referred to as pwm0 and pwm2. To enable these pins you will need to run Jetson-IO by running sudo /opt/nvidia/jetson-io/jetson-io.py. If more PWM pins are desired are desired and expansion board may be needed.

This is the Screen you will get (use arrow keys to scroll between options/space bar to select an option) Jetson io config menu if missing refer to video

  1. Select Configure 40-Pin Expansion Header, which will bring up this menu. (Press space bar on options you wish to enable) If Image Missing Please refer to videos in references for a visual guide

You can enable the PWM pins that you desire, but there are only two options.

  1. You will be prompted to reboot to enable the configuration so make sure to do that and also save any information on your Jetson model.
  2. To test pwm the code from Link to example PWM code You may need to modify the code depending on what pins are used and the desired frequency.
  3. Video tutorial of similar process is available for setup Card Installation Youtube Video, quite long so just skip around to the parts you need.

Reference Links

[1]. https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/hw_setup_jetson_io.html (hardware pin config reference)

[2]. https://github.com/NVIDIA/jetson-gpio/blob/master/samples/simple_pwm.py (pwm example code)

[3]. https://www.youtube.com/watch?v=eImDQ0PVu2Y (Youtube tutorial)