Other Parts Discussed in Thread: SYSBIOS
Hello,
I want to sleep and wake up from delay or button pin interrupt. I start the firmware from Simplelink SDK Pin interrupt example NoRTOS.
The test firmware works like this : The Red LED toggle every 5 Seconds and the Blue LED toggle when I press the button.
But I expect the button interrupt to exit the MCU from the sleep function and works like this :
The Red LED toggle every 5 Seconds, the Blue LED toggle when I press the button then exit from sleep function, then toggle the Red LED and finally enter in the sleep(5) function.
At the end I want to replace the Red LED toggle by RxRf_300ms and The Blue LED Toggle by TxRf if fButtonInterrupt = 1
{
initButtonsInterrupt();
while(1)
{
sleep(5);
RedLedToggle();
}
}
void initButtonsInterrupt(void)
{
/* Setup callback for button pins */
if (PIN_registerIntCb(pinHandle, &buttonCb) != 0) {
/* Error registering button callback function */
while(1);
}
}
void buttonCb(PIN_Handle handle, PIN_Id pinId)
{
BlueLedToggle();
fButtonInterrupt = 1 ;
}