Hi,
I use JN5168 wireless module and I write codes inside it. I read data from an accelometer in every 100ms and I send data via wireless in every 60sec. My wireless communication spends 2-3 sec. for current consumpiton I want to turn off radio while 50 sec. And I want to turn on before sending.
I write my code on AN1180_154_HomeSensorEnd .
16Mhz
I use below code
if ( wirelessCommInProgress == FALSE && PowerChangeTime==TRUE ){
if ( Power== ON ){
vAppApiRestoreMacSettings();
}else {
vAppApiSaveMacSettings();
vAHI_ProtocolPower(FALSE);
}
}
After ProtocolPower(FALSE) funciton current decreases 1mA ( 3.5mA to 2.5mA) and after RestoreMacSettings I cant send datas any more.
1. Is there any trick for using this function ?
2. How can I turn off and turn on radio (not going to sleep)
3. Is there any apNote or demo code for JN5168 module power consumption ?
4. While co-ordinator is off. my end device always scanning for co-ordinator and spends 17mA. after protocolPower(FALSE) current reduces to 16mA.
Hi Erdem,
1. To turn on/off the radio, the above functions are correct (vAHI_ProtocolPower, vAppApiSaveMacSettings, vAppApiRestoreMacSettings); guidance on how to use these can be found in the JN-UG-3087 user guide, as well as, the example code attached.
2. The attached example code is based on the AN1180_154_HomeSensor-Demo Application; it sends data every 2 seconds and turns off the radio for around 1.5s between sending data. (Tested using the JN-SW-4163 SDK v1307).
3. This could be due to calling the function vAHI_ProtocolPower(FALSE) while the 802.15.4 MAC layer is active which can cause incorrect behaviour in the device (see function description in the JN-UG-3087 user guide). In the attached application, a change in current consumption of about 15mA was observed from when the end device is in doze and the radio off (~8mA) to when the radio is on and the end device is not in doze(~23mA).
4. "after RestoreMacSettings I cant send data any more"
More application context may need to be restored, for example, in the AN1180_154_HomeSensor-Demo Application attached, the end device needs to re-synchronise with the coordinator after the radio is turned back on, in order to continue sending data.
Regards,
Mario