Tool/software: Code Composer Studio
SDK: Simplelink 3.30.xx
Hello,
I imported the sensor example code and I'm trying to gradually remove things I don't need from the code, but measuring the current consumption of the code posted below I saw a current bias of approximately 4mA.
I'm measuring the current using a small resistor coming from the GND and going to the GND of my board (of course, I removed every other source of current and jumpers).
Below, is the function Sensor_init. and Sensor_process.
void Sensor_init(uint8_t macTaskId) {
sem = ApiMac_init(macTaskId, CONFIG_FH_ENABLE);
Jdllc_init(&Sensor_macCallbacks, &jdllcCallbacks);
ApiMac_registerCallbacks(&Sensor_macCallbacks);
Ssf_init(sem);
ApiMac_mlmeSetReqUint8(ApiMac_attribute_phyCurrentDescriptorId, (uint8_t)CONFIG_PHY_ID);
ApiMac_mlmeSetReqUint8(ApiMac_attribute_channelPage, (uint8_t)CONFIG_CHANNEL_PAGE);
ApiMac_mlmeSetReqUint8(ApiMac_attribute_phyTransmitPowerSigned, (uint8_t)CONFIG_TRANSMIT_POWER);
ApiMac_mlmeSetReqUint8(ApiMac_attribute_backoffExponent, (uint8_t)CONFIG_MIN_BE);
ApiMac_mlmeSetReqUint8(ApiMac_attribute_maxBackoffExponent, (uint8_t)CONFIG_MAX_BE);
ApiMac_mlmeSetReqUint8(ApiMac_attribute_maxCsmaBackoffs, (uint8_t)CONFIG_MAC_MAX_CSMA_BACKOFFS);
ApiMac_mlmeSetReqUint8(ApiMac_attribute_maxFrameRetries, (uint8_t)CONFIG_MAX_RETRIES);
sendScanReq(ApiMac_scantype_active); // I'M SCANNING RIGHT HERE
}
void sensor_process(void) {
Jdllc_process();
if(sensor_events == 0) {
ApiMac_processIncoming();
}
}
// ......... //
// jdllc.c //
static void scanCnfCb(ApiMac_mlmeScanCnf_t *pData) {
ApiMac_mlmeSetReqBool(ApiMac_attribute_RxOnWhenIdle, CONFIG_RX_ON_IDLE);
}
I am using "TEST MODE" (so POWER_MEAS is defined) and my "CONFIG_RX_ON_IDLE == false" So I would expect a current < 1mA since the Sensor task will be Pending inside `ApiMac_processIncoming()` and the power policy is the standbyPolicy.
Why am I seeing a current of 4mA?