/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / LEDs blinking issue

Username:     
Password:     
             

Forum

# 1   2010-06-01 14:19:17 LEDs blinking issue

clemzzz
New member
From: Grenoble - FRANCE
Registered: 2010-05-10
Posts: 5

LEDs blinking issue

Hi,
I noticed something with the 2 controllable LEDs.

When I set them to "blinking" mode, it's not blinking when another program is running.

For instance : I'd like to make the green led blink when data is received (via IR). As I wait, it's not blinking.

Code:

enum MENU_code fRecv()
    {
    int i;
    LED_Set(LED_GREEN,LED_BLINKING_HI);
    DRAW_DisplayString(5,5,"Receiving...", 13);
     
    wait(5);    //wait for 5 seconds
    
    LED_Set(LED_GREEN,LED_OFF);
    DRAW_Clear();
    return Application_Ini();
    }

Maybe is it dealing with the active/passive waiting...
Do you have any idea of how I could do ?

Thanks

clemzzz

Offline

 

# 2   2010-06-01 14:29:05 LEDs blinking issue

ntrf.zns
Member
From: Belgorod, Russia
Registered: 2009-11-01
Posts: 134

Re: LEDs blinking issue

Use time check in application handler instead of wait. While 'Wait'ing you only allowing system to execute application handler so led handler never gets executed.

Use time checks or interrupts!
(it will also save your battery)

Offline

 

# 3   2010-06-02 10:19:37 LEDs blinking issue

clemzzz
New member
From: Grenoble - FRANCE
Registered: 2010-05-10
Posts: 5

Re: LEDs blinking issue

thank you, i'll try it !

clemzzz

Offline

 

# 4   2010-06-03 06:20:03 LEDs blinking issue

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: LEDs blinking issue

Effectively, the instruction LED_Set only changes the functionning mode of the LEDs. The blink of the LEDs is done by the LED handler. If your application does not give the hand to CircleOS, the LED will not blink.

Offline

 

Board footer