Hi all, i'm using the Keyfobdemo on my cc2540 chip.
i want to set it into advertising mode for 10s, and after that i want to disable advertising and go into sleep mode.
For some reason i'm not able to disable advertising and so i cant go into sleep mode.
I tried it two ways.
first way:
I set the gapRole_AdvertOffTime to 10000 (10s) after enable advertising.
second way i set a timer to stop advertising:
osal_start_timerEx( keyfobapp_TaskID, STOPADVERTISING,10000);
if ( events & STOPADVERTISING)
{
uint8 advstat = FALSE;
GAPRole_SetParameter( GAPROLE_ADVERT_ENABLED, sizeof( uint8 ), &advstat ); // Stop Advertising
osal_start_timerEx( keyfobapp_TaskID, ADVERTISING,10000); // Restart Timer - Advertising after 60s
return ( events ^ ADVERTISING );
}
On my first way the CC2540 always stays in Advertising mode for some reason i dont know.
at the second way, after i disabled advertising the current consumption increases to 11,6 mA and stays in advertising mode.
Does anybody know why this issue appears and how to solve it?