How to reinitialize the pwm which triggers the camera

DRIVE AGX Xavier control cameras through pwm, but this pwm driver does not guarantee that the camera exposure is in sync with other sensors. So I want to reinitialize the pwm module to dynamically adjust the trigger time of camera exposure. How can I do to achieve this?

I’ve tried a lot of things and it doesn’t work, and I’ve read a lot of articles from this forums and can not find a way to solve it.

Part of articles I’ve read:

https://forums.developer.nvidia.com/t/tx2-4-r32-3-1-tegra-pwm6-missing/166775/29https://forums.developer.nvidia.com/t/can-fan-pwm-be-used-for-pulse-counting/58546/9

Now I am trying this method, but I encountered some problem.


When I write 0 to /sys/class/pwm/pwmchip1/export to reinitialized the pwmchip1, the Device or resource busy showed below.
image

Dear @alex.wu,
If the idea is to sync camera and other sensors, could you check if the discussion on Camera triggering based on Lidar Scan helps.

I’m sorry. I have read this topic and nothing helped.

@alex.wu
Please provide the following info by ticking the checkboxes:
Software Version
DRIVE OS Linux 5.2.6
DRIVE OS Linux 5.2.6 and DriveWorks 4.0
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version
other

Target Operating System
Linux
QNX
other

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
other

SDK Manager Version
1.8.3.10426
other

Host Machine Version
native Ubuntu 18.04
other

The corresponding information is as follows:

Software Version
NVIDIA DRIVE™ Software 10.0 (Linux)

Target Operating System
Linux

Hardware Platform
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)

SDK Manager Version
1.8.3.10426

Host Machine Version
native Ubuntu 18.04