F405 & F411 versions of the BluePill

What are you developing?
victor_pv
Posts: 1864
Joined: Mon Apr 27, 2015 12:12 pm

Re: F405 & F411 versions of the BluePill

Post by victor_pv » Fri Feb 09, 2018 4:55 pm

Nice!
Mine were in Ohio this morning, but expected delivery by EOD today.

victor_pv
Posts: 1864
Joined: Mon Apr 27, 2015 12:12 pm

Re: F405 & F411 versions of the BluePill

Post by victor_pv » Sat Feb 10, 2018 3:23 am

I received my boards :)

I was trying to find the couple of components I need in digikey since Mouser doesn't have the right Crystal, and mouser doesn't have the regulator in stock(and minimum order qty. 4000), and noticed the regulator we are using, the AP2214HA is not pin compatible with the AMS1117. Not sure if was intentional, but there is the 2114H version that's pin compatible with the ams1117 of which I have a bunch.

User avatar
Squonk42
Posts: 323
Joined: Thu Dec 29, 2016 9:25 am
Location: Bordeaux, France

Re: F405 & F411 versions of the BluePill

Post by Squonk42 » Sat Feb 10, 2018 8:31 am

Yes, the AP2114HA has the GND on the large pin, which is much more convenient than the +3.3V output for routing and heat dissipation as well. We may reconsider this decision if AM1117 compatibility is required.

If you ar eordering some parts at Digi-Key, I may be interested in some (I don't have the 1616 RGB LED) if you can forward them to me, as they don't provide USPS to EU so shipping from them is expensive. Things like crystals (I have a few), F405 (I only have 2) and AP2214HA (I only have 5).

victor_pv
Posts: 1864
Joined: Mon Apr 27, 2015 12:12 pm

Re: F405 & F411 versions of the BluePill

Post by victor_pv » Sat Feb 10, 2018 2:31 pm

I found a 16Mhz crystal at mouse that seems to be compatible, CX3225GA
That would require to change the PLL divider, but other than that should work for everything according to the cubemx clock tool.
I was going to order a couple of those while the others from china arrive. It may be good to switch to 4pin crystals in the next iteration if they are the same price in china as the NX3225GD, since finding them in the US is way easier.

One things I noticed, while finding the crystal caps, is the crystal shows a CL of 8pF (both the right part number in digikey, as the 16Mhz compatible I found), but in the schematic we are using 20pF caps. Shouldn't we be using a lower value?

I'll be order a couple of MCUs, an F103 and an F405. i have a few more in order from China, and when checking 64pin MCUs in mouser, I found the 722RET6 is about the same price as the 405RGT, then did a search in Ali (no good) and ebay (bingo), so I have ordered this:
https://www.ebay.com/itm/5pcs-STM32F722 ... Sw8A1aeDF3

Only a couple of pins are different, and mainly we lose PB11, but I think is a low price to pay for having an F7 bluepill.

I will be placing an order from Mouser today (only they have the AP2114HA-3.3), and try to order all I need from them, mainly the ldo, xtal, xtal caps, battery changer, and fet. let me know what parts you want.

User avatar
Pito
Posts: 1738
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: F405 & F411 versions of the BluePill

Post by Pito » Sat Feb 10, 2018 2:57 pm

is the crystal shows a CL of 8pF .. but in the schematic we are using 20pF caps.
CL is a serial combination of the 2 capacitors - 20pF ser 20pF is 10pF which is the ~same value as the 8pF..
2x18pF would give you 9pF.. But with pF values and tolerances of the ceramics it does not matter basically..
Pukao Hats Cleaning Services Ltd.

victor_pv
Posts: 1864
Joined: Mon Apr 27, 2015 12:12 pm

Re: F405 & F411 versions of the BluePill

Post by victor_pv » Sat Feb 10, 2018 5:59 pm

So since we are using xtal with CL=8pF, we should use 2 capacitors of 16pF, is that right?
And then I understand there is the residual capacitance in the circuit, which add to the capacitors, so depending on that the capacitors may need to be a bit smaller.

User avatar
Squonk42
Posts: 323
Joined: Thu Dec 29, 2016 9:25 am
Location: Bordeaux, France

Re: F405 & F411 versions of the BluePill

Post by Squonk42 » Sat Feb 10, 2018 9:55 pm

The NX3225GD was chosen as it is one of the rare crystal with a unique specified load capacitance that can be found easily and at a good price on AliExpress and Taobao. For most crystals there, the load capacitance is never specified (expect the highest... Cheaper!), so YMMV.

Here is a very interesting Application Note from ST.

In particular, in section 3.3:

Code: Select all

CL = (CL1 * CL2) / (CL1 + CL2) - Cs
Where CL1 = CL2 are the 2 load capacitor value, Cs is the stray capacitance of the printed circuit board and connections and CL is the crystal load capacitance given by the manufacturer.

Generally, Cs = 5 pF and here for the NX3225GD 8 MHz crystal, CL = 8 pF, thus:

Code: Select all

CL - Cs = (C4 * C5) / (C4 + C5) = 3 pF
Hence:

Code: Select all

C4 = C5 = 6 pF
As for the FC-12M 32.768 kHz crystal, CL = 12.5 pF, thus:

Code: Select all

CL - Cs = (C2 * C3) / (C2 + C3) = 7.5 pF
Hence:

Code: Select all

C2 = C3 = 15 pF
... Which proves that I got confused and swapped the capacitor values between the 2 crystals :mrgreen:

We may have to reduce these values for a reliable startup, though. Especially with the 32 kHz crystal, where the STM32 pins are also routed to the header as PC14/PC15, which adds a lot of stray capacitance mainly because of vias.

Hopefully, we will not need an external series resistance on OSCOUT pin PH1 to limit the crystal drive level (power dissipated in the crystal) as there is no footprint for it :?

These adjustments will be part of the initial fun! :geek:

BTW, do we have a bootloader for the STM32F405 and what is the best core to use for the tests?

User avatar
RogerClark
Posts: 7683
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: F405 & F411 versions of the BluePill

Post by RogerClark » Sat Feb 10, 2018 10:16 pm

The F405 has an internal USB bootloader, but it only supports DFUSe which is STMs extension to DFU.

Also, it needs a different windows driver ( I forget which one), which needs to be installed by Zadig..

There is a separate thread about the F4 bootloader, but I can’t find it at the moment.

In that thread, there is also a software version of the same bootloader, ( which used DFUSe) , which may be more useful if the Core can automatically reset and then run the bootloader

However the bootloader is not clever like the F1 bootloader and it does not have a timeout , for normal startup, when the IDE is not about to upload ...

I think a better option in the medium term, is to try to port the existing F1 bootloader to the F4.

I found some sites in China which claim to have ported the F1 bootloader to the F4, but I think you have to buy the code, and I am not even sure the sites work at all, even if someone e.g. in China could pay the few dollars for the code...

So we will probably need to port the code ourselves..


Re:Core

STM32GENERIC may be the best option, because although the LibMaple F4 Core has the basic functionality, it does not have a lot of the advanced features like SDIO

User avatar
Squonk42
Posts: 323
Joined: Thu Dec 29, 2016 9:25 am
Location: Bordeaux, France

Re: F405 & F411 versions of the BluePill

Post by Squonk42 » Sat Feb 10, 2018 10:42 pm

OK, I will see what I am able to do under Linux :oops:

stevestrong
Posts: 2060
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany
Contact:

Re: F405 & F411 versions of the BluePill

Post by stevestrong » Sat Feb 10, 2018 10:43 pm

I think STLink would be the best upload method for F4, which is currently working without issues.
RogerClark wrote:
Sat Feb 10, 2018 10:16 pm
Re:Core

STM32GENERIC may be the best option, because although the LibMaple F4 Core has the basic functionality, it does not have a lot of the advanced features like SDIO
Well, according to the info here, the Arduino_STM32 core supports a lot of F4 stuff, including SDIO.

Post Reply