Hi all,
I’m running into troubles using outboard DFU. I have used it successfully up until now, and in fact I can still use it successfully with previous binpacks.
I made an update to our firmware, which runs on an nRF52840 Feather Express, using mcuboot bootloader. Previous firmware releases I can install via this method just fine. And the new firmware works great if I flash it via SWD, but if I try to get Notehub to push the binpack out, it will try for more than an hour, holding the host micro in bootloader mode for most of that time, then eventually fail with the error message:
“DFU image is not valid 9(0) {odfu-fail}”
After this failure, the host MCU is left in a non-functional state, its flash corrupted. I can get it working again by asking Notehub to DFU it back to a previous version of the firmware and then power cycling the board.
I recently upgraded Notecard CLI from 1.8.1 to 1.9.1, and I wondered if that might be the source of the trouble, so I produced binpacks with both of them, and comparison shows they are identical, save only the timestamp, so I don’t think it’s the Notecard CLI’s fault.
This is the command I use to generate the binpacks:
notecard -binpack mcuboot 0x00000000:app_update.bin
If file size is relevant: The new binpack I’m trying to flash is 185 kb. The previous one (which still works) is 157 kb.
The Notecard has DFU turned on with this command:
{
“req”: “card.dfu”,
“name”: “mcuboot”,
“on”: true
}
Here’s the response to a card.dfu inquiry:
> {"req":"card.dfu"}
{
"mode": "aux",
"name": "mcuboot"
}
I can also confirm that the Notecard is able to successfully put the host into bootloader mode, as evidenced by a red LED (and the fact that it is able to corrupt the existing firmware in this attempt).
So, I have a valid hex that runs as intended on the device if I flash it manually. I just can’t get it on there via the DFU mechanism. Yet I CAN flash other files just fine, binpacks that were produced with the same process and CLI command. Does the error message above indicate what is objectionable about the binpack in question? Any ideas?
I’m going to have to think on this one overnight.
Thanks for any ideas or suggestions!
Scott