cancel
Showing results for 
Search instead for 
Did you mean: 

Can't enable writing on SST25VF010A flash memory

Swiss Gnome
Associate II

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.

SwissGnome_0-1704933646851.png

SwissGnome_1-1704933688458.png

SwissGnome_2-1704933736363.png

SwissGnome_3-1704933778375.png

When I run this code I get this on RealTerm.

SwissGnome_4-1704933823893.png

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.

3 REPLIES 3

Read the JEDEC ID via 0x9F, confirm things are working.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Where is that in the datasheet? I can read device ID and manufacturer ID so I know the SPI is working

Swiss Gnome
Associate II

Nevermind I'm an *** and CS_MEM was mapped to GPIOA PIN3 not GPIOB PIN3 :(((((((