Hi @jaszylu, sorry you’re having that issue.
It sounds to me like when you flashed the new mote, something went wrong, and now the flash on the microcontroller doesn’t have a working application.
You can put even a completely blank STM32 from the factory into dfu-util mode by holding the BOOT pin high during power-up or reset. On the devkit breakout board you have, there should be BOOT and RESET buttons. You can hold down the BOOT button while you tap reset, and then the MCU should be in DFU mode, where you can use dfu-util.
When flashing with dfu-util in this state, you MUST use a “.unified.bin” — which has the MCUBoot bootloader placed at the base of flash, and then your application placed at a later address, all wrapped into one binary file.
You can download hello_world_debug-v0.12.2
from here, which will contain a unified binary with a development bootloader:
After that you can flash whatever you want over the application, but you need to make sure you don’t erase the MCUBoot bootlaoder.
If you’re building your own firmware, then make sure USE_BOOTLOADER=1
is part of your cmake cache entries. Without this flag, your app gets programmed at the base of flash, overwriting the bootloader, and generally not behaving as expected.
Assuming you are building with that cache entry, then make dfu_flash
should do the right thing in your build folder.
If you’re using dfu-util
directly, be sure the address you’re programming your .elf.dfu.bin file to is 0x0800C000
as seen here: bm_protocol/src/CMakeLists.txt at 51c4260af60afd2b30a1101e1383c820fab10617 · bristlemouth/bm_protocol · GitHub
Happy hacking!
Zachary