Connect with us

AT25SF081 Flash memory programming

Discussion in 'Microcontrollers, Programming and IoT' started by samuelproulx97, Nov 19, 2016.

Scroll to continue with content
  1. samuelproulx97


    Nov 19, 2016
    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:


    Any help is appreciated, thank you!

    MCU doc :
    AT25SF081 doc:
  2. samuelproulx97


    Nov 19, 2016
    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?

  3. samuelproulx97


    Nov 19, 2016
    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 .
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day