Maker Pro
Maker Pro

AT25SF081 Flash memory programming

Hello all,

I have a AT25SF081 Flash memory by Adesto Technologies that I am trying to write to and read the memory on using the SPI interface. I am using a Atmel ATSAMD20J18 MCU to do so with Atmel Studio environment.

I have been having a hard time understanding why what I was writing into the different memory blocks was not what I was reading from them, so I tested by reading the device ID and manufacturer ID.

According to the datasheet of the flash, when I write the Read Manufacturer and Device ID command (0x9F) , I am supposed to read the following bytes on the SO pin :

0x1F , 0x85 , 0x01.

But when I write that command, the second byte is blank, and I get 0x00 instead of 0x85, yet the first and last byte of the 3 bytes are correct. I have a hard time comprehending what is going on, does anyone have an idea?

Here is a screenshot of logic analyzer connected to the SPI lines:


IDtruncated.png


Any help is appreciated, thank you!

MCU doc : http://www.atmel.com/Images/atmel-42129-sam-d20_datasheet.pdf
AT25SF081 doc: http://www.adestotech.com/wp-content/uploads/DS-AT25SF081_045.pdf
 
I just did another test on the flash. If I keep clocking bytes onto MOSI, the data sheet says that the Manufacturer ID and device ID will cycle back and continue coming out on MISO if CS is not deasserted. I tried this and the results are inconsistent, maybe would it be a timing issue?

idtruncated2.png
 
I found the issue. It was in fact a timing issue I believed , and it was induced by the breadboard on which I have my MCU and the flash. It isn't a very good quality breadboard and the distance between the two components (they were at different ends of the board) was causing issues .
 
Top