This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Any way to change reset pin configuration through the SoftDevice?

So I've been having issues with my debuggers where occasionally Keil will crash and I won't be able to reconnect to the debugger interface without a power cycle (might be a bug in the newest Segger drivers, 4.98e, not sure). Unfortunately, the prototypes we're testing with are now in enclosures and semi-final hardware, and power cycling the battery is annoying to say the least as it involves disassembling the hardware and will eventually also involve breaking glue joints.

The problem I've found is that the RESET pin configuration is left disabled and I can't reset the hardware in any way, and the debugger seems to refuse to connect to the chip in any way until a full reset (tried power cycling debuggers, restarting computer -- only thing that seems to consistently work has been power cycling the target hardware).

I have a side UART for other debug communications, and the workaround is a hard reset command that enables the watchdog and forces a reset through that, as according to the manual, this type of reset will also reset the power peripheral registers. I'd prefer not to continue doing this (as we'll be using the watchdog as an actual watchdog quite soon), but I can't access the NRF_POWER->RESET register while the SoftDevice is running.

Parents
  • Which versions of softdevice and SDK are you using? The latest version of softdevice does not protect the peripherals by default. Do you get an hardfault when you acess POWER->RESET register? If you are not writing to UICR->CLENR0 register explicitly, you should be able to access this register, you want to do a reset anyways so it is safe to assume that you do not care about softdevice state at that moment.

    If that does not work, then disable the softdevice sd_softdevice_disable and then access POWER->RESET register. softdevice_disable should unprotect the peripherals.

Reply
  • Which versions of softdevice and SDK are you using? The latest version of softdevice does not protect the peripherals by default. Do you get an hardfault when you acess POWER->RESET register? If you are not writing to UICR->CLENR0 register explicitly, you should be able to access this register, you want to do a reset anyways so it is safe to assume that you do not care about softdevice state at that moment.

    If that does not work, then disable the softdevice sd_softdevice_disable and then access POWER->RESET register. softdevice_disable should unprotect the peripherals.

Children
No Data
Related