I flash the Spark Core a lot. I do work locally and would love to attach one extra button which triggers the DFU mode. So, can DFU mode be initiated from code?
When the Core boots up, the first thing that runs is the bootloader. Based on the state of the button and a handful of system flags, it decides what to do next. To get it to jump into DFU mode, the FLASH_OTA_Update_SysFlag has to have a value that gets to the last else statement here, and zero is a good value to choose: