cancel
Showing results for 
Search instead for 
Did you mean: 

Build error in code generated by STM32CubeMX 4.22.1for STM32F429

Craig B
Associate II
Posted on September 21, 2017 at 21:05

I exported my project with the latest STM32CubeMX 4.22.1 for our firmware which is for a board with an STM32F429NGH6 and the resulting code has 2 build errors.  Here is the problem code with the error lines in BOLD:

PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_I2S;

PeriphClkInitStruct.PLLI2S.PLLI2SN = 192;

PeriphClkInitStruct.PLLI2S.PLLI2SM = 25;

PeriphClkInitStruct.PLLI2S.PLLI2SR = 3;

PeriphClkInitStruct.I2SClockSelection = I2S_CLOCK_PLL;

if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)

{

_Error_Handler(__FILE__, __LINE__);

}

This issue is that for 

STM32F429NGH6, the PLLIS2M and I2SClockSelection are not present in the structures.

With prior versions of STM32CubeMX these lines simply were not present in the generated code.  I will delete them and see if the project builds/runs correctly.  I suspect it will.

Here is what I did to cause this problem (but probably less is required):

  • Create a project for the STM32F429NGH6 chip. 

  • In the RCC

    • Set HSE to Crystal/Ceramic Resonator

    • Set LSE to Crystal/Ceramic Resonator

  • In I2S
    • Set mode to Half-Duplex Master
  • In the Clock Configuration Tab
    • Set PLL Source Mux to HSE
    • System Clock Mux to PLLCLK
    • Set System Clock to 168 MHz
    • PLL path: /M: 25, *N: 336, /P:2 
    • PLL I2S path: *N: 192, /R: /3
    • I2S Source Mux: PLLI2SCLK 

Thanks,

Craig

#stm32f429-build-error"-"i2s-clock"-stm32cubemx"
2 REPLIES 2
Sirma Siang
ST Employee
Posted on October 13, 2017 at 09:17

Hello

Broadbooks.Craig

,

I thank you first for your feedback.

I confirm that those parameters are not use by your SoC family.

This is a CubeMX code generation issue.

Internal ticket has been raised for correction.

Kind regards

Sirma

Sirma Siang
ST Employee
Posted on October 13, 2017 at 10:21

This will be corrected in Cube version 4.23