LowPowerLab Forum

Hardware support => Moteino => Topic started by: Lukapple on October 16, 2014, 11:13:41 AM

Title: Moteino R4, compatibile serial flash chip
Post by: Lukapple on October 16, 2014, 11:13:41 AM
Can someone tell me if any of Flash chips, listed on following site, is compatible with Moteino R4:
http://www.tme.eu/en/katalog/#id_category=112873&search=flash+4mbit&page=1&s_field=accuracy&s_order=DESC (http://www.tme.eu/en/katalog/#id_category=112873&search=flash+4mbit&page=1&s_field=accuracy&s_order=DESC)

(It's hard to find Serial Flash 4Mbit (W25X40CL) (https://lowpowerlab.com/shop/index.php?_route_=FlashMemory-W25X40CL) in Europe).
Title: Re: Moteino R4, compatibile serial flash chip
Post by: Felix on October 16, 2014, 12:10:44 PM
Please cross check the pinout with the diagram here: http://lowpowerlab.com/moteino/#flash
Title: Re: Moteino R4, compatibile serial flash chip
Post by: Lukapple on October 16, 2014, 04:21:11 PM
Found one:
SST25PF020B (http://www.tme.eu/en/Document/36deabea8f5321c07348a6f0364e0b4d/25pf020b.pdf)

Kind of memory   Serial Flash   
Interface   SPI   
Operating frequency   80MHz   
Operating voltage   2.3...3.6V   
Case   SO8   
Memory capacity   2Mbit   
Mounting   SMD   
Integrated circuit type   memory   
Operating temperature   0...70°C


Will this case (SO8) fit on Moteino?

Thanks.
Title: Re: Moteino R4, compatibile serial flash chip
Post by: Lukapple on October 16, 2014, 04:23:37 PM
SO-8 is probably just shorthand for soic-8?
EDIT:
What else should I check? This one is only 2Mbit, should it be 4Mbit?
Title: Re: Moteino R4, compatibile serial flash chip
Post by: Felix on October 16, 2014, 07:44:59 PM
Yes it's SOIC8
Capacity doesn't matter
You should probably check the datasheet to make sure the commands are the same. The commands used in the SPIFlash library are declared at the top of SPIFlash.h:
https://github.com/LowPowerLab/SPIFlash/blob/master/SPIFlash.h
Title: Re: Moteino R4, compatibile serial flash chip
Post by: Lukapple on October 17, 2014, 03:36:21 PM
First chip was not on stock, so I found another one:
MICRON M25P010-AVMN6P (http://www.tme.eu/en/details/m25p10-avmn6p/serial-flash-memories-integrated-circ/micron/m25p010-avmn6p/)

Commands looks the same.
However some of commands are missing in table, I can't find those:
define SPIFLASH_BLOCKERASE_4K    0x20       // erase one 4K block of flash memory
#define SPIFLASH_BLOCKERASE_32K   0x52        // erase one 32K block of flash memory
#define SPIFLASH_CHIPERASE        0x60 
but this one is there:
#define SPIFLASH_BLOCKERASE_64K   0xD8       // erase one 64K block of flash memory

And I'm not sure about this two commands:
#define SPIFLASH_ARRAYREAD        0x0B       // read array (fast, need to add 1 dummy byte after 3 address bytes)
#define SPIFLASH_ARRAYREADLOWFREQ 0x03        // read array (low frequency)

Those hexa are for:
FAST_READ  - Read Data Bytes at Higher Speed
READ - Read Data Bytes

Probably the same.

(https://dl.dropboxusercontent.com/u/2261256/forums/FLASH-M25P10-A.png)

Title: Re: Moteino R4, compatibile serial flash chip
Post by: Felix on October 17, 2014, 05:56:48 PM
Note that some commands are equivalent or are legacy but some chips are not backwards compatible. So as long as the pinout is the same, you may be able to just swap the commands and it should work.
Also please be aware that I cannot endorse using other chips because I already invested time and resources to find the right chips that will support the functions I was after.
I can only offer support for the chips I have in my store and I cannot dedicate time/resources to researching other chips at this time. If you choose to use your own sourced chips and modify the library to use it with those you should be ready to do the legwork.
Title: Re: Moteino R4, compatibile serial flash chip
Post by: Lukapple on October 18, 2014, 05:56:23 AM
Felix,
I'll do some research, thanks for help!