cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F446 HSE, HSI problem.

GSay.1
Associate II

Hi guys,

I'm facing a problem with STMF446RE MCU. I designed custom stm32f446re board. When i try to upload a program, it uploads successfully but it does not execute it. In STM32CUBEIDE, i can connect a device and achieve debug mode. In debug mode,  SystemClock_Config(); is freezing but only in HSE. if confg my mcu clock internal resonator HSI, my program works. But in External resonator mode HSE, the SystemClock_Config is freezing in debug mode and program does not execute it. what can be the problem?

Thank you.

6 REPLIES 6

> is freezing but only in HSE

Your HSE oscillator does not oscillate. Check crystal, check capacitors if they are of proper value, check connections for opens and shorts.

JW

GSay.1
Associate II

I checked them but nothing changes. I also tried different crystals and capacitors but it remain same.

Single-step through the code. Where does it exactly "freeze" and how?

Try your code on a "known good" board such as Nucleo or Disco (not necessarily 'F446 - any 'F4 or would do, the clocking scheme is similar).

JW

What are you doing with BOOT0 pin? Pulled to ground? VCAP pins? What voltages do you see there?

Write a very small app that just brings up the clocks, perhaps review the RM, and just walk in a couple of interactions with the RCC registers to bring HSE_ON.

Perhaps also route HSE to MCO pin (PA8) so you can measure the the clock without loading the crystal with a scope. Determine if it comes on, how quickly, etc.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

In void SystemClock_Config(void), i comment out only;

{

 RCC_OscInitTypeDef RCC_OscInitStruct = {0};

 RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};

 /** Configure the main internal regulator output voltage

 */

 __HAL_RCC_PWR_CLK_ENABLE();

 __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE3);

 /** Initializes the RCC Oscillators according to the specified parameters

 * in the RCC_OscInitTypeDef structure.

 */

 RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;

 RCC_OscInitStruct.HSEState = RCC_HSE_ON;

and it freeze on last line. I already tried on discovery and it works.

Thanks for your reply.

it s pulled to ground and 3.3v i tried both of it one by one and nothing changes. 4.7 uf has been used for Vcap capacitor and there is 1.135v on it. Okay i ll try what you said mate.

Thanks for your reply