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?

Related