Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fresh boards, can't flash via DFU #26

Open
cnlohr opened this issue Jul 5, 2023 · 4 comments
Open

Fresh boards, can't flash via DFU #26

cnlohr opened this issue Jul 5, 2023 · 4 comments

Comments

@cnlohr
Copy link

cnlohr commented Jul 5, 2023

I ordered several boards of this variant from JLCPCB. And, they used a STM32F072C8T6 C80488 but it seems the parts don't come from the factory with a USB bootloader for DFU. According to the datasheet, for DFU USB should be on PB6/7 instead of PA11/12.

What is the actual procedure for getting an appropriate bootloader onto the STM32F072C8T6, or mechanism to use other programmer?

I have an ST-Link programmer, which is OpenOCD compatible, but I don't see any indication how to use the SWD programming with this part. What is the recommended path forward?

@cnlohr
Copy link
Author

cnlohr commented Jul 5, 2023

Using st-flash succeeds but the part remains dysfunctional :(

st-flash write EASYPDKPROG.bin 0x08000000
st-flash 1.6.0
2023-07-05T16:11:19 INFO usb.c: -- exit_dfu_mode
2023-07-05T16:11:19 INFO common.c: Loading device parameters....
2023-07-05T16:11:19 INFO common.c: Device connected is: F07x device, id 0x20016448
2023-07-05T16:11:19 INFO common.c: SRAM size: 0x4000 bytes (16 KiB), Flash: 0x10000 bytes (64 KiB) in pages of 2048 bytes
2023-07-05T16:11:19 INFO common.c: Attempting to write 35108 (0x8924) bytes to stm32 address: 134217728 (0x8000000)
Flash page at addr: 0x08008800 erased
2023-07-05T16:11:19 INFO common.c: Finished erasing 18 pages of 2048 (0x800) bytes
2023-07-05T16:11:19 INFO common.c: Starting Flash write for VL/F0/F3/F1_XL core id
2023-07-05T16:11:19 INFO flash_loader.c: Successfully loaded flash loader in sram
 18/18 pages written
2023-07-05T16:11:21 INFO common.c: Starting verification of write complete
2023-07-05T16:11:21 INFO common.c: Flash written and verified! jolly good!
[20309.056409] usb 1-3: new low-speed USB device number 31 using xhci_hcd
[20309.184423] usb 1-3: device descriptor read/64, error -71
[20309.424377] usb 1-3: device descriptor read/64, error -71
[20309.664411] usb 1-3: new low-speed USB device number 32 using xhci_hcd
[20309.792386] usb 1-3: device descriptor read/64, error -71
[20310.028388] usb 1-3: device descriptor read/64, error -71
[20310.140432] usb usb1-port3: attempt power cycle
[20310.556408] usb 1-3: new low-speed USB device number 33 using xhci_hcd
[20310.556930] usb 1-3: Device not responding to setup address.
[20310.764895] usb 1-3: Device not responding to setup address.
[20310.972389] usb 1-3: device not accepting address 33, error -71
[20311.100448] usb 1-3: new low-speed USB device number 34 using xhci_hcd
[20311.100937] usb 1-3: Device not responding to setup address.
[20311.308932] usb 1-3: Device not responding to setup address.
[20311.520396] usb 1-3: device not accepting address 34, error -71
[20311.520447] usb usb1-port3: unable to enumerate USB device

@cnlohr
Copy link
Author

cnlohr commented Jul 5, 2023

All boards have the same issue, all flash fine, all report low speed device. Are there any extra fuses or anything that need to be set beforehand?

@cnlohr
Copy link
Author

cnlohr commented Jul 5, 2023

I am using the variant from thomasesr. https://github.com/thomasesr/easy-pdk-programmer-hardware which has flipped D+/D- it seems. I wish I could open an issue to warn others.

But even when flipping them, the part does not appear to come online.

@cnlohr
Copy link
Author

cnlohr commented Jul 5, 2023

Aah! That was it. Just flipped D+/D- on Thomasesr's version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant