SYSCLOCK configuration problem on STM32F100VE
Hello,
I have a software that has been working
fine for several years on a STM32F100VCT6. However, today we are trying to use this
software on the MCUs ref: 100VDT6 or 100VET6.
On these 2 new references no programming problem with the same binary file. On the 100VD everything works fine too, but on the 100VE there are problems.
After analysis, the problem comes from the initialization of the CPU clock. In our application, we use an external oscillator 8Mhz and configure the PLL to have SYSCLK=24MHz. (PREDIV1 ="/2" and PLLMUL="x6")
On the VC and VD the SystemCoreClock returns =24MHz, but on the VE SystemCoreClock returns =48MHz however it is not possible on this MCU: the max is 24MHz so that's why it does not work.
I checked the RCC registers after the same initialization phase:
- On the VC and VD ref, I have CFGR= 0x0013000A CFGR2=0x00000001
- On the VE ref, I have CFGR= 0x0011000A CFGR2=0x00000000
it seems that the writing to the CFGR2/PREDIV1 bits or PLLXTPRE bit doesn’t work on the 100VE ref. Why?
I am very surprise of this behavior because these 3 MCUs are from the same family: STM312F1 Value Line, so the same core and same peripherals, only the flash and ram size should be different.
To be sure, I tried creating a new project with the latest version of the ST library to verify the problem doesn’t come from my old versions of files. I used STMCubeMX and created a new empty project for the STM32F100VE with the same clock configuration but no changes, it also doesn’t works. I have the same observations CFGR2/PREDIV1 bits or PLLXTPRE bit are not written.
Do you have any idea why I have this behavior and if this issue is already known on this MCU reference?
Do you have any idea how to configure the RCC registers to have compatibility between these 3 references?
Thanks for help.
