Hi,
We are using atmega256rfr2 and LwMesh 1_2_1 stack.Now we configure our sleeping device(end device) with
Watchdog timer of 2 sec interval. One WDT interrupts get devices just wake up and called appsenddata() twice and got to sleep(
HAL_SLEEP()).. So the device alive only for 125uS. We are trying to read routing table entry to get next hop address(parent address of ED). But, most of the time the ED doesn't deliver the exact parent address(nearest parent address).When we disable the WDT the ED send exact parent address. What to do to get the exact parent address with WDT interval of 2sec/4sec.
The configuration for End device :
#define APP_SENDING_INTERVAL 2000
#define NWK_ROUTE_DEFAULT_SCORE 1
#define NWK_ROUTE_DISCOVERY_TIMEOUT 200
[/b]
changed the sleep function in
HAL_Sleep() function and the code is :
void HAL_Sleep(uint32_t interval)
{
halSleepTimerEvent = false;
set_sleep_mode(SLEEP_MODE_PWR_DOWN);
cli();
while(1){
sleep_enable();
sei();
sleep_cpu();
sleep_disable();
if(halSleepTimerEvent){
return;
}
}
ISR(WDT_vect){
halSleepTimerEvent=true;
//WDT_Stop();
}