2025-10-27 12:58 AM
Hello,
I want to use the buffer program feature of my IS29GL064 NOR flash in order to increase the programming speed.
For this I replaced HAL_NOR_Program() by HAL_NOR_ProgramBuffer() in the NOR flash demo and got a memfault. Did some debugging and doubt the code, especially because I found this post here
BUGS: HAL_NOR_ProgramBuffer() is riddled with them
Has the reported bug, if any, been already fixed ?
Second, I wonder if my ISSI flash is supported because of the following comment in stm32h7xx_hal_nor.c
This function must be used only with S29GL128P NOR memory.IMHO all devices which support the necessary commands, e.g. NOR_CMD_DATA_BUFFER_AND_PROG, should be able to use this feature and HAL function.
Any hints, news, updates or comments?
Thank you
2025-10-27 4:11 AM
Hello @regjoe
@regjoe wrote:
Hello,
Has the reported bug, if any, been already fixed ?
The bug has been fixed on the version 1.9.0: The HAL_NOR_ProgramBuffer() has a few defects · Issue #20 · STMicroelectronics/STM32CubeH7
@regjoe wrote:Second, I wonder if my ISSI flash is supported because of the following comment in stm32h7xx_hal_nor.c
This function must be used only with S29GL128P NOR memory.IMHO all devices which support the necessary commands, e.g. NOR_CMD_DATA_BUFFER_AND_PROG, should be able to use this feature and HAL function.
The better way is to review the IS29GL064 datasheet for its buffer programming sequence and compare it to the HAL implementation. If the command sequence matches, you may be able to use HAL_NOR_ProgramBuffer(). If not, you’ll need to adapt the function for your device.
2025-10-27 4:39 AM
Doesn't work type reports will generally get less attention than ones calling at specific lines or code sequences.
Not sure if reporting on Github is active.
2025-10-27 4:47 AM
Hello @Saket_Om ,
I'm using the HAL files generated by CubeMx, but it seems to me that this file is outdated, because in the header contains year 2017. It appears to me it is the same as here:
https://github.com/STMicroelectronics/stm32h7xx-hal-driver/blob/master/Src/stm32h7xx_hal_nor.c
This is my CubeMx setup:
What can I do to use the latest version?
2025-10-27 5:20 AM
Hello @regjoe
After carefully reviewing the datasheets of the IS29GL064 and the S29GL128P, it is clear that the Write Buffer Programming method differs between these two devices.
The HAL_NOR_ProgramBuffer() function in the HAL driver is specifically designed to follow the programming cycle of the S29GL128P, as described in its datasheet.
Write Buffer Programming in S29GL128P
Therefore, using it directly with the IS29GL064, which employs a different buffer programming protocol, can lead to issues such as the memfault you encountered.
To leverage this feature with your IS29GL064 NOR flash , it would be necessary to implement a dedicated function that strictly follows the sequence and timing specified in the IS29GL064 datasheet.
WRITE BUFFER PROGRAM Operation in IS29GL064
Thank you
Hamdi
2025-10-27 6:46 AM
Hello @T_Hamdi
I agree that the statemachine drawings look different, but if you compare the text in the description, programming of both flash looks the same to me:
So here, the IS29GL64 works but I don't know why. I probably have a problem when step debugging the buffer programm code. Maybe the flash aborts its internal buffer program statemachine if the debugger is reading from flash in order to read the value of a variable displayed in the debug window?
I now give a try to the MX29GL flash. Regarding the datasheet, it should work but doesn't yet. Maybe the same debugging problem? I'll get back soon.