UmbrelaSmart/android-stm32-dfu-programmer

Can't make it work for STM32F072RB

sathyanc opened this issue · 1 comments

Hi,

I am using STM32F072RB Microcontroller and I am unable to flash the firmware using the App. The device was recognized and even selected the correct DFU file. The Mass Erase also works.

But when I click program, I am getting "USB Failed during getStatus" exception. I have tried this on Nexus 7 and Lenovo K6 Power.

I took a look at the code, it looks like it supports STM32F4 series of micro controller. I am using STM32F0 HAL Library for USB DFU.

What are the changes I need to make to make it work with STM32F072?!

Thanks!
Sathyan

Hello,
the project was intended to be used with the integrated stm32 system bootloader, by means of using the USB DFU interface. This project was tested with the USB DFU version 2.2. Based on the datasheet, the STM32F072x has the same bootloader in its memory.

I suggest you look into "enter bootloader from software" to invoke a system reset and enter the standard bootloader. This method requires you to write a constant (such as 0xDEADBEEF) into RAM and check whether that constant exists after a system reset. Similar post can be found here: link

The project also assumes that you are writing the firmware image at beginning of the flash main memory ( ie 0x08000000). Make sure that only a single element exist inside the dfu file.

Philipp