-
Notifications
You must be signed in to change notification settings - Fork 30
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
Does it support only NOR flash? #16
Comments
It seems this flash is somewhat compliant with SPI NOR data flash (25 protocol). You need to check how this flash compares to existing flash implementations, and create a new class and implements the special calls for this flash. |
Hi, I think, I should proceed with this. Thanks and Regards |
As explained in PyFtdi ticket, it should be quite easy to add support for this type of flash device, as there is nothing NAND specific to support this device, only two-stage read accesses. Note that the supported AT45 NOR flash use a similar two-stage management, but for write accesses:
|
Hello @eblot Let say that I want to read complete flash i.e. all 64 pages in each 1024 blocks. So my approach is : or the other way : while blockNum <= 1023 Kindly suggest. Thanks & Regards |
You really need to use markdown syntax, it is quite unreadable as plain text. Moreover, please copy/paste text as text, not as static images. The PN25Q datasheet is a pure piece of sh*t, I think it is one of the worst flash datasheet I read, it does not help to understand how the flash works. If I'd ever have to work with this product, I would contact their customer support and report how many typos, contradictory wordings, references to undocumented commands, lack of definitions, inconsistent wordings for the same command, etc. plague the rubbish they dare to call a datasheet. They should call this a datashite... AFAIU, you need to write this kind of loop:
Notes: I do not think you should use a 2176 (2048+128) wrapping, as this is likely to include the 128 ECC data bits you do not care about as part of the actual data. That would require to discard the 128 last bytes of every read output: more complex, less effective. You only need to check the ECC status every time you read a new page from flash to data buffer. |
Hello @eblot ### Method 1 `
` ### Method 2
|
I would write something like:
|
Hello,
As per the doc,
That is , check_ecc should fail at ECCS1:ECCS0 10 i.e. I think it should be
Another queryIn code section,
why is that len(buf) condition check with FLASH_SIZE-2*PAGE_SIZE And another query is as per doc,in instruction table, command 0x31 and 0x3F are not returning anything. Thanks & Regards |
(fix block quote) |
|
Ya, I later did changes by using
But no success. |
You are right, I misread the doc, it should be:
|
About ECC: are you sure your flash is programmed? At this point, you need to use a logical analyser or an oscilloscope to trace whatever is exchange with the flash. |
I'm not sure how ECC should be interpreted with a blank flash, is it documented? |
Yes, flash is programmed |
[edited, no need to duplicate whole message] I have query in this section of code
understood len(buf) >= FLASH_SIZE-PAGE_SIZE, indicates if all pages of all blocks are read then pass the last page read command. I am confused that is just a single time _set_first_page() would be ok or should we read 64 pages of one block at a time. Also, I think |
I see nothing it the doc that says that when the last page of a block is read, the address wraps up to the start of the same block. It looks like other flashes: subsequent read resume on the next block. Block segmentation is mostly for erasure operation. For read operation, the flash seems linear - at least nothing seems to indicate it is not.
True I forgot to clear the return statements in the second version of the code |
Hello @eblot , `def _reset_device(self) -> None:
|
Hello,
I am currently working on nand flash chip .
Datasheet - http://pro0fc108.hkpic1.websiteonline.cn/upload/PN26Q01AWSIUG.pdf
It would be of great help if you can suggest in what way should I proceed for SPI nand flash
Thanks & Regards
Asmita
The text was updated successfully, but these errors were encountered: