cancel
Showing results for 
Search instead for 
Did you mean: 

Question: How to check the waveform of the LSE - External 32.768KHz XTAL clock

F Nabe
Associate II
Posted on September 14, 2017 at 04:50

I'm developing the firmware for our custom CPU-Board with STM32F769NIH6,

and checking RTC function using LSE clock.

It seems working correctly, but can't see the waveform of LSE clock.

Our circuit of the LSE clock is the same as 'STM32F769 Discovery kit'(STM32F769I-DISCO) .

... External 32.768KHz XTAL connected to the MCU pins (PC14-OSC32IN, PC15-OSC32OUT) via resistor (0 ohm), and added the load capacitors.

I made a program by using CubeMX.

When the program is running, MCU register 'RCC_BDCR' is set '0x8103'.

I think that it mean...

  a. The LSE clock is used for RTC.

  b. The MCU is working well.

and RTC HAL fuction(SetTimeInfToRtc etc.) seems working correctly.

So, I checked PC15-OSC32OUT pin by using an oscilloscope.

But...

  a. I expected the LSE clock (32.768KHz). But,There is no LSE clock.

  b. There is just only several hundred mV flat line.

Of course, the PC14-OSC32IN pin also has no LSE clock.

I think that the waveform of the LSE clock can see at the MCU pins:

OSC32IN and/or OSC32OUT, is it correct?

Or another method/pin to check the LSE clock ?

# I need to see the waveform of the LSE clock because of adjusting

the value of the load capacitors for New 32.768KHz XTAL.

Please give me an information.

Thank you.
9 REPLIES 9
Posted on September 14, 2017 at 07:58

What are the specifications for the LSE crystal chosen, and capacitors placed?

You can export LSE via the MCO (PA8) pin so as not to effect the circuit by probing.

The LSE frequency can also be benchmarked on TIM5 against the system clock.

LSE must be enabled, and come ready, it will not start automatically.

This material is covered in the Reference Manual (RM0410)

http://www.st.com/content/ccc/resource/technical/document/reference_manual/group0/96/8b/0d/ec/16/22/43/71/DM00224583/files/DM00224583.pdf/jcr:content/translations/en.DM00224583.pdf

 
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on September 14, 2017 at 12:09

 ,

 ,

Dear Clive One,

 ,

Thank you very much for your reply.

>, What are the specifications for the LSE crystal chosen, and capacitors placed?

The specification of the compornents are following:

Extarnal 32.768KHz XTAL : FC-135 (Seiko-Epson)

 ,

 , , 32.768000KHz, +20.0-20.0ppm, CL=7.0pF

 ,

 , ♯ Cannot get NX3215SA-32.768K (NDK) , so used similar XTAL.

Load Capacitors : CL1 = CL2 = 3.9pF

 ,

 , ♯ Calucurated from the formula of AN2867 capt.3.3 (Cs=5pF)

 ,

 , ♯ I tried less value (CL1 = CL2 = 2pF) , but it was the same result.

 ,

>, it will not start automatically.

Is this about 'LSEON'Bit in the MCU register 'RCC_BDCR'?

 ,

The 'RCC_BDCR' status is '0x8103'.

 ,

The 'LSEON'(Bit0) is set to 1.

Could you tell me the 'start' sequence if I had mistaken?

 ,

Which section of the manual(RM0410) should I read?

 ,

I will confirm about 'PC8' and 'TIM5'.

 ,

But, PC8 is already used another function...

Thank you.

Posted on September 14, 2017 at 17:14

PA8 not PC8

I'm not responsible or involved in your board design, in terms of bring-up and testing you might need to start with portions of the circuit and test them individually while disconnecting other pieces you overlooked in the design.

If the HSI_ON does not cause the crystal to start and assert HSI_RDY or it takes too long for it to start, then you'll need to focus on those components first, and experiment with other working hardware to compare/contrast your experience.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on September 15, 2017 at 06:50

Dear Clive One

Thank you for your help.

> PA8 not PC8

Sorry, It was my mistake of a typing. PA8 is right.

> If the HSI_ON does not cause the crystal to start and assert HSI_RDY or it takes too long for it to start

I saw the MCU register 'RCC_CR'.

It was '0x3077F83'.

The HSIRDY(Bit1) and the HSION(Bit0) are set to 1.

I think that it mean 'HSI oscillator is ON and READY'.

Is there a problem with this condition?

I think that the LSE clock will be output in this state.

(Actually, it is not output yet...)

This parts same as 'STM32F769 Discovery kit'...

Why can not we measure...

Thank you.
Posted on September 16, 2017 at 03:13

Ok, so it says HSI is ready, perhaps your scope probes load the circuit and stop it oscillating? You should export the signal via MCO, that way it doesn't load the crystal.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on September 16, 2017 at 03:32

  /* Output LSE on MCO1 pin(PA.08) */

  HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_LSE, RCC_MCODIV_1);
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on September 16, 2017 at 10:12

Dear Clive One

Thank you so much.

>> You should export the signal via MCO

> HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_LSE, RCC_MCODIV_1);

OK. I'll try this, when I'm ready.

I wish the LSE waveform can be taken successfully from our board...

Thank you.

Posted on October 04, 2017 at 14:33

Dear Clive One

Sorry too late.

I checked the PA8 by using

> HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_LSE, RCC_MCODIV_1);

But, Unfortunately, There was no LSE waveform on PA8.

It's same as PC15-OSC32OUT(flat line).

I think that I need 'turn on something bit' or 'call any HAL function' to output the LSE waveform....

Thank you

Have you also configurate the pin PA8? You have to configurate also the pin PA8 adding the info about the alternate function equal to GPIO_AF0_MCO