2018-01-26 09:50 AM
Hi,
I have a problem with the PLLSRC of a STM32F030RC : to obtain 24MHz for the sysclk I have to use PLLMUL @ x6 with HSI (8MHz) but 6x8 = 48MHz ?
If I output the sysclk on a MCO pin (with no div) I have actually 24MHz.
After use of SystemCoreClockUpdate() from system_stm32f0xx.c the variable SystemCoreClock equals to 48000000 and my call to SysTick_Config(SystemCoreClock/1000) gives a wrong systick frequency ( 2 x too slow, the actuel sysclock is 24000000).
In the reference manual RM0360 at the figure 11 I see no div /2 between HSI and PLLSRC for my STM32F030xC.
But the behaviour
seems like in the figure 10, with a /2 ....
Where is the mistake ?
Thanks
Peter
Solved! Go to Solution.
2018-06-28 08:37 AM
2018-01-30 08:26 AM
Hi
Miles.Peter
,Please check the content ofRCC_CFGR2: is PREDIV set to '0001' or '0000'?
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2018-02-25 04:05 AM
Hi Amel,
Sorry for my late reply. But it is still a mystery for me, I checked the PREDIV of the RCC_CFGR2 and it is '0000'.
So I have tried with RCC_CFGR2 set to '0001' and even '0010', but it has no effect on the output frequency still at 24MHz with my
PLLMUL @ x6.
On the other hand I am able to read these values in debug mode with atollic and it seems this register is well programmed.
The behaviour is really like a STM32F030x6 and not a STM32F030xC .
Is it a bad interpretation of the reference ? My chip is marked as STM32F030RCT6. Is it a x6 or a xC ???
Thanks for your help.
Peter
2018-06-13 07:54 AM
Hi
Miles.Peter
,Sorry to come back to this discussion so late.
I would like to inform you that we made the test from our side using the same configuration as yours to output SYSCLK on MCO. The output frequency is 48 MHz.
To continue investigating the issue,could you please share the content of both registers RCC_CFGR and RCC_CFGR2?
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2018-06-28 07:59 AM
2018-06-28 08:37 AM
Use this setting:
JW
2018-06-28 09:16 AM
Hi Jan,
your document is RM0091 but the ref. manual for my STM32F030RCT6 is RM0360.
In the RM0360 there is a HSI/2 selection as PLL input in the register description, but not in the figure 11. That is what I don't understand and what doesn't match with my C drivers.
2018-06-28 09:39 AM
I know.
Just try.
Jan
2018-06-28 10:48 AM
Thanks
Miles.Peter.001
for sharing these inputs.Could you please also check that DEV_ID value is 0x442 and REV_ID value is 0x1000? [read DBGMCU_IDCODE, address 0x40015800].
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2018-06-28 11:08 AM
void CORECheck(void) //
mailto:sourcer32@gmail.com
{ uint32_t cpuid = SCB->CPUID; uint32_t var, pat;printf('CPUID %08X DEVID %03X REVID %04X\n', cpuid, DBGMCU->IDCODE & 0xFFF, (DBGMCU->IDCODE >> 16) & 0xFFFF);
pat = (cpuid & 0x0000000F);
var = (cpuid & 0x00F00000) >> 20;if ((cpuid & 0xFF000000) == 0x41000000) // ARM
{ switch((cpuid & 0x0000FFF0) >> 4) { case 0xC20 : printf('Cortex M0 r%dp%d\n', var, pat); break; case 0xC60 : printf('Cortex M0+ r%dp%d\n', var, pat); break; case 0xC21 : printf('Cortex M1 r%dp%d\n', var, pat); break; case 0xC23 : printf('Cortex M3 r%dp%d\n', var, pat); break; case 0xC24 : printf('Cortex M4 r%dp%d\n', var, pat); break; case 0xC27 : printf('Cortex M7 r%dp%d\n', var, pat); break;default : printf('Unknown CORE\n');
} } else printf('Unknown CORE IMPLEMENTER\n');}