cancel
Showing results for 
Search instead for 
Did you mean: 

MSI PLL-mode is crashing with use of Stop modes at cold

Jeff Tenney
Senior

I'm using STM32L486 at 2.5V.

The MSI auto calibration feature (aka PLL mode) is crashing at cold temperatures with specific usages of Stop mode. When it crashes, it drives MSI to its minimum frequency for the selected range. For example, the 24 MHz range produces 17.9 MHz when the PLL mode crashes. To restore proper PLL function, either a very long power down is required, or the software must allow the MSI in PLL mode to run uninterrupted by Stop modes for several seconds.

(Note that LSE is working perfectly; I have enabled the LSECSS system and tested its functionality. There are no LSE anomalies, not even when the PLL-mode crashes. If I induce an LSE anomaly, LSECSS catches it.)

Is MSI PLL-mode supposed to be compatible with Stop modes? Obviously the MSI stops in Stop mode, but is it supposed to be safe to stop and start the MSI this way even with PLL-mode enabled? Does PLL mode require a minimum run time before software should attempt to re-enter Stop mode?

9 REPLIES 9
Amel NASRI
ST Employee

Hi @Jeff Tenney​ ,

With the description you provided, I assume that you may be facing one of the following limitations described with details in the product errata sheet:

  • 2.3.13 PLL may not lock if VCO is below 96 MHz and temperature is below 0 °C
  • 2.3.15 MSIRDY flag issue preventing entry in low power mode

Please check if it is the case and try to apply suggested workarounds.

-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.

Amel -
Thank you for the reply. I have checked those errata but am not having either of those issues. Regarding 2.3.15, my system is entering low power modes correctly, even when experiencing the MSI PLL problem. Regarding 2.3.13, I am not using that PLL.
For clarification, the issue I am having is with the MSI auto-calibration feature (sometimes called MSI PLL mode). It's not related to "the PLL", which is the programmable device that produces PLLCLK.
Do you know if there are restrictions related to using the auto-calibration feature simultaneously with Stop modes? If there are no such restrictions, then the MSI auto-calibration feature has an issue at cold.

Hi @jeff Tenney​ ,

Thanks for coming back with the detailed answer.

Could you please precise:

  • does the crash occur at wakeup from stop mode?
  • does it work properly at ambient temperature?
  • at which temperature the crash occurs?

Also, please consider this input from the reference manual:


_legacyfs_online_stmicro_images_0693W00000bjHdIQAU.png-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.

Jeff Tenney
Senior

Hi Amel,

I will try to put together some tests to answer your first question, but I believe it crashes when entering or exiting stop mode. The crash *may* be occurring when this happens at cold:

Exit Stop Mode

Run Mode for 100-200 microseconds.

Enter Stop Mode

I plan to capture the crash on an oscilloscope with one trace indicating stop mode and another trace showing MSI.

I have not been able to get it to crash at ambient temperature nor at hot (+70 deg C). From 0 deg C down to -40 deg C it gets easier to reproduce.

That quote from the Reference Manual indicates that PLL mode essentially starts over when exiting stop mode, so the application cannot expect the MSI frequency to be stable until the stabilization time has elapsed after each wakeup. In my application, if the current operation requires MSI to be stable, I do wait. Otherwise I don't wait and could end up with scenarios like the one above (run mode for only 100-200 microseconds) when there is very little work to do.

Once PLL-mode crashes, the stabilization times no longer work. For example, the stabilization time to reach within 1% of the final frequency is 2.5 msec. Once it crashes, leaving it running continuously for 2.5 msec (or even 250 msec) doesn't help the MSI frequency. It's still 17.9 MHz when set for 24 MHz. Leaving it running for *multiple seconds* does finally restore normal PLL-mode operation.

Jeff Tenney
Senior

Amel, I have captured evidence on a logic analyzer by watching MSI on the MCO pin. The MSI PLL-mode crashes in one of the captures. I can provide some .sal files (Saleae Logic 2) if you'd like. Just let me know how best to get them to you. The capture of the crash is only about 6.5MB. Another capture, which shows how long it takes to recover proper PLL function, is 79MB because MSI runs continuously for almost 14 seconds.

There is definitely a problem with MSI PLL mode in combination with Stop modes at cold.

Hi @Jeff Tenney ,

I wonder if ST did assist you in this case, or you were able to draw any conclusions in this case.

Thanks for your remarks,

JW

Hi @waclawek.jan ,

No further help from ST beyond this thread.  I finally concluded that the MSI in PLL mode has an undocumented minimum allowed run time.  The data sheet gives only stabilization times but no minimum run time.  Based on the provided stabilization times, the PLL is "guaranteed" to be within 10% of its target frequency within 0.5 msec, and within 5% of its target within 1.25 msec, and within 1% within 2.5 msec, on many 'L4 devices.  So a minimum run time of 500 usec is likely to be safe.  In my application I enforce a minimum run time of 3 msec, just because all of this is undocumented.  That "fix" eliminated the issue.

Hi Jeff,

Thanks for the detailed description.

Jan

@Jeff Tenney 

Amel NASRI
ST Employee

Hi @Jeff Tenney & @waclawek.jan ,

Thanks @waclawek.jan for raising again this request. it was my fault, I missed to follow this request as I was concerned by the migration to new platform for the Community at the same period of time.

Thanks @Jeff Tenney for provided details. I'll submit an internal ticket for farther analysis. I'll keep you informed about the progress.

-Amel

PS: Internal ticket submitted for follow-up (ID: 185620).

 

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.