Jackson White

DFU to MSP Auto Switch, Arduino IDE?

DFU to MSP Comms over USB

Jump to DFU Mode from Firmware

void enterDFU() { void (*boot_jump)(void) = (void (*)(void)) (*((uint32_t*) 0x1FFF0004)); __set_MSP(*(uint32_t*) 0x1FFF0000); boot_jump(); }

Enter DFU when a specific command is recieved

void processMSP(uint8_t command) { if (command == 150) { // MSP_FC_VERSION Serial.write(36); // Start Byte Serial.write('M'); // MSP Header Serial.write('<'); Serial.write(2); Serial.write(150); Serial.write(4); Serial.write(2); Serial.write(150); } else if (command == 255) { // Custom command to enter DFU enterDFU(); // Function to reboot into DFU mode } }

When 255 is received, the FC switches to DFU mode.