cancel
Showing results for 
Search instead for 
Did you mean: 

Smart Bluetooth

Anonymous
Not applicable

hi,

using pwm_tones.c as a starting point, i've created a very minimal app for my tag board -- one that just calls bleprofile_LEDOn() inside of my create() function....

to be certain the program would (in theory) run forever, i've embedded the call inside an infinite while loop that is manipulating a volatile variable....

what i notice, however, is that the LED only stays on for about a second; after this time, i notice a very quick flicker of the green LED associated with the UART download followed then by darkness....

is there something i need to do to keep this program running indefintely???

thanks, bob.

0 Likes
1 Solution
ShawnA_01
Employee

I wonder if you are getting bitten by the WatchDog... while(1) loops should be used with caution.

Reference Re: Wiced Smart Software Runtime -- Lots of Questions

View solution in original post

0 Likes
4 Replies
Anonymous
Not applicable

Hello Bob,

Can you include a code snippet?

Thanks

JT

0 Likes
Anonymous
Not applicable

again, taken from pwm_tones.c

as you can see, i'm simply trying to "run forever" with the LED turned on...

------------------------------ snip ----------------------------------------

APPLICATION_INIT()

{

    bleapp_set_cfg((UINT8 *)tones_gatt_database,

                   sizeof(tones_gatt_database),

                   (void *)&tones_cfg,

                   (void *)&tones_puart_cfg,

                   (void *)&tones_gpio_cfg,

                   tones_create);

}

void tones_create(void)

{

  volatile int dummy = 1;

    bleprofile_Init(bleprofile_p_cfg);

    bleprofile_GPIOInit(bleprofile_gpio_p_cfg);

    while (dummy = 1) bleprofile_LEDOn();

}

0 Likes
ShawnA_01
Employee

I wonder if you are getting bitten by the WatchDog... while(1) loops should be used with caution.

Reference Re: Wiced Smart Software Runtime -- Lots of Questions

View solution in original post

0 Likes
Anonymous
Not applicable

Hello bfrankel,

Did Shawn's WatchDog suggestion fix your issues?

Please let us know.

Thanks

JT

0 Likes