I am completely new to Arduino, although I have some experience flashing STM32 chips (I was able to fix an F4 flight controller and a Matek Sys video transmitter with burned out STM32 chips). Anyway I thought I would purchase a couple maple mini boards from eBay. I had no luck flashing the USB bootloader with a cheap USB to TTL but I was able to connect with an ST-Link and successfully flashed the generic_boot20_pc13.bin file. Now I get extremely strange inconsistencies when connecting the board to my Windows 10 x64 Intel PC. Below are three things that happen seemingly randomly when I connecting to USB.
-
Under USB Controllers I get 'Unknown USB Device (Device Descriptor Request Failed).
-
Under ports in device manager I get 'USB Serial Device (COM7)' with an error 'This device cannot start. (Code 10)'
-
Under ports in device manager I get 'USB Serial Device (COM7)' with no error. However I get the attached (screenshot) error when attempting to upload from the Arduino IDE.
When I attempt to re-install the drivers, Windows tells me the 'best driver for your device is already installed' and 'Windows has determined the driver software for your device is up to date'.
Can anyone tell me what is going on. Am I just doomed to have to use the ST-Link to do code uploads? I might add that I have spent around 6-8 hours trying to figure this out on my own, so I have searched pretty much everything on Google and read anything I thought might be pertinent, so advice would be much appreciated.
ERROR 10 is almost always a driver issue.
Windows is bad for saying it has the best driver when it really does not.
It based that "assumption" on what you told it so maybe you don't have the absolute correct driver ?
Your TTL needs to employ DTR pin and if it does not or you have it connected wrong you need to address that issue.
Bob.
Thanks Bob,
I will look into the driver issue further and post the results.
I tried every driver I could find. I also tried using Zadig just for the hell of it even though I don't really know what it does. I tried the drivers from the links below.
I also followed these instructions exactly
So now I just want to upload with STLINK, but I can't do that either. There is no value to select in the Arduino IDE for ports, and the IDE says STLINK not found. Is there any way at all to write code to the board? Why is this so damn difficult?
Sketch uses 13716 bytes (20%) of program storage space. Maximum is 65536 bytes.
Global variables use 3088 bytes (15%) of dynamic memory, leaving 17392 bytes for local variables. Maximum is 20480 bytes.
C:\Users\SidewinderAIM9M\AppData\Local\Arduino15\packages\stm32duino\tools\stm32tools\2019.6.29/win/stlink_upload.bat C:\Users\SIDEWI~1\AppData\Local\Temp\arduino_build_189835/sketch_jul26a.ino.bin
C:\Program Files (x86)\Arduino>rem @echo off
C:\Program Files (x86)\Arduino>rem: Note C:\Users\SidewinderAIM9M\AppData\Local\Arduino15\packages\stm32duino\tools\stm32tools\2019.6.29\win\ get path of this batch file
C:\Program Files (x86)\Arduino>rem: Need to change drive if My Documents is on a drive other than C:
C:\Program Files (x86)\Arduino>set driverLetter=C:\Users\SidewinderAIM9M\AppData\Local\Arduino15\packages\stm32duino\tools\stm32tools\2019.6.29\win\
C:\Program Files (x86)\Arduino>set driverLetter=C:
C:\Program Files (x86)\Arduino>C:
C:\Program Files (x86)\Arduino>cd C:\Users\SidewinderAIM9M\AppData\Local\Arduino15\packages\stm32duino\tools\stm32tools\2019.6.29\win\
C:\Users\SidewinderAIM9M\AppData\Local\Arduino15\packages\stm32duino\tools\stm32tools\2019.6.29\win>rem: the two line below are needed to fix path issues with incorrect slashes before the bin file name
C:\Users\SidewinderAIM9M\AppData\Local\Arduino15\packages\stm32duino\tools\stm32tools\2019.6.29\win>set str=C:\Users\SIDEWI~1\AppData\Local\Temp\arduino_build_189835/sketch_jul26a.ino.bin
C:\Users\SidewinderAIM9M\AppData\Local\Arduino15\packages\stm32duino\tools\stm32tools\2019.6.29\win>set str=C:\Users\SIDEWI~1\AppData\Local\Temp\arduino_build_189835\sketch_jul26a.ino.bin
C:\Users\SidewinderAIM9M\AppData\Local\Arduino15\packages\stm32duino\tools\stm32tools\2019.6.29\win>rem: ------------- use STLINK CLI
C:\Users\SidewinderAIM9M\AppData\Local\Arduino15\packages\stm32duino\tools\stm32tools\2019.6.29\win>stlink\ST-LINK_CLI.exe -c SWD -P C:\Users\SIDEWI~1\AppData\Local\Temp\arduino_build_189835\sketch_jul26a.ino.bin 0x8000000 -Rst -Run -NoPrompt
STM32 ST-LINK CLI v3.3.0.0
STM32 ST-LINK Command Line Interface
No target connected
Unable to connect to ST-LINK!
C:\Users\SidewinderAIM9M\AppData\Local\Arduino15\packages\stm32duino\tools\stm32tools\2019.6.29\win>rem: Using the open source texane-stlink instead of the proprietary STM stlink exe
C:\Users\SidewinderAIM9M\AppData\Local\Arduino15\packages\stm32duino\tools\stm32tools\2019.6.29\win>rem:texane-stlink\st-flash.exe write C:\Users\SIDEWI~1\AppData\Local\Temp\arduino_build_189835\sketch_jul26a.ino.bin 0x8000000
Is it a TRUE "STLINK" or a clone ?
Had that "Unable to connect to ST-LINK!" issue with my clone stlink before a long time ago and ended up doing some crazy internet hack to get it to work again.
It is a banggood special. So clone. Would you please link the crazy internet hack?
There are a few and it was a long time ago.
There are also quite a few variations so you would need to know EXACTLY which one you have.
I usually started with pictures then I could identify the exact board in Q.
Take it from there but note they often use a second STLINK or JLINK to do the hack.
The JLINK is easier to modify as it usually just involves a jumper.
Bob.
Hey SidewinderAIM9M, did you ever solve this?
I've been programming the Maple Mini for ages n problem using the manual install from Roger Clarke.
Now I've changed to the boards manager version and I'm getting exactly the same errors as you reported.
I'm really hoping you can point me in the right direction before I pull out what little hair I have left.