| Module: | ilumi H52 BLE module (nRF52832) |
| SDK: | nRF5_SDK_15.2.0_9412b96 |
| Softdevice: | 132_nrf52_6.1.0_softdevice.hex |
| Compiler: | gcc version 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907] (15:7-2018-q2-4) |
Hello,
I'm working with ble_central/ble_app_uart_c example and want to shutdown the device to save power.
nrf_ble_scan_stop(); nrf_gpio_cfg_sense_input(9, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW); err_code = sd_power_system_off(); APP_ERROR_CHECK(err_code);
This code seems to work fine. After inserting the command "nrf_ble_scan_stop()" current consumtion dropped down to 0.5 µA. That's pretty good for our application.
But after waking up the program should continue at the point where the shutdown occured instead of starting from reset state. So I tried to insert the following line:
NRF_POWER->RAMON |= (POWER_RAMON_OFFRAM0_RAM0On << POWER_RAMON_OFFRAM0_Pos) | \
(POWER_RAMON_OFFRAM1_RAM1On << POWER_RAMON_OFFRAM1_Pos);
nrf_ble_scan_stop();
nrf_gpio_cfg_sense_input(9, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW);
NRF_POWER->RAMON |= (POWER_RAMON_OFFRAM0_RAM0On << POWER_RAMON_OFFRAM0_Pos) | \
(POWER_RAMON_OFFRAM1_RAM1On << POWER_RAMON_OFFRAM1_Pos);
err_code = sd_power_system_off();
APP_ERROR_CHECK(err_code);
Unfortunately the result was a fatal error (RTT: <error> app: Fatal error). The device resets itself instantly after shutting down.
What could be wrong? Thank you in advance for your assistance.