We are designed and printed the PCB of the stm32f103c8t6 blue pill board as per stm rules..
After fabrication and assembly finished, we connect the board to Keil software and device detected and the program also uploaded perfectly… we faced some problems listed below…
1.ADC value varied in the difference of ( + or – 50 ) ..total range is (0 – 4095)
2.we crossed checked the program with stm bluepill ( amazon board )..it works fine…but our pcb boardADC
value varied…it means program is good and hardware is something wrong.
3.we removed the crystal oscillator (8Mhz) in our board..ADC value works fine in our board.
Anybody kindly helps me with this problem..?
I have attached below the schematic layout image..
Best Answer
I agree with analogsystemsrf that the power supply of the MCU is the likely problem. But there are more problems than mentioned.
Have a look at Application Note AN2586 (Getting started with STM32F10xxx hardware development). It clearly outlines how the power supply should be designed. Several issues should be improved:
Update
As an example for a STM32F103C8 design with components on a single side only, see the below board.
I don't have the schematic or PCB layout but I'm quite confident the capacitors near the corners of the STM32 MCU are the decoupling capacitors. The component near the pins A2/A3 might even be a ferrite bead for the analog supply.