stm32f103: Chip wird nach erfolgreichem Flash nicht mehr erkannt

Hallo,

es war mein erster Versuch mit dem stm32f103 und ich habe vermutlich einiges falsch gemacht.

Es handelt sich um eine fertige Platine die vor meinem Umflashen noch funktioniert hat. Ziel war es einen Maple-Bootloader auf die Platine zu bekommen.

Mein erster Flash-Versuch (st-flash unter Linux) war erfolglos.

Dann habe ich den Fehler gemacht mit OpenOCD rumzuprobieren. Erst habe

vermutlich irgendwie gesperrt sein muss. Nach ein paar Resets und ein paar anderen Versuchen mit Befehlen an die ich mich nicht mehr im Detail

Nach einem "reset" hat sich der Chip abgemeldet und OpenOCD hat ihn nicht mehr erkannt.

Durch einen Tipp bin ich auf die "Reset"-Leitung gekommen. Wenn ich diese kurz auf GND ziehe kann ich das Programm auch mit "st-flash"

daran, dass meine Platine am USB nicht mehr erkannt wird:

[ 2068.103728] usb 1-1: new full-speed USB device number 2 using xhci_hcd [ 2068.217014] usb 1-1: device descriptor read/64, error -71 [ 2068.323573] xhci_hcd 0000:02:00.0: Setup ERROR: setup context command for slot 1. [ 2068.327349] usb 1-1: hub failed to enable device, error -22 [ 2068.436815] usb 1-1: new full-speed USB device number 3 using xhci_hcd [ 2068.550102] usb 1-1: device descriptor read/64, error 18 [ 2068.656663] xhci_hcd 0000:02:00.0: Setup ERROR: setup context command for slot 1. [ 2068.660448] usb 1-1: hub failed to enable device, error -22 [ 2068.773235] usb 1-1: new full-speed USB device number 4 using xhci_hcd [ 2068.773866] xhci_hcd 0000:02:00.0: ERROR: unexpected setup address command completion code 0x6. [ 2068.980792] xhci_hcd 0000:02:00.0: ERROR: unexpected setup address command completion code 0x6. [ 2069.186265] usb 1-1: device not accepting address 4, error -22 [ 2069.296195] usb 1-1: new full-speed USB device number 5 using xhci_hcd [ 2069.296483] xhci_hcd 0000:02:00.0: ERROR: unexpected setup address command completion code 0x6. [ 2069.503332] xhci_hcd 0000:02:00.0: ERROR: unexpected setup address command completion code 0x6. [ 2069.709220] usb 1-1: device not accepting address 5, error -22 [ 2069.713114] usb usb1-port1: unable to enumerate USB device

Sicherheitshalber habe ich mir ein passendes fertiges Binary geholt und geflasht. Mit dem gleichen Ergebnis. Binary liegt hier:

formatting link

Danke im Voraus

Manuel

Reply to
Manuel Reimer
Loading thread data ...

Wenn der Code im Flash die CPU in den Sleepmodus bringt (WFI), ist auch

da gibt es eine Konfigurationsoption bei OpenOCD.

USB-Beschaltung kann es ja leichte Unterschiede geben, und der Quarz sollte auch zum Code passen, damit der richtige USB-Takt 'rauskommt.

cu Michael

Reply to
Michael Schwingen

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.