>From here http://download.micron.com/pdf/datasheets/flash/nand/2gb_nand_m29b.pdf you can se what PAGE_SIZE is Page size is smallest writeable unit. Technically you can write less multiple times but as far as I know jffs2 does not use this technique, but lot of other flash file systems does (jffs for instance). In any case you can go only from 1 to 0 before erasure.
For erasing You can not erase page but you have to erase whole block of multiple pages called blocks (in case of device I appended there is 64 pages per block ). This is smallest erasable unit. In order to find out about your NAND flash check/google in datasheet. 2011/5/4 Sugathan, Rupesh <r...@carriercomm.com> > I am planning to use sqlite on a Linux system with JFFS2 file system on > NAND flash. NAND device that I am using has page size of 2048 bytes and > a erase sector size of 128K. I would like to take advantage of sqlite > rollback for the safety of my database files during power-fail. > > > > As per http://www.sqlite.org/pragma.html#pragma_page_size, the PAGE_SIZE > should be set between 512 bytes and 64K. The page size of NAND devices, > in my understanding, is only good for 2 to 3 writes before needing to > erase the whole sector. This indicate that the PAGE_SIZE in this case > should be set to 128K (the erase size). Given that this is not a > possibility, how is the power-fail safety achieved in sqlite used on > large sectored flash devices? > > > > I would appreciate if anyone can comment on this topic and/or share > their experience with using sqlite on Flash devices with large sector > sizes. > > Thanks > > -- > > Rupesh > > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users