4 Replies Latest reply on May 30, 2014 8:40 AM by ArvindS_76

    Looking for suggestion for 100hz Pulse generating to GPIO on BCM20732S?

      I'm trying to generate 100 hz pulse with fixed duty cycle. I found there may have two methods:

      1.  write in main while loop and use a delay function as follows:


           gpio_setPinOutput(0, GPIO_PIN_LED, GPIO_PIN_OUTPUT_LOW);

           delay(300); //microsecond

           gpio_setPinOutput(0, GPIO_PIN_LED, GPIO_PIN_OUTPUT_HIGH);

           delay(9700); //microsecond


           I don't find there's a delay() function in SDK. would someone find any similiar function that can support to microsecond delay?


      2. use PWM pin, configure clock to 100 hz, then set duty cycle.


        Appricate any suggestion.