cancel
Showing results for 
Search instead for 
Did you mean: 

I cannot get high-frequency oscillator to work with STM32F765VGT6 MCU.

BitBanger46
Associate III

I have designed/developed more than 140 microcontroller-based boards utilizing 8, 16 and 32 bit MCU's. I recently designed a board that uses a STM32F765VGT6 MCU. During my initial power-up test, I verified that all of the voltages are in range. However, I have been unable to download any code into the MCU because the J-LINK debugger thinks the device type is incorrect. After many hours of troubleshooting, I discovered that the (25 mhz.) high-frequency oscillator is not working!! I tried 3 different crystals but the problem remains. I spent 8 hours verifying that the pin definitions on the schematic are correct. I have never had this kind of problem in all of my years of working with devices like this. I am attaching the simplified schematic. Any help from a fresh set of eyes would be greatly appreciated!!

6 REPLIES 6
Uwe Bonnes
Principal III

Even if HSE is not working, the device should run with HSI. "Thinks it is incorrect" ? What is the exact error? Did you try with another debugger/debug program , e.g. OpenOCD? Did you try with some 8 MHzcrystaL?

Piranha
Chief II

After reset the device starts from HSI. HSE is disabled and doesn't matter. If needed, it must be enabled later by software. I have multiple projects which run completely from HSI and doesn't use HSE at all - boards doesn't even have components for it and pins are used for other purposes. So don't search for a clock from HSE - that is not the problem. =)

NRST circuit has no delay and is wrong. Have you read AN4661 and looked at a reference schematic in it? Also...

  • What is the situation with voltages on VBAT and VREF+?
  • VDDA is recommended to be filtered.
  • I don't know about NJTRST on JTAG, but with SWD I use NRST pin.
TDK
Guru

VREF+ needs a voltage, you can't leave it disconnected. Tying it to VDDA would be fine. Not sure if that's the problem, but I can't see anything else wrong. As stated above, HSE is not needed to program, and isn't enabled at startup. NRST typically has a 0.1uF cap, but I doubt that's the problem. VDDA unfiltered is fine unless you want more ADC accuracy.

If you feel a post has answered your question, please click "Accept as Solution".
Uwe Bonnes
Principal III

The datasheet has this remark:

" If VREF+ pin is present, it must respect the following condition: VDDA-VREF+ < 1.2 V"

K.Ata15
Associate III

Hey,

You are not using an oscillator, but a crystal. With STM32 chips you need to have a crystal with the correct load capacitance, so you have to carefully check the electrical parameters data sheet for your selected MCU and compare when selecting a crystal. Also make sure you use the highest quality NPO caps around and be careful with PCB routing those nets.

BitBanger46
Associate III

Thank you to all of the community members who replied to my question. Although I had read the datasheet carefully, I forgot that the external oscillator circuits are enabled by the firmware during system initialization. (Prior to that time, the default configuration is the 16 MHz internal oscillator.) I also discovered that I had not set the clock configuration in the STM32CubeMX IDE to utilize the high-speed external crystal! The moral of the story is to mentally visualize what is happening on power up!!