| Electronic Components Datasheet Search |
|
UM0851 Datasheet(PDF) 132 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0851 Datasheet(HTML) 132 Page - STMicroelectronics |
|
132 / 245 page ![]() Non-volatile memory device drivers UM0851 132/245 Doc ID 16604 Rev 2 argument which distinguishes between read and write operations. This function must only be provided if hardware ECC is available. ● calculate_ecc(): this function is called after read/write from/to the chip. It transfers the ECC from the hardware to the buffer. ● correct_data(): in case of an ECC error, this function is called for error detection and correction. If the hardware generator matches the default algorithm of the nand_ecc software generator, then use the correction function provided by nand_ecc instead of implementing duplicated code. In the SPEAr platform, ECC calculation is done by hardware (FSMC) and ECC correction by software. The FSMC hardware in the SPEAr3xx and SPEAr600 platforms generates 3 bytes ECC for 512 bytes page. As already stated, these 3 bytes are at the 2, 3, and 4th offset of the OOB area. For the 2048 bytes page size NAND Flash number of ECC are 12 bytes at the offset 2, 3, 4, 18, 19, 20, 34, 35, 36, 50, 51, and 52th respectively. NAND partitioning Partitioning can be done by 2 ways: static or dynamic. Static partitions need to define a partitioning table in the NAND driver. #define NUM_PARTITIONS 4 static struct mtd_partition partition_info64M[] = { /* 4096 X 0x00004000 */ {.name = "XLoader", .offset = 0, .size = 0x00010000 /* 4 X 0x00004000 */ }, {.name = "Uboot", .offset = 0x00010000, .size = 0x00050000 /* 20 X 0x00004000 */ }, {.name = "Kernel", .offset = 0x00060000, .size = 0x00400000 /* 256 X 0x00004000 */ }, {.name = "Root File system", .offset = 0x00460000, .size = 0x03BA0000 /*3816 X 0x00004000 */ } }; Please note that the offset of any partition is in multiple of sector size of the NAND Flash. While modifying the static partition table, you should take care of this to avoid warning messages when creating partitions. Dynamic partitions are defined in the command-line arguments by using the command: setenv bootargs console=ttyS0 root=/dev/mtdblock7 rootfstype=yaffs mtdparts =spear- nand:4k(XLoader),200k(uBoot),2M(Linux),61M(Ramdisk) The command-line argument creates 4 partitions in the NAND Flash. 5.1.4 NAND device usage The user space application can access the NAND Flash device content using the mtdblock nodes (/dev/mtdblockN) and mtdchar nodes (/dev/mtdN), either in raw mode, for example using the 'dd' command, or in logical mode, mounting a file system (usually YAFFS2 or JFFS2) and accessing its files through open/read/write system calls. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |