2025-07-29 2:10 AM
Hi,
we have issues with USB DFU where we use the PC port. I uploaded two log files: one from CubeProgrammer and one from USB log in .txt (Wireshark).
Depended the on the USB port I am using USB DFU works. From PC seems DFU is looping while using the Dock USB port everything works fine.
10:38:05:230 : Error: Uploading Option Bytes bank: 0 failed
10:38:05:245 : Error: Initializing the Option Bytes failed
Also, is sending abort request common used to get in dfuIDLE state, or is this something wrong.
10:14:50:757 : Time elapsed during the read operation is: 00:00:00.004
10:14:51:834 : UPLOADING ...
10:14:51:834 : Size : 1024 Bytes
10:14:51:834 : Address : 0x8000000
10:14:51:835 : Read progress:
10:14:51:835 : DFU status = 0 : OK
10:14:51:836 : DFU state = 9 : dfuUPLOAD-IDLE
10:14:51:837 : Status: 0, State: 9
10:14:51:837 : sending an abort request
10:14:51:839 : DFU status = 0 : OK
10:14:51:839 : DFU state = 2 : dfuIDLE
10:14:51:839 : setting the address pointer to address: 0x08000000
10:14:51:840 : DFU status = 0 : OK
10:14:51:840 : DFU state = 4 : dfuDNBUSY
10:14:51:840 : DFU status = 0 : OK
10:14:51:840 : DFU state = 5 : dfuDNLOAD-IDLE
10:14:51:840 : receiving packet nbr: 0
10:14:51:841 : DFU status = 0 : OK
10:14:51:841 : DFU state = 5 : dfuDNLOAD-IDLE
10:14:51:841 : sending an abort request
10:14:51:841 : DFU status = 0 : OK
10:14:51:841 : DFU state = 2 : dfuIDLE
10:14:51:841 : UpLoading data
10:14:51:845 : DFU status = 0 : OK
10:14:51:845 : DFU state = 9 : dfuUPLOAD-IDLE
I hope you can help me out.
2025-07-30 5:59 AM
Hello @JB98 ,
Check your boot configuration, the boot pin connection and supported communication peripherals by the system bootloader following the AN4661 in section 4 Boot configuration.
Make sure to use the latest version of CubeProgrammer.
2025-07-30 11:54 PM
Hi Imen,
Thanks for reply, but this is all set right.
We use VBUS detect to select the boot configuration as USB DFU ones USB is plugged in at start-up. So we ignore the bootpin to automate DFU.
When connecting with "Read Unprotect", it cannot (sometimes it does) upload/read its DeviceID and OptionBytes.
It seems something to do with unsynchronized state machines of the internal F7 bootloader and CubeProgrammer.
The system seems to be quite unstable.
2025-07-31 12:00 AM
Example with USB FS with issue device ID
Issue with option bytes and device ID.
2025-07-31 12:21 AM
it has something to do with LIBUSB_ERROR_PIPE. Could not find sufficient info about this. If somebody can provide this would be nice.
2025-08-01 8:48 AM
Maybe you have incorrect Option Bytes data! So, verify the option bytes configuration file.
Try perform a full chip erase to disable RDP before reprogramming option bytes.