2020-02-16 04:46 AM
Hi,
as there is apparently no more spread spectrum functionality in the STM32H7 to reduce EMI, is there some counterpart? I heard that the PLL fractional divider might be used for that purpose, but the amount of processor overhead to change the three PLLs say once every millisecond sounds like a lot. Is there a better way to have a similar functionality? Does anyone use the fractional divider in such a way?
Best regards,
Max
2020-02-17 02:17 AM
I haven't actually used it that way, but it should be possible according to the reference manual.
If the application intends to tune the PLLx frequency on-the-fly (possible only in
fractional mode), then:
a) PLLxFRACEN must be set to ‘0’,
When PLLxFRACEN = ‘0’, the Sigma-Delta modulator is still operating with the
value latched into SH_REG.
b) A new value must be uploaded into PLLxFRACR (FracValue(n)).
c) PLLxFRACEN must be set to ‘1’, in order to latch the content of PLLxFRACR into
its shadow register.
A few lines of code in the probably already existing 1kHz system tick interrupt handler is not a big deal for a MCU running at maybe 480 MHz.
uint32_t pllcfg = RCC->PLLCFGR;
RCC->PLLCFGR = pllcfg & ~ RCC_PLLCFGR_PLL1FRACEN;
RCC->PLL1FRACR = whatever;
RCC->PLLCFGR = pllcfg;
2020-02-25 01:36 PM
Well, then I will just give it a try. I was not so happy about changing all three PLLs every ms, but you are right, it should not be that much overhead.
Thank you!
2021-03-11 09:11 AM
Hi MaxMax,
Did you give it a try as you said ? If yes, was it successful ? Thank you for your answer.
Regards,