Can't enter in serial recovery mode (mcuboot) for serial DFU using button switch and sys_reboot() function

I developed an applicatfion with the Serial Recovery Mode (SRM) for serial DFU following this example. My custom board has only one switch button then I created a routine that, if the button is pressed more than 5 seconds, executes the sys_reboot() function. That button is the same to activate the SRM so I expect that after reboot, since the button is still pressed, the application enter in SRM. But when I press the button for more than 5 seconds the application restart but it can't start the SRM.

Is it mandatory restart the system through P0.18/Reset pin or perform a complete power-up cycle to start the SRM?

Parents Reply Children
  • Ok. I asked cause if I keep connected the J-Link programmer to my custom board (SWDCLK, SWDIO, RESET pins) and then I press the button like described above, it works and the system restats in SRM. But if I disconnect the J-Link the system restart but doesn't start the SRM. Can you explain it?

    EDIT: I fount that it works also if I connect and then disconnect the J-Link. I nedd to connect to one time the J-Link to make it work. I also noticed that after I reset the system via reset pin the routine above works! Why?

Related