cancel
Showing results for 
Search instead for 
Did you mean: 

[STM32CubeMX] Bug in firmware package for STM32F0 family v1.7.0

Mathieu Garivet
Associate III
Posted on April 07, 2017 at 10:39

Hello,

I'm using STM32CubeMX to generate a project for a STM32F042. I just found a bug in the automatic code generation concerning the firmware package for STM32F0 family v1.7.0.

It concerns the initialization of the IRDA driver.

CubeMX generates the following code :

/* USART1 init function */

static void MX_USART1_IRDA_Init(void)

{

hirda1.Instance = USART1;

hirda1.Init.BaudRate = 115200;

hirda1.Init.WordLength = IRDA_WORDLENGTH_7B;

hirda1.Init.Parity = IRDA_PARITY_NONE;

hirda1.Init.Prescaler = 10;

hirda1.Init.PowerMode = IRDA_POWERMODE_NORMAL;

if (HAL_IRDA_Init(&hirda1) != HAL_OK)

{

         Error_Handler();

}

}

It forgets the mode initialization :

hirda1.Init.Mode = IRDA_MODE_TX_RX;

Could you please confirm this bug ?

Thanks a lot.

#irda #stm32f0 #stm32cubemx
4 REPLIES 4
Imen.D
ST Employee
Posted on April 07, 2017 at 10:42

Hi,

Could you please share your .ioc and precise which CubeMX version are your using ?

I will check this case and come back to you soon.

Thanks

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on April 07, 2017 at 10:51

Hi,

I'm using the 4.20 version of CubeMX and the firmware package for STM32F0 v1.7.0.

You will find the .ioc attached to this answer.

Thank you.

________________

Attachments :

Test Fo irda.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyfF&d=%2Fa%2F0X0000000bBc%2Fb1lYLC3qYP7Gn.vq75kzYn9vYStxxfYeC6KuKrG75FE&asPdf=false
Posted on April 07, 2017 at 17:43

Hi

Garivet.Mathieu

,

I have reported thisissue internally.

Thank you for your contribution.

Thanks

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Jeanne Joly
Senior III
Posted on May 04, 2017 at 12:03

Hi

Garivet.Mathieu

,

This issue will be delivered in the next CubeMX release (4.21) that will be available soon!

Thanks for your post.

BR. Eric