I'm using wiringPi for PWM on BCM18. I tried to use this to generate a STROBE-equivalent signal to turn ON the LED for the Camera Capture. My intention is to synchronize the LED-ON to shutter opening (note: LED-ON is BCM18 = 0). In order to do that, I need to re-sync the PWM reference point whenever I detect it going off-sync. For that I use pwmWrite() to redefine the new ON time. However, after several experiments I discovered that pwmWrite() does not change the duty-cycle immediately (i.e., does not restart PWM with new reference); instead it waits for the on-going cycle to be complete and then the new value is effected!! Using pwmSetClock() after pwmWrite() also did not yield the result I wanted - i.e., set the new PWM-Start reference with immediate effect on calling pwmWrite() WiringPi does not have a pwmDisable() and pwmEnable() calls that I can make use of. Anybody has tried this scheme and found any workaround ? Please please let me know of the tricks to circumvent the problem.
Thanks in advance - HC Srinivasa