This is the pinout I have for the flash memory W25Q128FV which I'm trying to interact with
I'm trying to control it with a raspberry pi 3 B+.
Here's how I wired everything:
CS - GND D0 - SPIMISO WP - nothing GND - GND VCC - 3.3v HOLD - nothing CLK - SPISCLK DI - SPIMOSI
CS is in GND because datasheet says that in LOW, we can write/read from the chip.
I also enabled spi on raspberry and I'm using the library wiringPi with channel 0.
I'm writing like this:
wiringPiSPISetup(0, 2000000) wiringPiSPIDataRW(0, data, 4)
but I get no changes in
data. I suspect something is wrong but I don't know if it's on the chip, on the wiring or on the software. This is a brand new chip by the way.
What are the raspberry pins
I'm trying to read the manufacturer id, here are the instructions:
here's what I did:
data = 0x90; data = 0x00; data = 0xEF; data = 0x17;
I don't know what those
ID7-ID0 are but I substituted them by some numbers I found on the datasheet
datasheet link: http://www.xmcwh.com/Uploads/2020-09-03/5f50d26953af2.pdf
Here's my Rust code with everything ready to test and dockerized, just
./run.sh, compile the Wiringpi/wiringpi with
cargo run in
If you help me you're helping open source, I'm interfacing with wiringpi in Rust and creating a library to read from W25Q spi flash memory.