First of all I'm fairly new to STM32, so please excuse my lack of knowledge here...
I accidentally set "PA9" as INPUT_PULLUP in a sketch and after uploading the sketch I can't seem to program my Black Pill F401 anymore using USB and DFU.
It says
Error: Target device not found
Establishing connection with the device failed
And Windows is throwing an error message regarding the usb device.
Is there any way I can get this back to working and undo my mistake?
Problem really is, that I can't even upload any correcting parameters, since the board is not recognized as a usb-device anymore.
Is there something I can do on the hardware level? Connect certain pins?
Or is there maybe even a factory reset for these boards?
Please note that before I set PA9 as INPUT_PULLUP everything was working absolutely fine and I've been uploading sketches for months without any issue at all.
Can't program F401 after PA9 set as INPUT_PULLUP
Can't program F401 after PA9 set as INPUT_PULLUP
I suppose you are using a stm32f401cxx blackpill (or some such variant?)
https://stm32-base.org/boards/STM32F401 ... -V1.2.html
the 'usual' thing is, keep your usb cable connected
if that is there, you can try flashing e.g. using stm32cube programmer etc
https://www.st.com/en/development-tools ... eprog.html
if that didn't work, you may need
Go to full posthttps://stm32-base.org/boards/STM32F401 ... -V1.2.html
the 'usual' thing is, keep your usb cable connected
- press both boot0 and reset
- hold boot0 and release reset
- release boot0 1-2 secs later
if that is there, you can try flashing e.g. using stm32cube programmer etc
https://www.st.com/en/development-tools ... eprog.html
if that didn't work, you may need
- disconnect usb cable
- press and both boot0 and reset and connect the cable (if you need 'extra hands', try to find out if those pins reset or boot0 can be connected to gnd (reset) or 3v3 (boot0) using jumper/dupont wires.
- hold boot0 and release reset
- release boot0 1-2 secs later
Re: Can't program F401 after PA9 set as INPUT_PULLUP
I suppose you are using a stm32f401cxx blackpill (or some such variant?)
https://stm32-base.org/boards/STM32F401 ... -V1.2.html
the 'usual' thing is, keep your usb cable connected
if that is there, you can try flashing e.g. using stm32cube programmer etc
https://www.st.com/en/development-tools ... eprog.html
if that didn't work, you may need
https://stm32-base.org/boards/STM32F401 ... -V1.2.html
the 'usual' thing is, keep your usb cable connected
- press both boot0 and reset
- hold boot0 and release reset
- release boot0 1-2 secs later
if that is there, you can try flashing e.g. using stm32cube programmer etc
https://www.st.com/en/development-tools ... eprog.html
if that didn't work, you may need
- disconnect usb cable
- press and both boot0 and reset and connect the cable (if you need 'extra hands', try to find out if those pins reset or boot0 can be connected to gnd (reset) or 3v3 (boot0) using jumper/dupont wires.
- hold boot0 and release reset
- release boot0 1-2 secs later
Re: Can't program F401 after PA9 set as INPUT_PULLUP
That did the trick! It wouldn't work with the usb cable connected, I really had to hold down NRST and BOOT0 while connecting the cable for it to work.if that didn't work, you may need
disconnect usb cable
press and both boot0 and reset and connect the cable (if you need 'extra hands', try to find out if those pins reset or boot0 can be connected to gnd (reset) or 3v3 (boot0) using jumper/dupont wires.
hold boot0 and release reset
release boot0 1-2 secs later
@ag123 Thank you so much for your swift answer and extensive help, you're a life saver!