2024-01-10 04:45 PM
Hello. I'm working on a board that has an STM32F401CBU6 which interfaces with a SST25VF010A 1Mbit SPI flash memory. I'm having some trouble trying to enable writing of the IC and being able to confirm this by seeing a change in the status register. Memory datasheet .
As seen in the datasheet by sending the value 0x06 then pulling CE# high the chip should be write enabled which should flip the WEL bit in the status register to a 1. In my case this should mean the register value should be 0x02 since I initialise the status register to 0x00 to set BP0 and BP1 bits to 0 to disable protection of entire memory array.
When I run this code I get this on RealTerm.
Still the same 0x00 meaning the WEL bit was not changed when I tried to write enable. I'm not sure why this isn't working. I'm pretty sure the config_status_reg() and read_status_reg functions both work so maybe it's the write_enable function? But it's such a simple transaction I don't see how it could be wrong. Thanks in advance.
2024-01-10 08:22 PM
Read the JEDEC ID via 0x9F, confirm things are working.
2024-01-10 08:25 PM
Where is that in the datasheet? I can read device ID and manufacturer ID so I know the SPI is working
2024-01-10 09:25 PM
Nevermind I'm an *** and CS_MEM was mapped to GPIOA PIN3 not GPIOB PIN3 :(((((((