I would like to be able to provide a visual indicator such as a blinking LED when the chip is in the Emulated System OFF mode. Note that if the chip is in DEBUG mode and a System OFF command is issued, then the chip will go into emulated System OFF mode.
In the reference manual, it recommends putting an infinite loop right after the System OFF instruction so that "normal" code will not be accidentally be executed. Well, instead of a loop that does nothing I would like to put code there to blink an LED. But I tried using my normal application timers and it did not seem to work. I also tried using nrf_delay_ms() but that did not work either. I hoped it would work because the reference manual says that the following subsystems are still active during Emulated System OFF: DIF, CLOCK, POWER, NVMC,
MPU, CPU, CODE, and RAM. So my question: is it possible to do this, and if so what which type of timer is still functional in the emulated System OFF mode (a pointer to some sample code would be great!)? I am not using any soft device. Thanks!
Nowhere in that list does it say that GPIO is active in emulated system off mode so nrf_delay_ms will work but you may not be able to actually change the state of an IO line.
Actually I can still turn on the LED right after the System OFF command (or turn it off if it was previously on). So either GPIO is still working or there is a delay in activation of the System OFF.
well if the GPIOs are accessible and the processor is running the nrf_delay_ms will work, so you need to work out why it's not. It doesn't do anything except execute no-ops in a loop so there's no way it can't work.
What IDE are you programming with? Please see this link, and check if that solves your problem devzone.nordicsemi.com/.../
Also, I am not using an IDE. I am using armgcc with a Makefile.