How to set the Arduino Portenta H7 to bootloader mode via software?

Hi everyone,

I am trying to flash the Portenta using a binary file I generate via dfu-utils. I am unable to figure out a way to set the Portenta to bootloader mode via software. I came across this which talks about using dfu-utils to flash but nothing about how to set it to bootloader mode. There is also [this] (Solved: STM32H747: How to start the system boot loader via... - STMicroelectronics Community) but I cannot understand this one and I don't think a complete solution is given either.

Would appreciate any help.