AT25SF041 Flash memory for Teensy 3.2 with SerialFlash

Status
Not open for further replies.

Clemi

Member
Hello,

I'm trying to connect the Adesto AT25SF041 flash memory chip to a Teensy 3.2.

I use the SPIFLash library that comes with the the Teensyduino distribution as well as Sketch SPIFlash_ReadWrite that is contained in this library as example.

Unfortunately it's not possible to establish communication to the memory.
I get replies that Init failed, Decive ID=0, Flash content also zero.

I double checked the wiring, so I assume that's not the problem. The commands are also almost the same as the commands already implemented in this library.

The only option I'm not sure about is the Clockspeed of the device. Usually I run the Teensy with 72 MHz, but I tested 24Mhz as well. Clock Divider is set by default to Div2 and I tried to change
the hard coded clock speed in SPISettings(clock, MSBFIRST, SPI_MODE0) from 33 Mhz to 24Mhz.

Unfortunately with no success.

Is there anything else that needs to be adapted in the libraries to access a new flash memory?

I appreciate all comments.

Thank you for reading.
 
Dear Paul,

thank you for this information.
I'm sorry I wrote SerialFlash in the topic, but actually my problems occur when using the SPI Flash library that comes with Teensyduino.
Do you have any ideas for my failing at implementing the SPIFlash library?
 
Have you tried the readDeviceId() function? I noticed the comments in that library specifically mention this AT25SF041 chip.

If you don't get a proper ID read, perhaps something is wrong with your hardware?

I personally do not use this library, so there's not a lot I can do. But so far, you've posted incorrect info, and no actual code (eg, the "Forum Rule") nor photos or details of how you've actually connected the chip. Even if someone here could tell why it's not working, how do you expect anyone could know what's wrong with so little info?
 
Dear Paul,

you are right, I provided only little information on my problem. Sorry for that.

Meanwhile I was able to access the memory with the SPIFlash Lib as well as with the SerialFlash Lib.

What I'm wondering is, if there is some library available to be used "on top" of SPIFlash or SerialFlash for more comfortable read / write operations?
For example enhanced write /read structures not only for bytes but for other data types and maybe even data structures like the eepromx library.
Also some comfortable erase function, that allows erasing only certain values and not minimum 4K blocks would be very helpful.
Until now, I haven't found anything in this direction, but maybe I missed some contribution by someone who was annoyed by the physical limitations of flash memory as well?
 
The internal architecture only permits block erases.
You could manually write 1s to a section though

There maybe a library but you should probably write you're own file/data structure. You could always make a master boot record in the top of the flash to list where things are
 
Status
Not open for further replies.
Back
Top