cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with PLL of the STM32F302

GYacc
Associate II

Hello, we're using the microcontroller STM32F302C8 and we have a problem with the PLL.

The problem is when we enables the PLL the microcontroller is reset. We have made several tests using HSI and HSE, but always the same result, a reset after to enable the PLL.

If we use the Sysclock directly from HSI or HSE the microcontroller works fine.

We check this with several boards and we're using the SDK 19.1 and 1.10.0 with both options HAL and LL.

Does anyone know what the problem could be?

Thanks & regards

1 ACCEPTED SOLUTION

Accepted Solutions
GYacc
Associate II

Dear, we've found the issue, there's a problem with pcb manufacturing.

Thanks for your time,

Regards

View solution in original post

4 REPLIES 4
Danish1
Lead II

So what you're saying is that you enable the PLL, wait for it to lock, and then - once you select the clock-source as PLL it crashes / resets itself.

Have you tried this on other stm32 (in other words is it specific to stm32f302 and not on others)? It's not a problem if you haven't, it just helps us to narrow down the problem. I don't see any pll-related errata for that device.

One possibility is that you're telling the PLL to go to a higher frequency than HSI or HSE. The FLASH memory can only work at a certain rate, and you need to tell the memory subsystem to insert a certain minimum number of wait-states in FLASH reads before you switch to the PLL source. (That number depends on the processor-family and the selected frequency; see the data-sheet and reference manual).

Have you tried running the PLL at 8 MHz or 16 MHz to rule this out?

Another possibility is that you're not properly checking that the PLL has locked. Although I guess not as you've tried both HAL and LL.

A third possibility - if this is your own pcb rather than a commercial demo-board - is that the power-supply is not sufficiently clean / stable for the PLL to be reliable. I've never had this problem myself, but don't rule it out.

A fourth possibility is that the PLL does not lock sufficiently-fast for your surrounding code. Maybe you have a watchdog-reset that fires while you're waiting.

Hope this helps,

Danish

GYacc
Associate II

It's the first time that happens to me, I've used several I of STM32F7, F4, F3, F1, etc. but particularity with this models I have this issue.

You are right, there isn't issue on errata.

HAL & LL seem to be ok, but I'm going to check again together the minimum of wait-states of the FLASH.

I measured power supply and this is clean and stable.

Watchdog is not enabled and I checked with several configuration of PLL, from the minimum (16MHz).

Another point is the reset happens after to enable PLL but before to use this as system clock. Also, I configured MCO output to provide PLL and system clock working from the directly from HSI, and the problem persists.

I'll check again all points that you have mentioned and bootloader over usb too.

Thanks

Output internal clocks via PA8/MCO pin, rather than switch to execution, and validate speed/integrity with a scope.

Make sure you have enough wait states for flash, appropriate for the voltage you're running the part at.

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

Dear, we've found the issue, there's a problem with pcb manufacturing.

Thanks for your time,

Regards