1. The board is now smaller. I have increased the capacitor and resistor sizes to 0805 for hand soldering. I am not going to hand solder the MCU so if the price difference isnt much between machine soldering the MCU as well as the remaining components I might revert back to smaller size. That way I can make the board even smaller.
When the MCU is to be soldered by the PCB manufacturer, it won't be that more expensive to have them solder the other smd components too. The headers will most likely raise the cost more if manual labor is needed for it. But a 48 pin lqfp is not that hard to solder. Just solder a single corner pin first and make sure the alignment is correct. The solder a pin from the opposite corner. Now the part is fixed in place and you can solder the remaining pins.
This is how I usually solder SO8 components however I need more practice. I will definitely solder the headers myself, that is easy.
4. Each 3.3V pad has its own capacitor but 3.3V is connected together under the MCU like pcprogrammer's GND traces seem to be under the MCU. Is this okay?
I have a ground plane on both sides of the PCB and the ground traces you mention are part of that plane. Due to EasyEDApro not connecting the MCU ground pins automatically I use traces to make these connections.
Having the power traces under the MCU should not be a problem, but I would recommend using thicker traces for power. When you look at the top side of my board you can see that I use a lot wider traces for the 3.3V. It depends on current needed through them, but having wider traces also reduces on inductance.
I have increased the 3.3V track width from 0.2mm to 0.4mm because it looked double in your board view and the 12V is now 0.5mm. Although the trace going to pin 48 from under the MCU needs to stay at 0.2mm otherwise it causes clearance errors during DRC checks.
5. Oscillator is closer to the MCU.
There is still room for improvement. Try moving the components around a bit to make the traces shorter and have less bends.
I have moved the oscillator slightly closer to the MCU and turned it so that the traces can be straighter.
6. Boot switch is now just a header on which I will use a jumper instead if I want to boot into bootloader. I make mistakes sometimes for example not selecting serial debug in cube mx and end up in a state where once programmed, I cannot reprogram the MCU so I need boot0.
This makes no sense to me. With the SWD interface it should always be possible to program the MCU. In case of issues all that is needed to get it done is connect while the MCU is held in reset. SWD should be active no matter what in that case. (maybe when a special fuse has been blown, but that would screw up way more)
Maybe I remember it wrong then but I do remember having an issue where I could not reprogram through the stm32IDE so I
think I used STM32Programmer and set the boot jumper to the other position to get it to read, erase and reprogram.
7. Removed the separate circuit for 3.3V analog supply (3.3VA). pcprogrammer, I think this is what you have done for MCU pad 9 (VDDA) too in your schematics (yellow circle in the picture below). So C11 and C12 are removed.
I only use such a filter setup when I plan on using the ADC of the MCU. Otherwise I just connect it to Vcc with it's own decoupling cap.
I will add these later then if I use ADC.
8. All the VSS and GND pads for the capacitors are now connected to GND using their own Vias.
Adding a top layer ground plane does not cost extra and improves on shielding and ground impedance.
Something I am looking at how to do now in KiCad.
@pcprogrammer, I note from your schematic that you don't place a larger capacitor with the decoupling capacitors, many other examples I have seen do. Could you help me understand why some do this? @PGPG is it because of what you said about small ceramic capacitor and bigger electrolytic problem doesn't exists because of high ESR of electrolytic?
In my schematic there is a bigger cap in the 3.3V power supply and with such a small board that is enough.
So I will leave a 4.7uF capacitor in the circuit now.
This is a difficult topic to address, on when, where and why to add more capacitance to your schematic. I'm no expert on it either.
For boot0, I have now implemented three pins, a jumper will either set the pin to high or low. I have also added a pull down resistor and small capacitor to the NRST pin as
@gamalot suggested, I guess this will prevent erroneous resets due to noise if NRST pin is not connected because I never really use it with ST link. You also mentioned in reply#7 that PB2 needs to be set to a state. Thanks.
Edit: I am also now confused, the reference manual tells me the NRST will cause a reset when set to low:
"
System reset
A system reset sets all registers to their reset values unless specified otherwise in the
register description.
A system reset is generated when one of the following events occurs:
1. A low level on the NRST pin (external reset)"
Every time I have programmed a black pill (STM32F411), I have never connected the NRST to the ST-Link so it must mean it is pulling this pin up on the board?