Skip to main content
Kishan Joshi
Associate III
November 28, 2020
Solved

STM32F765 EXTERNAL CRYSTAL

  • November 28, 2020
  • 19 replies
  • 3875 views

I have custom stm32f765 board it has very minimal design. only some caps and resistor for the reset and boot. My problem is i have attached hse crystal of 16Mhz.

this one

https://www.digikey.in/product-detail/en/epson/TSX-3225-16-0000MF09Z-AC0/SER4069DKR-ND/5413941

and also 12pf ceramic capacitors. i have configured a code to work with hse but still it is not working is there anything i can do to check wether external crystal is working or not ?

by debugging the code i came to know that

while (__HAL_RCC_GET_FLAG(RCC_FLAG_HSERDY) == RESET)

    {

     if ((HAL_GetTick() - tickstart) > HSE_TIMEOUT_VALUE)

     {

      return HAL_TIMEOUT;

     }

    }

code is not going further from this lines  

Can you please guide my how can i debug. ? since the same code is working on the nucleo and nucleo has stlink external clock.

Thank you.

This topic has been closed for replies.
Best answer by Piranha

AN4661, AN4879, AN2867,

https://blog.adafruit.com/2012/01/24/choosing-the-right-crystal-and-caps-for-your-design/

NRST has an internal pull-up - remove the R2. That can also be related to your HSE problem.

19 replies

Tesla DeLorean
Guru
November 28, 2020

Not a software issue.

You'll want to tune the characteristics of the circuit, perhaps review application note, and check your math.

The STM32 permits the HSE to be output by MCO/PA8, this can be used to inspect the clock non-invasively.

More invasively you can probe the crystal pins, but this changes the capacitance. If probing causes it to start properly then it is a matter of getting the loading right.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Tesla DeLorean
Guru
November 28, 2020

Try some capacitors in the 4-5pF range

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Kishan Joshi
Associate III
November 28, 2020

Oh so 12pf won't work? I thought datasheet says 9pf. So 12pf will work fine. ​

Piranha
PiranhaBest answer
Principal III
November 30, 2020

AN4661, AN4879, AN2867,

https://blog.adafruit.com/2012/01/24/choosing-the-right-crystal-and-caps-for-your-design/

NRST has an internal pull-up - remove the R2. That can also be related to your HSE problem.

Kishan Joshi
Associate III
December 1, 2020

Oh ok , i thought we have to pull up the nrst.. i will try that out today and will report thank you sir..​ and that adafruit link is very helpful i will try these solutions and get back to you thank you