Friday, 20 August 2021 09:55

Current measurement guide: Measuring current with nRF52832 Engineering B and S132 v2.0.0-7.alpha

Outline

  • Errata affecting the current measurements
  • DCDC does not automatically switch off in System ON IDLE
  • NFCT can draw current when not enabled
  • Measurements
  • Results
  • Test setup: Power analyzer
  • Power Analyzer Measurements
  • Test setup: Oscilloscope and ampere-meter
  • Oscilloscope Measurements
Errata affecting the current measurements
###DCDC does not automatically switch off in System ON IDLE Please note.
The DCDC draws a base current while active. When the device load current is very low, this base current will be higher than the current saved by efficient buck regulation. The DCDC converter is therefore switched off by the hardware power management system when the load current is low. The Errata means the DCDC is not switched off when it should be, and its base current will impact the measurement of current when the device goes to low power modes.
In application code, you have the option to either turn on or off the DCDC. If the DCDC is on all the time for the Engineering B revision of the nrF52832, you will get the correct current consumption during radio and CPU activity, but too high consumption during low power modes. If you turn off the DCDC, you will see higher than expected average current for BLE events because the Radio and CPU peak currents are higher without the DCDC converter.
To overcome this issue some modifications to the application code need to be implemented to manually control the DCDC to be on when the Radio is on, and off when in low power modes.
Note: The DCDC is not on all the time the CPU is running. This will mean the CPU run current is higher than expected for the SoftDevice and the application. If the application executes code when measuring current, the CPU current will be higher than expected.
Instead of the regular sd_app_evt_wait() function called in the main loop in main.c, we can write a custom code that waits for an event, and then turns the DCDC on or off based on the radio state (on or off).
Replace the main for loop with this code:

for (;;)
{
do{
__WFE();
}while (!NRF_RADIO->POWER);
NRF_POWER->DCDCEN = 1;
NRF_TIMER0->TASKS_START = 1;
NRF_TIMER0->TASKS_STOP = 1;
do{
__WFE();
}while (NRF_RADIO->POWER);
NRF_TIMER0->TASKS_SHUTDOWN = 1;
NRF_POWER->DCDCEN = 0;
(void)sd_power_mode_set((nrf_power_mode_t) 1);
}


This code is only useful for doing current measurements and should not be used when developing an application....

继续阅读完整内容

请查看下方广告以解锁文章剩余内容

广告加载中...
Read 15198 times
 
Please support our site by viewing this advertisement.

Please support our site by viewing this advertisement

Free Content