AnsweredAssumed Answered

bug: Tears in my eyes!

Question asked by Holfert.Jan on Oct 17, 2016
Latest reply on Oct 17, 2016 by Nesrine M
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:
#define __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

Outcomes