cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with PLLCLK in STM32CubeMX

PR.19
Associate II

Hi, I am programming STM32F051R8TX controller using STM32Cube auto-generated code. The HSI clock for the controller is 8 Mhz which can be PLL’d to 48 Mhz. When I was using the discovery board (which has the same controller) the PLL was by default set to 48 Mhz and everything was working fine. Now have a custom PCB with the same controller in it and it seems that now the default setting is HSI 8Mhz. I didnt notice it before but I already tested code for LCD display, Printer etc and everything worked fine. Now when i noticed the HSI 8 Mhz clock I changed it to 48 Mhz using PLL option and the controller wont program again(After programming fine for first time). This code is generated by STM32Cube and the exact code works fine when i connect my discovery board to program. To make my board work I had to switch back to HSI 8 Mhz with no PLL, and now everything is back to normal. Why is it that I can use PLL in discovery board and not my PCB, Can anyone help me out with this problem?

4 REPLIES 4

Are all VSS/VDD including the analog ones connected properly (double-check for bad solder joints)? Is there adequate grounding, decoupling, can the power supply safely provide all the current needed for higher frequency operation?

JW

Perhaps there are design issues.

You could perhaps try different PLL settings, check flash wait states, and export internal clocks via MCO (PA8) pin, and by reporting register settings and SystemCoreClock, etc to a console or display.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
PR.19
Associate II

@Community member​  Yes, There seems to be no issue in power,ground or soldering. However as you mentioned the analog supply and ground pins are unconnected since I don't use the ADC. Could this really be the problem?

Yes. Not only ADC uses that supply pins, but - among other things - also the PLL...

JW