Marzogh / SPIMemory

Arduino library for Flash Memory Chips (SPI based only). Formerly SPIFlash
http://spimemory.readthedocs.io/en/latest/
GNU General Public License v3.0
438 stars 138 forks source link

Add support for Microchip SST26VF016B & SST26VF032B and make fastread working #173

Closed LoicGRENON closed 5 years ago

LoicGRENON commented 5 years ago
Any pull request raised here MUST be submitted according to here MUST be submitted according to this template or it will be flagged with 'Not enough information'. No action will be taken till all the prerequisite information (according to the right template) is provided. If no information is provided for over a month after the 'Not enough information' label is applied, the issue will be closed.

Pull request details


DO NOT DELETE OR EDIT anything below this

Note 1: Make sure to add all the information needed to understand the bug so that someone can help. If any essential information is missing we'll add the 'Needs more information' label and close the issue until there is enough information.

Note 2: For support questions (for example, tutorials on how to use the library), please use the Arduino Forums. This repository's issues are reserved for feature requests and bug reports.


GitHub issue state GitHub issue title GitHub issue author GitHub issue label GitHub issue comments GitHub issue age GitHub issue last updateGitHub pull request check contexts

Marzogh commented 5 years ago

Hi Loic,

Thanks for this - I'll just test this over the next day or so and pull it into the development branch. W.R.T Fast Read, the Winbond chips call for 8 dummy clocks after the 24-bit address is clocked in (Re: Section 8.2.9 in the datasheet here). I don't know if the SST25 and SST26 series need that - I'll check that out as part of the testing 🙂

Marzogh commented 5 years ago

Hi mate, after checking the library code, it turns out I'd made a mistake when I wrote the _beginSPI() function that broke FastRead. The bug has now been fixed (as of commit 7e0825a) and confirmed to work on both Winbond and SST26 series chips.

Also, I had already included SST26 series support in the development branch before your pull request came through, so, I won't need to merge it here after all. However, thank you for taking the time to catch and fix the bug and add support for new chips! 🙂

LoicGRENON commented 4 years ago

Hello,

The same fix as of commit 7e0825a is needed for SPIFram on SPIFramIO.cpp at line 164 : The dummy byte needed for fast read operation should be sent after the two-bytes address. However, it seems to not be sufficient to make fast read to work with a FRAM chip...

LoicGRENON commented 4 years ago

Well, in fact the SPIFram::_read() template defined in SPIFram.h need to also be modified like SPIFlash::_read defined in SPIFlash.h

Need to change _nextByte(WRITE, FASTREAD); and _nextByte(WRITE, READDATA); to _beginSPI(FASTREAD); and _beginSPI(READDATA); at lines 339 and 342. Then remove _transferAddress(); at line 344.

I made a new pull request that solve this new issue : https://github.com/Marzogh/SPIMemory/pull/203