Author Topic: SPI flash (Winbond W25Q80BV) - beginner getting started (GCC/SPI) - read status?  (Read 847 times)

0 Members and 1 Guest are viewing this topic.

Offline wb0gazTopic starter

  • Regular Contributor
  • *
  • Posts: 200
I've attached a WINBOND W25Q80BV SPI flash device to my microcontroller project. The microcontroller has an SPI port. I'm not using double or quad SPI, just single-bit read/write, and I've pulled the HOLD and Write Protect pins to 3.3V. I've used SPI successfully in the past and given that some commands are working (see below), I believe the basic process of issuing (these specific) commands and getting a valid response are working.

So far, I can successfully read Manufacturer/Device ID (command 90h), read Unique ID number (command 4Bh), read JEDEC ID (command 9Fh), and read SFDP register (command 5A). All of these produce expected responses.

PROBLEM: My attempt to read status (command 05h) yields all zeroes in response (even if I set write enable using command 06h). Read data (command 03H followed by 00 00 00 for start of address space) yields all FF in response. For this reason, I'm not sure if I'm able to set write enable (command 06h) or write some bytes (command 02H followed by 00 00 00 for start of address space followed by some bytes.)

WHAT I'VE DONE SO FAR: I've looked at library code I've found online, however, what I've found so far is written for general case and intended for production, not so much geared to beginner just trying to get a few initial commands and responses working.

WHAT HELP IS NEEDED: As I'm writing for a specific target microprocessor using GCC, I've not posted my existing code; rather I'm looking for a pointer to "how to get started with SPI flash" sort of tutorial or otherwise basic-level example(s).

Thanks for any pointers,

Dave
« Last Edit: February 13, 2022, 06:40:19 pm by wb0gaz »
 

Offline wb0gazTopic starter

  • Regular Contributor
  • *
  • Posts: 200
Problem was solved - turns out didn't read closely enough the datasheet which showed timing for "write enable" (specifically, that is a single byte transaction, must terminate CS-low after the 8 bits are written.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf