However there is also easy but destructive way, you can clear bootloader settings page containing firmware validity flag and checksum making the firmware invalid and then reboot. It should stay in DFU forever when there is no valid firmware.
E.setFlags({unsafeFlash:1});
var f=require("Flash");
f.erasePage(0x7f000);
E.reboot()
Make sure you know how to upload new firmware over BLE before trying.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
BTN1 is mapped to pin D0 https://github.com/espruino/Espruino/blob/master/boards/MDBT42Q.py#L80
However there is also easy but destructive way, you can clear bootloader settings page containing firmware validity flag and checksum making the firmware invalid and then reboot. It should stay in DFU forever when there is no valid firmware.
Make sure you know how to upload new firmware over BLE before trying.