Skip to main content
VSelv.11
Associate
October 23, 2020
Solved

Hi, I'm new to this SPC582BX. how to make LED blink with different delays? i used pal_lld_setpad and clearpad with delay. but board its continuous glow only. all files are added from component.h file. but still not work

  • October 23, 2020
  • 2 replies
  • 1028 views

..

    This topic has been closed for replies.
    Best answer by Giuseppe DI-GIORE

    Hello,

    In SPC5Studio there are several applications with do LED blinking.

    However in order to do LED blinking please see the code below

    Pin connected to LED has to be configured as GPIO push-pull

    /* Enable the interrupts */

     irqIsrEnable();

    for ( ; ; ) {

    pal_togglepad(<your port>, <your pin>);

    osalThreadDelayMicroseconds(<milliseconds>);

    }

    Regards,

    Giuseppe

    2 replies

    Giuseppe DI-GIORE
    ST Employee
    November 2, 2020

    Hello,

    In SPC5Studio there are several applications with do LED blinking.

    However in order to do LED blinking please see the code below

    Pin connected to LED has to be configured as GPIO push-pull

    /* Enable the interrupts */

     irqIsrEnable();

    for ( ; ; ) {

    pal_togglepad(<your port>, <your pin>);

    osalThreadDelayMicroseconds(<milliseconds>);

    }

    Regards,

    Giuseppe

    VSelv.11
    VSelv.11Author
    Associate
    November 3, 2020

    Hi,

    It works. Thanks Giuseppe

    Regards,

    Rocky