2021-01-12 06:41 AM
I'm looking for a way to detect which device part number (EX: STM32F765...) is connected via the USB DFU bootloader before programming the device (as a sanity check to make sure the file is appropriate/compatible). I can see the VID/PID/REV and Option Bytes, but that is not specific enough.
Is there any way to do this? Or are there other recommended ways to check device compatibility with a target .DFU file?
For context, I'm envisioning a situation where I have 2 very different STM32 devices that support the USB DFU bootloader but require different DFU files.
2021-01-21 03:21 AM
dfu-util -l lists the exported memory regions like for a F303:
Found DFU: [0483:df11] ver=2200, devnum=29, cfg=1, intf=0, path="2-2.1", alt=1, name="@Option Bytes /0x1FFFF800/01*016 e", serial="FFFFFFFEFFFF"
Found DFU: [0483:df11] ver=2200, devnum=29, cfg=1, intf=0, path="2-2.1", alt=0, name="@Internal Flash /0x08000000/064*0002Kg", serial="FFFFFFFEFFFF"
This gives at least some hints on the attached device
2021-01-21 05:14 AM
Thanks! Do you know what that "devnum" identifier represents?
2021-01-21 08:00 AM
The devnum is something from the Linux USB handling.