I'm porting my application sofware based on CC-MAC to TI-MAC 1.2.1.
In my old software I have had some problems (freeze of sw execution) related to power modes and sleep. I have solved these problems following the DN106 design note rules for managing the low consumption power modes.
Now after porting to TI-MAC 1.2.1 these problems are newly apperead!
My software does this:
after initialization it try to find a valid coordinator, if it fails goes in PM2 for about 3 minutes, after that it wakes up and repeat the same operations.
The power saving is enabled during sw initialization: osal_pwrmgr_device(PWRMGR_BATTERY);
The PM2 is entered in this way:
osal_pwrmgr_task_state( osal_self(), PWRMGR_CONSERVE );
osal_start_timer( APP_EVENT_T1, CFG.INACTIVE_SLEEP_T1 ); CFG.INACTIVE_SLEEP_T1 is equals to 30000ms ( a counter let me to repeat this 6 times: 30sx6 = 180s= 3 minutes).
The code works fine but sometimes the software execution freezes, my question is why this happen?
Note that the halsleep function in hal_sleep.c file of TI-MAC seems to apply the DN106 design note rules as regards the power mode entering and oscillator settings.
The RC oscillator settings before entering PM2 haven't to be performed by application sofware because this is done directly by halsleep function.
void halSleep( uint16 osal_timeout )
Do you have any ideas? Thanks in advance.