Skip to content
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

BufferToPage should block at beginning, not end #5

Open
kolosy opened this issue Jul 19, 2011 · 2 comments
Open

BufferToPage should block at beginning, not end #5

kolosy opened this issue Jul 19, 2011 · 2 comments
Assignees
Labels

Comments

@kolosy
Copy link

kolosy commented Jul 19, 2011

The BufferToPage method currently initiates the ram -> flash transfer and blocks until completion. this should be reversed. the reason the device has two ram buffers is so that you could continuously write data to it without having the consumer wait for the flush operation.

it should be

function BufferToPage(number)
while (busy) wait;

initiateTransfer(number)
return

and the operations that read flash directly should wait as well. this way, if i'm writing a chunk of data that's larget than the ram buffer, i can initiate the flush, pop out, switch ram buffers and keep writing. the time necessary to flush a buffer to flash is less than the time necessary to fill a ram buffer.

@ghost ghost assigned BlockoS Jul 19, 2011
BlockoS added a commit that referenced this issue Aug 23, 2011
@kolosy
Copy link
Author

kolosy commented Nov 5, 2011

because of this change, you need to introduce checks into any function that touches the flash, including ReadMainMemoryPage and ContinuousRead. The reason is that before you couldn't have a situation where you were trying to read the flash while it was busy, but now you can.

@BlockoS
Copy link
Owner

BlockoS commented Sep 19, 2012

I'm thinking about making DataFlash::enable call waitUntilReady before setting CS pin low.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants