programming mini over D23/D24 (USB) [SOLVED]

Mon Jun 29, 2015 3:03 pm
I need a quick advise:
I’ve build in the maple mini into a project and need a breakout USB connector. My idea was to use:
D23 USB D+ and D24 USB D-
I’m pretty sure that I tested this successfully some weeks ago (using an older bootloader?), now it wont work (tried it even on another maple mini and different USB cables and tested the connections out with my continuity tester)
Ok, one possibility is to “hijack” the pins of the original usb connector, but this is more or less botch.

I think, I have missed something and/or maybe it’s better to use a “generic bootloader” for using D23/24 “native”? But the only difference between the onboard connector and the D23/24 pins are a 22Ohm resistor on each rail…

Edit: Ok, I looked at many STM32/USB connection schematics: The two 22R seem to be important…will try it at home.

Mon Jun 29, 2015 7:20 pm
Ok, even with 22R no luck :/

Mon Jun 29, 2015 9:01 pm
Is it failing on both the boards you tried?
And if you are trying to connect the USB to the pins directly, besides the 22ohms, you need a 1.5k pull up resistor on D- to VBUS.

Mon Jun 29, 2015 9:10 pm
you need a 1.5k pull up resistor on D- to VBUS.
I know, but it must be given trough the schematic (R10):
Maybe the mini clone isn’t 1:1?

Tue Jun 30, 2015 4:07 am
Hi Matthias,

I’m not sure where you are connecting the external USB.

Can you scribble a circuit and photo it and post it ?

I think you are saying that you are connecting pin 24 and pin 23 to another USB connector (via 22 ohm resistors), but that his does not work ?

(looking at the schematic, I think that should work, as all you are doing is replacing the part of the circuit which is resistors R6 and R7 and the USB connector.

Tue Jun 30, 2015 8:25 am
Edit: I think I found the error, see post below!

I’ve added a schematic and a photo, connection is easy:
[USB connector]——–[maple mini] VCC <————————-> Vin
GND <————————-> GND
D+ <———-[22R]———> D23
D- <———-[22R]———-> D24

As you can see on the schematic, there is a second USB connector for the DF-player. This works frictionless, so I can exclude a problem with the cable.
I also triple checked all connections (even if they are reversed …) and resistor values:
So I measure [22-29Ohm] from:
[build-in-USB]——physical Pin——–[ext. USB] D+ <———-[22R]—-D23—-[22R]——> D+
D- <———-[22R]—-D24—-[22R]——> D-

So I’m really clueless. Maybe the problem is that I power the mini from Vin?

additional declaration for schematic below:
D22 is only a indicator if USB power is on (through a simple voltage divider)
D10 measuring the “real” battery status.
All test are with the minimum needed parts online (so no ext battery…)



Tue Jun 30, 2015 8:35 am
Ok, the problem is, that powering the maple mini via Vin you wont get VCC voltage on the build in USB connector. As soon as I connect 5V to the original USB-plug (just +5V) everything works. Maybe a simple 1.5k resistor to (a working) VCC and D- should work (have to try out), because the “build in” pullup resistor (R10) isn’t connected to voltage while there is no power on the orig. connector.
Edit: Maybe it’s even a smarter idea to connect the 5V direct to “USB_5V” to get the whole mechanism (transistors,…) working for the bootloader mode. (or use the “generic bootloader”)
Edit2: Solved! Put a small wire from the onboard 5v USB pad to Vin. Little bit ugly, but it worked (problem is, that the mini is already soldered, so I haven’t got access to the “bigger” solder pads on the backside).

Tue Jun 30, 2015 9:34 am
Hi Matthias

Looking at the full schematic for the Maple mini, the USB_5V is used by the reset circuit (like you said).

One other option is to short out diode D2, but I don’t know where it is.


I tried to find the diode on by board and I think its next to the regulator on the back of the board, but I think my board is not the same as yours.

In the Eagle BRD file the diode D2 is supposed to be near the middle of the board but there doesn’t appear to be a diode in that location on my board.

So I Baite may have laid out the board a bit differently.

Tue Jun 30, 2015 9:52 am
On my maple the D2 is next to regulator as Roger said also BUT I wouldn’t recommend to short-circuit the D2 because if you power supply the Vin pin with 9V DC then the 9V will go directly to the USB port!

Tue Jun 30, 2015 10:00 am
Roger: There is another problem: maple mini (clone) is not maple mini (clone). There are differences in the layout between the “BAITE” one, the “other one” and(!) the original maple mini. Ok, you can measure it out.
Unfortunately, I totally messed up my wooden front panel with the very last(!) acryl paint finish. Hundreds of crackles in all paint-layers so I have to build it again (now with acrylic glass as material) and I’m under pressure of time….
@Vassilis: This seems like the BAITE on (I know “D2” really well -> from the burned smell ;) ), the “other” has a different layout (see pic)…. (no matter, I solved it and it would be to much challange to solder the mini out again)
But I think the whole story is a “nice to know” for any next project with seperate USB connection for everyone :)


Tue Jun 30, 2015 10:07 am
(I know “D2” really well -> from the burned smell ;) ),
And know comes the punchline:
I wrote in the first posting something about “I tried it out weeks ago and it worked!”. Now I know why:
The maple-mini with which I tried it, was the one with the “burned diode” so there was no diode function anymore, just like a plain jumper….and this is the reason why it worked!

Tue Jun 30, 2015 10:47 am

Very funny. So you need to burn out the diode to make it work, I hope @ahull or Rick, or Victor (I forget how many people have burnt their diodes)
read this ;-)

Tue Jun 30, 2015 2:41 pm
Roger, add me to your list (burned diode) :D

Wed Jul 01, 2015 12:42 am
If you remember, I’ve got burned too last week with that smell … ;)

Wed Jul 01, 2015 12:47 am
I’m feeling quite left out, as I’ve managed to avoid this so far ;-)

Wed Jul 01, 2015 12:56 am

BTW. Thanks for sharing your experience with this. I was considering making a Maple mini breakout board PCB, but the disconnect circuit not being powered is a bit of an issue.

I did initially think that the 2 transistor disconnect circuit could be replicated on the PCB (though its a duplication), however the DISC line PB9 is not broken out onto the pin headers either.

So… It looks like the only solutions are to short out D2 or put a wire from USB 5V to the disconnect circuit like you have done.

It would be possible to just put a 1.5k resistor from D+ to 5V, and use a version of the generic bootloader that doesn’t use PB9.
In which case, you would need to select the Generic STM32F103CB board, and use stm32duino uploader, as the reset code in the core is different from when its compiled for Maple mini

Thu Feb 25, 2016 9:59 am
Hi, has anyone some draw or scheme of proper connection for one USB to program Mini by pins 23 and 24 in the way you wrote here?

I wonder if I can use cut USB cable and solder it into Mini to make permanent connection to program it?
I need to close MCU in my project but from time to time I will programming it, don’t want then take enclosure apart.

Leave a Reply

Your email address will not be published. Required fields are marked *