cancel
Showing results for 
Search instead for 
Did you mean: 

[BUG] Issues with STM32Cube_FW_F7_V1.16.0 (with a MWE illustrate the current problems)

KR1
Associate III

Hello,

I have previously complained about the issues in the latest version of STM32Cube firmware for F7 microprocessors:

https://community.st.com/s/question/0D53W000007YhLNSA0/a-bug-in-the-latest-version-of-stmcubemx-561

I am not sure whether these observations were taken into consideration by the STM32 staff. I want to show a MWE to illustrate the current issues, that I believe originate form the changes in SystemInit() (as I've mentioned in my previous thread).

This MWE runs on the STM32F769I-EVAL board. In general it is applicable to any F7 with the latest STM32Cube firmware. What I essentially want to do is to setup the system clock to 100 MHz (using the HSI as the source for simplicity's sake) and to display the PLL output on PA8. To do so, the following steps need to be undertaken in STMCubeMX:

  1. Setup the system clock:
  2. Enable the MCO1 output:
  3. Set PA8 to PPLLCLK:
  4. Set PA8 GPIO speed to very high:

This bare-bones project works just fine for STM32Cube_FW_F7_V1.15.0 (or older). An expected 100 MHz clock train is output on PA8:0693W000001rmCjQAI.png

If the same exact operations are performed STM32CubeMX under STM32Cube_FW_F7_V1.16.0 the generated code fails to provide an output:

0693W000001rmDNQAY.png

One of the ways to mend this issue is to add a call to HAL_RCC_DeInit(), which has the calls removed from the earlier iterations of SystemInit().

int main(void)
{
  /* USER CODE BEGIN 1 */
 
  /* USER CODE END 1 */
 
  /* MCU Configuration--------------------------------------------------------*/
 
  /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
  HAL_Init();
 
  /* USER CODE BEGIN Init */
  HAL_RCC_DeInit();
  /* USER CODE END Init */
 
  /* Configure the system clock */
  SystemClock_Config();
 
  /* USER CODE BEGIN SysInit */
 
  /* USER CODE END SysInit */
 
  /* Initialize all configured peripherals */
  MX_GPIO_Init();
  /* USER CODE BEGIN 2 */
 
  /* USER CODE END 2 */
 
  /* Infinite loop */
  /* USER CODE BEGIN WHILE */
  while (1)
  {
    /* USER CODE END WHILE */
 
    /* USER CODE BEGIN 3 */
  }
  /* USER CODE END 3 */
}

I'm attaching a copy of the two near-identical projects. The FW 1.6.0 will fail to execute unless the HAL_RCC_DeInit() is uncommented.

I also took a look at the examples from en.stm32cubef7_v1-16-0. They seem to be operational, as SystemInit() was not tampered within the few ones I've tested.

1 REPLY 1
Houssem CHAABANI
Senior II

Dear @KR​ ,

It's recommenced to use that available version of STM32CubeMX.

Best regards,

Houssem