2024-04-23 10:38 AM
Hello,
I have been trying to make a driver for the Winbond W25Q512JV, It's works normally ( I can read/write data, erase sector/chip, can write image as external flash loader with Touchgfx) until one day I could no longer erase sectors or full chips ( My chip has been erased no more than 100 times). When erasing, it doesn't report any errors, it just responds to a successful erase very quickly (~ 0.5s) , almost immediately (previously it took ~ 140 seconds to erase a full chip). When I read back these memory areas, they are not equal to 0xFF. I understand that erase has not been performed yet.
I checked by reading the registers status: reg1 = 0xFE, reg2 = 0x02, reg3 = 0x03 and compare with datasheet, it mean bit SRL = 0, SRP = 1, WEL = 1, TB = 1, BP[3-0] = 1 => My chip into protection state
I use STM32H723 on OSPI2 running with QSPI mode, how can i resolve this problem? please give me solution. Thank you for your help
Solved! Go to Solution.
2025-01-17 01:12 AM
Hi! I'm facing a similar problem. I accidentally set the CMP bit in StatusRegister2. I managed to perform a sequence of actions manually:
w25q_write_enable();
w25q_write_status_reg(2, 2);
It helped me. I hope this helps someone too. It remains a mystery how this problem happened. How do I make sure this doesn't happen again? After all, I wasn't doing anything unusual. I was doing a routine job debugging the firmware.
2025-01-17 03:21 AM
Perhaps needs a pullup on IO2 / #WP pin until QE set for 4-pin mode