| Electronics > Beginners |
| Lwmesh Power saving |
| << < (4/4) |
| Peili:
--- Quote from: ataradov on September 18, 2019, 05:20:50 am ---Ok, now do the same for all steps of the sending process and see what takes all this time. I don't know what could be taking that long. --- End quote --- Sir, i done the same step for all the process and the results are: * appSendData() takes 200microseconds * appInit() takes small amount But in my sleep condition, --- Code: --- case APP_STATE_PREPARE_TO_SLEEP: { PORTD&=~(1<<PD6); if(!NWK_Busy()){ NWK_SleepReq(); appState = APP_STATE_SLEEP; } } break; case APP_STATE_SLEEP: { PORTD|=(1<<PD6); HAL_Sleep(APP_SENDING_INTERVAL); appState = APP_STATE_WAKEUP; } break; --- End code --- takes 4 milliseconds.. The condition if(!NWK_Busy()) function is taking that much power consumption.. So the ON time of the device is about 4 milliseconds.. I checked the code and realize that a lock bit(nwkIb.lock) is checked during the condition and find that the lock bit is decrement when nwkDataReqConfirm() is called.. Is ma thoughts are correct? And how can i reduce that time? |
| ataradov:
Well, yes, this was to be expected. You need to do the same for the internals of the stack. Basically trace the path of the frame through the stack and see what steps of the sending process take this time. I would specifically start with PHY_DataReq() and PHY_DataConf() pair and extend outwards. |
| Navigation |
| Message Index |
| Previous page |