I attach a video to explain what happens.
I erase and write the sector starting at address 0x1000. If a use a breakpoint in the function FlashCommandSequence() the erasing and the writing is successful. If I remove the breakpoint
I use a KE processor, running at 120MHz. In the video the command is sent through a console on the serial port.
The strange additionallly is it was working at the first test, now that's the happening.
I need a suggestion.