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

Programatically set debug mode

Is there any way to programatically set the 51822 into debug mode following a power on reset, or disable pin reset in normal mode? 

Here is a synopsis of the issue:

Board design info:
1.) Intention was to use standard uUSB connector for both charging and programming interface.  Seems like a perfectly reasonable expectation, no?
2.) Board implemented to do so.  Uses USB signal pins for SWDIO & SWCLK.and PWR pins for charging.
Recent Findings:
1.) Off-the-shelf USB charges generally ground the signal pins, causing 51822 to be held in reset when chip is in normal mode.
2.) Programming leaves chip in debug mode with nReset disabled. Until a power loss there was no evidence of this issue.
3.) Once battery fully discharges, or board is power reset, chip is returned to normal mode when powered up, DIO pin becomes active nRESET.
4.) No known way to either a.) disable reset pin in normal mode, b.) reassign nRESET pin, or c.) programmatically set chip to debug mode.
5.) Reset register on/off only works in debug mode.
Current status:
1.) Presumably enable of POFCON will protect code/data on battery crashes.
2.) Prospective temporary work around (unacceptable for production) is to use data USB Isolators when charging.  Limited testing show this to be ~90% effective at preventing a hard reset when attaching a charger.  When it does cause a hard reset, the chip appears to reboots properly.
Long term fix, request for help:
1.). Seriously hoping Nordic can offer a way to either disable nRESET in normal mode, or reassign nRESETto different pin.  Otherwise the board will need to be redesigned to segregate charging and programming.
2.) Yet another costly board revision.
HELP PLEASE.
Parents Reply Children
Related