For some reason, when I tried to flash the board with the Python STM32 loader, per the instructions on LeafLabs’ website, the led didn’t work, although it said it flashed it successfully. Nothing worked. When I plugged it into my Windows 10 laptop via USB, it did not recognize the device (yes, both drivers are installed and tested with a Maple Mini). The USB device says “Unknown USB Device (Invalid Device Descriptor)” in the device manager.
Finally, I tried loading the bootloader using the stm32loader.exe per instructions on the github wiki, and now the led is behaving properly. Quick blinks followed by slower blinks and keeps blinking. However, I keep getting the USB device not recognized and the “Unknown USB Device (Invalid Device Descriptor)” in the device manager no matter what I do.
So now I am down to trying to find the problem. I don’t have a scope, I am just a hobbyist. I have checked my design, and it is just like the maple mini except the changes mentioned above, and I used a single LDO for both Analog and digital power. All solders look good, I have a lot of experience hand soldering these small component. I did spend a little more time soldering the STM32 IC because those chips have such a small pitch, it is hard to hand solder, but I don’t think I was on them to long.
Anyone have any ideas, or maybe a suggestion of what to try?
Hopefully, something will show up in the comparisons.
Ray
An update though. I can successfully load sketches on to the board via serial using Arduino. Everything I have tried works great, so I am less suspecting of a power issue. However, the uploads were dodgy at first. They work great if I manually wire BOOT0 to 3v3 and toggle reset to ground. So I am guessing my buttons may not be working right or have cold solders. When I designed the button part in Eagle CAD, I didn’t leave much room for hand soldering them and I might have gotten a bad solder. I will rework them tomorrow. However, even manually toggling the pins, even though getting a 100% successful serial upload rate with Arduino and stm32flash.exe, I cannot get the bootloader working, even after numerous reflashing with this method.
I noticed another thing. When I tried to run a sketch with PWM on a non PWM pin with an external LED (accident), The sketch didn’t start immediately. On reset, it behaved exactly the way it does when going into what I thought was the bootloader. The onboard LED blinks rapidly. Now, I am beginning to think that is an error of some kind and the bootloader was never initializing.
I did notice something that I believe may be part of, if not the entire problem. When I run the STM32flash.exe to load the bootloader, it reports 128kb flash when the c8 only has 64kb. This might not be an issue, but it is the first thing I have found that doesn’t add up. I am going to recheck all of my configs and recompile the bootloader tomorrow and see if I can find anything else.
SIDE NOTE
For some reason, I assumed that the generic STM32F103c boards had the same pin map as the maple mini since they are based on the maple mini and use the same IC. They do not ha ha. I was wondering why my leds were not working yet serial was. A quick for loop toggling each pin and reporting the pin being toggled told me they were different quickly. I rewrote my own variant based on the generic F103c but with a maple mini pinmap. Solved the issue. I might make some pinmap graphics to add to the github readme or wiki when I get this solved so others dont run into the same issue.
Could be enumeration, could be the wrong speed in the usb peripheral, could be something wrong in the code…
I would check that your multimeter measures exactly 22ohm from the usb connector contacts to the MCU corresponding pins, and do not measure short to VCC or GND.
And on D+ check that you measure 1.5k to Vcc.
Check that you are connecting the right mcu pins for D- and D+, perhaps at some point you design got the mcu pins connected to the wrong usb lines.
Are you using a 8Mhz xtal? if not, you need to make changes to your pll multiplier to make sure you run the MCU at 72Mhz, otherwise the usb peripheral will not work. It can work with a main clock of 48Mhz too, but you need to change the usb clock divider in the code too. Those are the only 2 valid speeds for the USB peripheral to get the right clock.
I dont remember if the bootloader by default works with a button active high or active low. Check what the mini schematic shows, whatever the mini has is the default. That can be changed though, I have done it for some boards that had the buttons the opposite way.
Also, I compiled one or 2 times with gcc 4.9, and the bootloader did not work. I never looked into it and just compiled with 4.8.3 and that worked fine.
To discard any compilation errors, I would upload one of the compiled bootloaders for generic boards from Roger’s repo. We modified the bootloader to enabled the internal pull or pull down for the button, so if a pin is left floating, it will read like button not pressed, so you can use a bootloader compiled for a button in a different pin and leave the pin floating, and the bootloader should still work fine. And specially should be detected by windows, no matter what with the button.
By the way, you installed and tested your maple drivers with a maple board right? just to confirm the drivers actually work and load right.
Finally, about the 128kb, that is a nice free upgrade courtesy of ST. All the c8 we have checked so far had 128KB in reality, enjoy
Also, I compiled one or 2 times with gcc 4.9, and the bootloader did not work. I never looked into it and just compiled with 4.8.3 and that worked fine.
I tried compiling with windows, but the make file has flags like rm and the like that kept throwing errors. I have WinAVR installed for the make command, but it still didnt work. So I installed gcc-arm-none-eabi 4.8 into cygwin using instructions here http://andybrown.me.uk/2015/03/22/stm32dev-windows/ on step two. Then, I was able to compile my new bootloader variant. I uploaded it to both boards I soldered up and it works flawlessly now. Thank all of you for all of your help. I am new to ARM and the STM32 and I learned a lot through the past 3 days of messing with this.
Here is a picture of my new, fully working boards.
is the BOM less than the Maple Mini clone? Or, are there physical attributes of your board that moved you into the custom boards? Maybe a bit smaller? Hard to tell from the pix. Of course, I do understand the desire to just do this stuff because one can
Ray
is the BOM less than the Maple Mini clone? Or, are there physical attributes of your board that moved you into the custom boards? Maybe a bit smaller? Hard to tell from the pix. Of course, I do understand the desire to just do this stuff because one can
Ray

As I see on your photos, you use very much solder on the smd parts. Have you ever tried something like this? —> http://www.aliexpress.com/item/HK-MECHA … 59211.html
Since I use this for smd I wont miss it anymore! Just a little(!) paste on each contact on the blank pcb, place the component, solder it, ready! Even a 64-pin STM32 is soldered within one minute.

As I see on your photos, you use very much solder on the smd parts. Have you ever tried something like this? —> http://www.aliexpress.com/item/HK-MECHA … 59211.html
Since I use this for smd I wont miss it anymore! Just a little(!) paste on each contact on the blank pcb, place the component, solder it, ready! Even a 64-pin STM32 is soldered within one minute.
A good magnifier, “Mechanic” solder paste and a very fine tip on your iron (or a hot air pencil), and anybody can be a soldering ninja
<…>
However, the main reason I built it is because I am going to be building more advanced boards with built in tft screens, wifi, sd cards, 3g modems, and the like, and I wanted to make sure my more minimal design worked, that my components I chose worked, that I could get the bootloader to work on this minimum usb hardware, and to gain a general understanding of the components and bootloader.