2017-09-13 07:50 PM
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.2017-09-13 10:58 PM
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)
2017-09-14 05:09 AM
,
,
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.
2017-09-14 10:14 AM
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.
2017-09-14 11:50 PM
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 startI 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.2017-09-15 08:13 PM
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.
2017-09-15 08:32 PM
/* Output LSE on MCO1 pin(PA.08) */
HAL_RCC_MCOConfig(RCC_MCO1, RCC_MCO1SOURCE_LSE, RCC_MCODIV_1);2017-09-16 03:12 AM
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.
2017-10-04 07:33 AM
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
2023-09-21 08:55 AM
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