This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Is there a way to know if debug mode is enabled?

I don't find the information in the nRF51822 documentations and in this forum.

How can I know that? Is there some register to check, or some hints to know that debug mode is activated?

I am using nRF51822, softdevice S110, SDK10.

Long story

The reason of this question is because we put a big filtering capacitor on the power line. The module can run without battery during severals seconds when this capacitor is fully charged. The problem is that just after the module programmation: a simple reset is not enough because the chip stay in debug mode because the chip has not be completely powered off due to the capacitor. It is necessary to wait several seconds before plugging the final battery coin in order to be sure that the capacitor is completely uncharged and debug mode will no longer enabled when the battery will be in place.

In case of the debug mode would be still activated, I want to warn the operator (LED, buzzer) that there is a problem instead of consuming 1mA until battery die.

Any advices are welcome.

Thanks

Related