How did I damage the STM32F030R8 with external power to DISCOVERY?
In a word: I seem to have damaged the flash on an STM32F0 Discovery board by attaching external power.
Details
I had peripherals attached to the STM32F030R8-Discovery board that required more than 100mA @ 3V available from the Discovery's on-board regulator. I attached a 3.3VDC supply to the 3V pin (pin 1) of the board and let it common ground with GND (pin2). 5V was still provided by USB.
Ever since then, I am unable to flash the STM32F0 . I've removed all my external logic. I was using the same studio and the Discovery's on-board STLINK ability, as always. My understanding of the Discovery is that diodes protect both the on-board 5V (diode drop from USB, so, more like 4.5V) and 3V supplies from external power. But I must have somehow overdriven the STM32.
I can still connect and interrogate the STM32F0. Reading flash shows a few non-FF bytes at 0x0800 0000 but then the rest of the device is blanked. I had attempted a bulk erase at one time and it must have partially completed. The loader etc. at 0x1FFF EC00 is not erased. The option bytes are all 0xFF'd - fortunately that's the default and flash is not write-protected..
I am replacing the Discovery but will need to repeat this. Any advice for how to avoid damaging a second Discovery?
The log of a download to flash from stutil that fails is as follows:
- 2019-05-17T11:06:50 INFO src/common.c: Loading device parameters....
- 2019-05-17T11:06:50 INFO src/common.c: Device connected is: F0 device, id 0x20006440
- 2019-05-17T11:06:50 INFO src/common.c: SRAM size: 0x2000 bytes (8 KiB), Flash: 0x10000 bytes (64 KiB) in pages of 1024 bytes
- 2019-05-17T11:06:50 INFO src/gdbserver/gdb-server.c: Chip ID is 00000440, Core ID is 0bb11477.
- 2019-05-17T11:06:50 INFO src/gdbserver/gdb-server.c: Listening at *:4500...
- 2019-05-17T11:07:06 INFO src/gdbserver/gdb-server.c: Found 4 hw breakpoint registers
- 2019-05-17T11:07:06 INFO src/gdbserver/gdb-server.c: GDB connected.
- 2019-05-17T11:07:15 INFO src/common.c: Attempting to write 1024 (0x400) bytes to stm32 address: 134217728 (0x8000000)
- Flash page at addr: 0x08000000 erased
- 2019-05-17T11:07:15 INFO src/common.c: Finished erasing 1 pages of 1024 (0x400) bytes
- 2019-05-17T11:07:15 INFO src/common.c: Starting Flash write for VL/F0/F3/F1_XL core id
- 2019-05-17T11:07:15 INFO src/flash_loader.c: Successfully loaded flash loader in sram
- 2019-05-17T11:07:18 ERROR src/flash_loader.c: flash loader run error
- 2019-05-17T11:07:18 ERROR src/common.c: stlink_flash_loader_run(0x8000000) failed! == -1