Skip to main content
Mathieu Garivet
Associate III
April 7, 2017
Question

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

  • April 7, 2017
  • 4 replies
  • 911 views
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
This topic has been closed for replies.

4 replies

ST Technical Moderator
April 7, 2017
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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
Mathieu Garivet
Associate III
April 7, 2017
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
ST Technical Moderator
April 7, 2017
Posted on April 07, 2017 at 17:43

Hi

Garivet.Mathieu

,

I have reported thisissue internally.

Thank you for your contribution.

Thanks

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
Jeanne Joly
Associate
May 4, 2017
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