cancel
Showing results for 
Search instead for 
Did you mean: 

bug: Tears in my eyes!

cube sphere
Associate II
Posted on October 17, 2016 at 09:44

Dear STM32Cube-Developers,

Please have a look at the following. It makes me upset and brings tears in my eyes.

Don't you get it managed to simply check error flags in a status register?

Please look at this:

  * @file    stm32f4xx_hal_flash.c

  * @author  MCD Application Team

  * @version V1.4.4

  * @date    22-January-2016

  * @brief   FLASH HAL module driver.

lines 592 - 593:

  if(__HAL_FLASH_GET_FLAG((FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR | FLASH_FLAG_PGAERR | \

                           FLASH_FLAG_PGPERR | FLASH_FLAG_PGSERR | FLASH_FLAG_RDERR)) != RESET)

and the definition of __HAL_FLASH_GET_FLAG:

  * @file    stm32f4xx_hal_flash.h

  * @author  MCD Application Team

  * @version V1.4.4

  * @date    22-January-2016

  * @brief   Header file of FLASH HAL module.

line 290:

&sharpdefine __HAL_FLASH_GET_FLAG(__FLAG__)   ((FLASH->SR & (__FLAG__))==(__FLAG__))

Don't you read your own documentation?

lines 278 - 288:

  * @param  __FLAG__: specifies the FLASH flag to check.

  *          This parameter 

can be one of

 the following values:

  *            @arg FLASH_FLAG_EOP   : FLASH End of Operation flag 

  *            @arg FLASH_FLAG_OPERR : FLASH operation Error flag 

  ...

Please get it fixed with the next release. And do not forget to check the whole library against bugs of this kind.

Best regards,

sphere

#bug #stm32cube
1 REPLY 1
Nesrine M_O
Lead II
Posted on October 17, 2016 at 14:58

Hi sphere,

Thank you for your feedback. The issue has been reported internally. Sorry for the inconvenience it may bring.

-Syrine-