Download uC/GUI user manual
Transcript
156 CHAPTER 5 Device drivers Permitted values for parameter pPhyType FS_NAND_PHY_x FS_NAND_PHY_x8 FS_NAND_PHY_DataFlash Supports the following NAND devices: - 512 bytes per page and 8-bit width - 2048 bytes per page and 8-bit width - 2048 bytes per page and 16-bit width Supports the following NAND devices: - 512 bytes per page and 8-bit width - 2048 bytes per page and 8-bit width Supports ATMEL DataFlashes. The physical layer driver accesses these chips using the SPI mode. To use the driver with ATMEL DataFlash chips in your system, you will have to provide basic I/O functions which are divergend to the hardware functions of the other physical layers. Refer to ... Additional information This function needs to be called for every NAND device added. Example Refer to “Adding the driver to µC/FS” on page 155 for an example. FS_NAND_SetBlockRange() Description Sets a limit for which blocks of the NAND flash can be controlled by the driver. Prototype void FS_NAND_SetBlockRange(U8 Unit, U16 FirstBlock, U16 MaxNumBlocks); Parameter Meaning Unit number (0…N). Zero-based index of the first block to use. Specifies the number of blocks at the beginning of the device to FirstBlock skip. 0 means that no blocks are skipped. Maximum number of blocks to use. MaxNumBlocks 0 means use all blocks after FirstBlock. Unit Table 5.9: FS_NAND_SetBlockRange() parameter list Additional information This function is optional. By default, the driver controls all blocks of the NAND flash, making the entire NAND flash available. If a part of the NAND flash should be used for another purpose (for example to store the application program used by a bootloader) and therefore is not controlled by the driver, this function can be used. Limiting the number of blocks used by the driver also reduces the amount of memory used by the driver. Example Refer to “Adding the driver to µC/FS” on page 155 for an example. User's & reference manual for μC/FS © 2004-2007 Micrium