Skip to main content
Oliver Sedlacek
Senior
Aug 10, 2020 3:56 PM UTC
Solved

STM32F767 LSE oscillator not oscillating, why?

I've hung a 32.768kHz crystal (IQD) on to my STM32F767VGT6 with a pair of 10pF caps as per AN2867, but I'm not getting the LSE to oscillate. If I route the LSE to an MCO output I see random transitions, which explains why the RCC status bit shows it's running but it clearly isn't. I tried some other crystals I had to hand, no difference. Can someone confirm I don't need to set the GPIO AF fields, I just need the LSE enabled?

This topic has been closed for replies.
Oliver Sedlacek
Oliver SedlacekBest answer
Senior
Aug 13, 2020 4:28 PM UTC

OK, so the problem was too much load capacitance. Stability now looks very good with 0pF.

5 replies

waclawek.jan
Super User
Aug 10, 2020 4:26 PM UTC

Hi Oliver,

You don't need to set GPIO AF fields, just need LSE enabled =)

You haven't set LSE bypass, have you? Read out and check RCC_BDCR. Try to play with LSEDRV.

Is this a "known good" board like Nucleo or Disco or Eval? If not, you might want to try on one of those first.

I hope you've learned to ditch Cube by now.

HTH,

Jan

Tesla DeLorean
Guru
Aug 10, 2020 4:44 PM UTC

Seem to remember the F7 NUCLEO-144's having X2 (LSE) populated.

I'd watch the type of crystal chosen (6, 9 or 12pF) and the appropriate capacitors. The F1/F2/F4 were super fussy about 6-7 pF crystals, but thought the oscillator had been improved since then.

Per Jan, just attach and enable on the RCC side.

PC13..15 are in the low power domain, with low current sink/source capabilities.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Oliver Sedlacek
Senior
Aug 10, 2020 9:19 PM UTC

Thanks for the responses. It's my own board, so maybe I'll try a Nucleo and then lift a 'known compatible' crystal off it. My frustration with the Cube remains unabated because I just don't know what it's not doing for me. I've nearly ditched it for the RTC, not least because initialising the RTC on reset is NOT what it should be doing. The HAL layers implemented as preprocessor code are hopeless, even though IAR manages to squeeze out impressively optimised code.

Oliver Sedlacek
Senior
Aug 13, 2020 11:00 AM UTC

So I thought the LSE wasn't working on the nucleo but actually it does, as long as you don't put a 'scope probe on the crystal. Not sure what that's telling me though.

Oliver Sedlacek
Oliver SedlacekAuthorBest answer
Senior
Aug 13, 2020 4:28 PM UTC

OK, so the problem was too much load capacitance. Stability now looks very good with 0pF.