-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with pageRead() #15
Comments
I quickly looked at the dataflash e version datasheet. It seems they added some new continuons read modes, and maybe they fixed chip erase... |
I can't see why reading page 0 fails with pageRead... dataflash.waitUntilReady(); // Just to be sure. Maybe this should be added at the begging of pageRead
dataflash.pageRead(0, 0);
for(size_t i=0; i<PAGE_SIZE; i++) // page/buffer size accessors should be added to the API...
{
data = SPI.transfer(0xff);
}
dataflash.end(); Unfortunately I don't have any version E dataflash. |
Thank you very much :) You were right : dataflash.waitUntilReady() solved the problem. Another point : I noticed at the samed time that it works if the pageRead() loop is preceded by Serial.print("The test = "); To adapt you're library to msp430 I removed lines about Atmel SPI registers (could it cause that ?). |
But the strange fact stay "why only on page 0??". |
The Atmel SPI register stuffs are just here to flush any pending interrupts during initialization and to quickly setup SPI registers when we call begin() (in case of multiple SPI devices). Have you tried doing a pageRead on let's say the second page, then on page 0 ? I feel ashamed because I realized that this issue is linked to the now 5 years old issue #5 |
Don't feel ashamed, your library help me a lot :) this kind of chip is not very difficult to understand, but there are lot of commands with a special protocol to respect, so it's a big deal to get a full working lib. I tried this :
Result : the first pageRead(0,0) fails, but the second works. If I add a dataflash.waitUntilReady(), both work. As you suggest, I think it's an internal timing issue, something like an index which takes time to be reset ... |
Hi,
I'm working on porting your library to Energia (MSP430 Arduino like IDE). Another point : it's a version E (not a D but what are the differences ?)
After very few changements, seems to be OK except one point : pageRead() does not work reading page 0.And I can't explain why ... It's ok this other pages or using pageToBuffer()+bufferRead().
The text was updated successfully, but these errors were encountered: