3 Replies Latest reply on Jan 23, 2017 4:11 PM by Intel Corporation

    How can I use the MCU to toggle GPIO pins faster?

    Steven______

      I've got the following application running on my MCU

       

      void mcu_main()

      {

        /* your configuration code starts here */

        gpio_setup(48, 1); /* set GPIO 48 as output */

        while (1)

        {

        gpio_write(48, 1);

        mcu_sleep(100); /* sleep 1 second */

        gpio_write(48, 0);

        mcu_sleep(100);

       

        gpio_write(48, 1);

        gpio_write(48, 0);

        }

      }

       

      The signal is constant for ~1 second as expected for the first two writes, but for the last two it takes 24us for the signal to go from high to low. What can I change to decrease this time?