I have two customer boards as below :
A board : Mount with STM32L4R5QII (2MB internal flash)
B board : Mount with STM32L4R5QGI (1MB internal flash)
A board run well on the STM32L4R5ZI-Nucleo\examples\flash many times.
B board will stop a error (program error) as attached file.
If i do a chip erase before run the example on B board it will work on first time.
So i guess the program can't erase the sector correctly .
Any comment , Thanks