2020-03-17 03:34 PM
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!!
2020-03-17 03:46 PM
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?
2020-03-17 04:27 PM
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...
2020-03-17 07:10 PM
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.
2020-03-18 03:21 AM
The datasheet has this remark:
" If VREF+ pin is present, it must respect the following condition: VDDA-VREF+ < 1.2 V"
2020-03-18 08:44 AM
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.
2020-03-18 02:59 PM
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!!