Hi!
jn5169 I load an example from JN AN1184_ZBP_SleepingEndDevice.
I just can not understand how to make the microcontroller wake up after interrupting the DIO. By the timer, the device wakes up perfectly.
Add simple code in app_start_SED.c
#define APP_BUTTONS_BUTTON_SW19 (19)
#define APP_BUTTONS_DIO_MASK (1 << APP_BUTTONS_BUTTON_SW19)
PRIVATE void vSetUpWakeUpConditions(void)
{
DBG_vPrintf(TRACE_APP, "--- vSetUpWakeUpConditions ---\n");
vAHI_DioSetDirection(APP_BUTTONS_DIO_MASK,0); /* Set as Power Button(DIO19) as Input */
vAHI_DioWakeEdge(0, APP_BUTTONS_DIO_MASK); /* Set the wake up DIO Edge - Falling Edge */
vAHI_DioWakeEnable(APP_BUTTONS_DIO_MASK,0); /* Set the Wake up DIO Power Button */
}
.....
PWRM_CALLBACK(PreSleep)
{
DBG_vPrintf(TRACE_APP, "APP: Going to sleep (CB)\n");
vAppApiSaveMacSettings();
/* Disable UART */
//vAHI_UartDisable(E_AHI_UART_0);
vSetUpWakeUpConditions();
}
Please help me, what am I doing wrong?
All work, problem with pcb. Sorry/