2020-12-14 07:53 AM
I'm working with an STM32L072RB, and it seems the system bootloader DFU descriptor reports an incorrect flash size. I couldn't find any documentation of this in the errata sheet for this part, so where would be the right place to report this?
The STM32L072RB that I'm using has 128K flash, but the DFU descriptor says 192K (1536 pages of 128 bytes each):
$ dfu-util -l
dfu-util 0.9
(... extra output removed ...)
Found DFU: [0483:df11] ver=2200, devnum=80, cfg=1, intf=0, path="1-1.1", alt=0, name="@Internal Flash /0x08000000/1536*128g", serial="0C4738420000"
I'm pretty sure that the DFU descriptor is wrong and the device actually has 128k flash, since I just spent half a day trying to figure out why I could not upload any data to the upper 64k of flash (so >128k) under the assumption that I had a 192k device, based on the DFU descriptor...
2020-12-14 10:29 AM
Probably STM32L072RB and STM32L072RZ are the same chip. So you _may_ have 192 k.
2020-12-15 02:03 AM
Yeah, you'd think that, except:
So it really seems like this is *just* a bug in the DFU bootloader, and that the bootloader hardcodes the flash size, rather than reading it from F_SIZE. So maybe the RZ bootloader was accidentally included in the RB chip?
2020-12-15 01:42 PM
STLink clips at F_SIZE. Try another debugger. dfu-utils clings to the the dfu string, so I wonder why dfu-util does not work. Maybe the system bootloader also clips, but I thinks I could use dfu-util to flash an F101x8 above 64k with a faked dfu-string.