cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L496QEI oscillator frequency error

Dustin McIntire
Associate
Posted on August 30, 2017 at 21:03

I'm debugging a new board which uses the STM32L496QEI6 and found that the HSI and MSI clocks are running about 8% too slow which is way outside the specification. (This error shows up both on both the UART pins and TIM2 clock).  The VDD rail is set to 1.8V and measured to be 1.84V on the DUT.  There don't appear to be any noise problems with the 1.8V supply near the VDD pins .  Also this same schematic design has worked correctly with STM32L471QEI6 parts.  I've tested that these boards will run all the way up to 80MHz correctly so I don't suspect there is some type of supply sag problem.  I just have the clock offset error.  Is there a specific pin to probe for low voltage or some other item to check?

#msi #hsi #stm32-l4
3 REPLIES 3
Posted on August 30, 2017 at 22:25

Should be able to export the clocks via MCO (PA8) pin.

Input Capture against maximal TIM2 with a GPS 1PPS latching would measure effectively.

HSI spec'd at +/-1%

MSI supposed to auto-trim against LSE (32.768 KHz crystal), not dug into the mechanics there. Make sure any trim setting register isn't out of whack, or trashed by direct register writing.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Dustin McIntire
Associate
Posted on August 30, 2017 at 22:43

Thanks for the suggestions.  I have verified against a PPS source that the TIM2 capture latch is about 8% off.  The HSITRIM value is still at the default of 16.  I did investigate setting it to the maximum value of 31 to try and compensate, but I'm only able to remove about half the clock error.  For an LSE calibration fix, I unfortunately I left off the crystal option this time around since the previous version based on the 471 was working just fine.  

I will try bumping the VDD to 3.3 and see if this changes the offset, which may indicate VDD problems.

Posted on August 30, 2017 at 22:51

I've got a bunch of STM32L4 boards, sticking a GPS on the NUCLEO-L496ZG is on my immediate to-do list, I have a module ready to solder up that I meant to get to yesterday.

This and the NUCLEO-L476RG both have LSE crystals placed.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..