Go Down

Topic: Ussing SPIMemory library with winbond w25q64f. I can not read memory (Read 873 times) previous topic - next topic

OmarPoch

Jun 03, 2019, 11:23 am Last Edit: Jun 03, 2019, 10:55 pm by OmarPoch Reason: Clarify the subject
Hi to all.


I am trying add a Shield Flash Spi W25q64FV memory to Arduino One to save data.

I have connected it to these Arduino one Pins

Shield                Arduino
CS (SS)      <--  D10
DI (MOSI)    <--  D11
DO (MISO)   -->  D12
Clk (SCK)    <--  D13

I've adapted 5v to 3,3v Levels from Arduino outputs to Sield input with a resistor divisor


Arduino                               Shield    

DO-->-- 12K ------|----->--CS (SS)
                           |
                         22K
                           |
                        Gnd                          

The DO is connected directly to D12.

I'm ussing SPIMemory library (version 3.3.0).
The problem is that I can not access to memory to read or write it.


I have used the TestFlash.ino to test the access to memory. I have attached it.


These are the test results on serial terminal

Test 1

Manufacturer ID: 00h
Memory Type: 00h
Capacity: 00h
JEDEC ID: 0000h

Test 2 2435 224

Please enter the address (0 - CAPACITY) you wish to access: 2435
Please enter the value of the byte (0-255) you wish to save: 224
Data write failed


I've put the osciloscope to SCK and to CS and can not see any activity after send the command from terminal.
The problem is not on arduino outputs because I can use them to other applications without problem

For this, I thing that I must do any into sketch to get work it, but I can not find what.

Can you help me ??

Thanks a lot

Omar

Marzogh

Hi Omar, this has been discussed in this thread here previously. Please refer to it.

TL;DR - Voltage dividers can work with IC Pin capacitance to create an RC filter that smooths out your clock signals. Use a proper level shifter and it should work.

I last tested the library with the W25Q64FV a couple of days ago, just before releasing v3.4.0, and everything worked fine. If things still don't work after you use a level shifting setup, please run FlashDiagnostics.ino with #define RUNDIAGNOSTIC uncommented in SPIMemory.h and put your results here - that should give diagnostic information that TestFlash does not provide.

OmarPoch

Hi Marzogh !
Thank you for your answer and sorry for my answer delay. I can not work in this days with this
I will try with a level adapter and tell you aoubt results,

Thanks a lot !!!

Omar

Go Up