AnsweredAssumed Answered

STM32H743I-EVAL running off frequency

Question asked by Clive One on Mar 3, 2018
Latest reply on Mar 3, 2018 by Clive One

The consequences of not initializing local/auto variables properly...

 

Original code:

 

static void SystemClock_Config(void)
{
RCC_ClkInitTypeDef RCC_ClkInitStruct;
RCC_OscInitTypeDef RCC_OscInitStruct;
HAL_StatusTypeDef ret = HAL_OK;
/*

CORE=401060800, 401.06 MHz
CPUID 411FC271 DEVID 450 REVID 1001
Cortex M7 r1p1
C0000038 200017C0 00000000
10110221 12000011 00000040
FPU-D Single-precision and Double-precision
HCLK=200530400, 200.53 MHz
APB1=100265200, 100.27 MHz
APB2=100265200, 100.27 MHz
PLL1_Q_CK=200530400, 200.53 MHz
PLL2_R_CK=0, 0.00 MHz
480 x 272

*/

...

}

 

Modified code:

 

static void SystemClock_Config(void)
{
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
HAL_StatusTypeDef ret = HAL_OK;
/*

CORE=400000000, 400.00 MHz
CPUID 411FC271 DEVID 450 REVID 1001
Cortex M7 r1p1
STM32H7xx
C0000038 200017C0 00000000
10110221 12000011 00000040
FPU-D Single-precision and Double-precision
HCLK=200000000, 200.00 MHz
APB1=100000000, 100.00 MHz
APB2=100000000, 100.00 MHz
PLL1_Q_CK=200000000, 200.00 MHz
PLL2_R_CK=0, 0.00 MHz
480 x 272

*/

...

}

 

The USART can recover from this, TIM might be marginally off frequency. Also has the potential to be unpredictable.

 

Here from 

STM32Cube_FW_H7_V1.2.0\Projects\STM32H743I_EVAL\Applications\Display\LTDC_PicturesFromSDCard\Src\main.c

but systemic in the examples.

Outcomes