2018-03-26 08:52 AM
Hi
I have following Problem:
At <65 °C ambient temperature and PowerOff-On.
My STM32f373 works fine.
At> 65 ° C ambient temperature and PowerOff-On
I get a HardFault Error at the following function:
void SystemClock_Config(void)
{.............
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
{ _Error_Handler(__FILE__, __LINE__); }............
}What is wrong?
Can someone help me ?
Kind regards
Roger
2018-03-26 09:18 AM
Try increasing the wait states, assuming you are running at 72 MHz
Observe the performance of the supply at/over temperature profile.
2018-03-26 09:28 AM
Hi
Schweizer.Roger
,Can you output theclock on MCO ? we need to check if there is any deviation of the clock when increasing temperature.
-Nesrine-
2018-03-26 09:36 AM
What's in RCC_ClkInitStruct?
JW
2018-03-26 12:11 PM
Hopefully something like this, uphill skiing is no fun at low levels of difficulty..
/**
* @brief System Clock Configuration * The system Clock is configured as follow : * System Clock source = PLL (HSE) * SYSCLK(Hz) = 72000000 * HCLK(Hz) = 72000000 * AHB Prescaler = 1 * APB1 Prescaler = 2 * APB2 Prescaler = 1 * HSE Frequency(Hz) = 8000000 * HSE PREDIV = 1 * PLLMUL = RCC_PLL_MUL9 (9) * Flash Latency(WS) = 2 * @param None * @retval None */static void SystemClock_Config(void){ RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; // Clear autos for safety RCC_OscInitTypeDef RCC_OscInitStruct = {0};/* Enable HSE Oscillator and activate PLL with HSE as source */
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; RCC_OscInitStruct.HSEState = RCC_HSE_ON; // Or BYPASS for external source RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV1; RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL9; if (HAL_RCC_OscConfig(&RCC_OscInitStruct)!= HAL_OK) { Error_Handler(); }/* Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2
clocks dividers */ RCC_ClkInitStruct.ClockType = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2); RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2; RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2)!= HAL_OK) { Error_Handler(); }}