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

How to reset the MCU the same way as the pinreset command in Zephyr?

Hello,

I have a situation where I would like to reset the MCU (nRF52832) under Zephyr. For the most part I use ```sys_reboot(SYS_REBOOT_COLD)```. However, I would need a different kind of reset. Essentially, I would like to reproduce the "nrfjprog --pinreset" command. Is there a way to do that from the C code?

Thank you for any help.z

Best regards,

Parents
  • Hi,

    The only way to do a pin reset from firmware is to connect a GPIO to the reset pin and control it. That is possible, and is for instance done by the USB DFU trigger library in the nRF5 SDK, see <SDK>components\libraries\bootloader\dfu\nrf_dfu_trigger_usb.c. (I mention that as a reference even though it is a different SDK as the code itself here is trivial, just configuring a GPIO as output and clearing it).

    By the way, why do you need a pin reset? You can see how different resets behave differently in the reset behavior table.

Reply
  • Hi,

    The only way to do a pin reset from firmware is to connect a GPIO to the reset pin and control it. That is possible, and is for instance done by the USB DFU trigger library in the nRF5 SDK, see <SDK>components\libraries\bootloader\dfu\nrf_dfu_trigger_usb.c. (I mention that as a reference even though it is a different SDK as the code itself here is trivial, just configuring a GPIO as output and clearing it).

    By the way, why do you need a pin reset? You can see how different resets behave differently in the reset behavior table.

Children
Related