2023-04-26 05:02 PM
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?
2023-05-02 09:00 AM
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:
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.
2023-05-02 10:26 AM
2023-05-03 02:32 AM - edited 2023-11-20 07:03 AM
Hi @jeff Tenney ,
Thanks for coming back with the detailed answer.
Could you please precise:
Also, please consider this input from the reference manual:
-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.
2023-05-03 05:41 PM
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.
2023-05-08 03:15 PM
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.
2024-06-27 11:59 AM
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
2024-06-27 01:36 PM
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.
2024-06-27 02:56 PM
2024-07-03 01:19 AM - edited 2024-07-03 01:46 AM
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.