Skip to main content
Mikhail Lipatov
Associate II
November 14, 2019
Question

STM32L4 Wrong MSI speed

  • November 14, 2019
  • 7 replies
  • 1780 views

Hello! I noticed a speed error on MCU L476 and L433. When setting MSI frequency to 1 MHz, the frequency is 1015.5. (Auto trimered by LSE, LSE enabled and work well) At higher frequencies, the operation is normal. What could be the reason?

This topic has been closed for replies.

7 replies

waclawek.jan
Super User
November 15, 2019

And at lower frequencies?

Have you read out and checked RCC_CR.MSIPLLEN?

Have you checked that LSE is actually running?

JW

Mikhail Lipatov
Associate II
November 15, 2019

at lower frequencies below 1Mhz MSI get wrong freq, wen i set freq abowe 1 MHz MSI work well.

LSE actually running.

I see this in the care of the frequency when heating and cooling the chip. Indeed, auto-tuning works excellently. When I turn off the MSI, the frequency is very temperature dependent. I would like to work on a frequency selective and below 1 MHz with auto-tuning by MSI.

Mikhail Lipatov
Associate II
November 15, 2019

Set measured Error %

100000 98306 1,694

200000 196614 1,693

400000 393227 1,69325

800000 786453 1,693375

1000000 1015836 -1,5836

2000000 1998902 0,0549

4000000 3997804 0,0549

8000000 7995608 0,0549

16000000 15991217 0,05489375

24000000 23989823 0,0424041667

waclawek.jan
Super User
November 15, 2019

Okay, and with the MSIPLL on, the 1MHz is always off 1.5%, or does it change with temperature?

Can you please have a look at whether RCC_CR.MSIPLLEN stays on?

JW

Mikhail Lipatov
Associate II
November 15, 2019

1MHz is always off 1.5%, good temperature stability. When I turn off the LSE, the frequency is 998 kHz and is very temperature dependent

RCC_CR.MSIPLLEN

SET_BIT(RCC->CR, RCC_CR_MSIPLLEN) ;

waclawek.jan
Super User
November 15, 2019

Sounds like a hardware bug, then...

JW

@Amel NASRI​  , @Viktor POHORELY​ 

Mikhail Lipatov
Associate II
November 15, 2019

Yes, but in erratasheet not fixed.

I would like to work at low frequencies with quartz stability. But HSE quartz consumes a lot of energy (above 1mA)... It seems that you will have to work at a frequency above 2 MHz