stm32f7xx_hal_driver icon indicating copy to clipboard operation
stm32f7xx_hal_driver copied to clipboard

Bug found in HAL_NAND_Read_Page_8b and HAL_NAND_Read_SpareArea_8b

Open huoxingdawang opened this issue 2 years ago • 1 comments

The code for reading data from the NAND Flash in the stm32f7xx_hal_nand.c is *buff = *(uint8_t *)deviceaddress; rather than *(__IO uint8_t *)deviceaddress; which may cause the data always to be the first data read from the nand flash when code is optimized by the compiler.

https://github.com/STMicroelectronics/stm32f7xx_hal_driver/blob/a89b85ba16ab07f42165ca67949c0366a9ea1c3a/Src/stm32f7xx_hal_nand.c#L638

https://github.com/STMicroelectronics/stm32f7xx_hal_driver/blob/a89b85ba16ab07f42165ca67949c0366a9ea1c3a/Src/stm32f7xx_hal_nand.c#L1288

And the bug is still exists in this version: image

huoxingdawang avatar Sep 07 '23 14:09 huoxingdawang

I created PR #7 to fix this bug.

huoxingdawang avatar Sep 07 '23 14:09 huoxingdawang