Micron MT29F NAND driver
nand_MT29F_lld.c File Reference

Go to the source code of this file.

Defines

#define ADDR_A_EQ_B   0 /* A = B */
#define ADDR_A_GT_B   2 /* A > B */
#define ADDR_A_LT_B   1 /* A < B */
#define BIT_USED_TO_POLL   STATUS_RDY
#define BLOCK(n)   CHECK_BIT(addr.block, n)
#define BUILD_ADDR_ROW(i_07, i_06, i_05, i_04, i_03, i_02, i_01, i_00)
#define CHECK_BIT(val, n)   ((val & (1 << n)) >> n)
#define COL(n)   CHECK_BIT(addr.column, n)
#define HIGH   1
#define LOW   0
#define LUN(n)   CHECK_BIT(addr.lun, n)
#define NUM_OF_TICKS_TO_TIMEOUT   (TIME_OUT_SECOND * CLOCKS_PER_SEC)
#define PAGE(n)   CHECK_BIT(addr.page, n)

Functions

void __as_string (MT_uint8 *src_ptr, char *dest_ptr, int start, int stop)
MT_uint16 __as_uint16 (MT_uint8 byte0, MT_uint8 byte1)
MT_uint32 __as_uint32 (MT_uint8 byte0, MT_uint8 byte1, MT_uint8 byte2, MT_uint8 byte3)
void __build_cycle_addr (nand_addr_t addr, MT_uint8 *addr_cycle_stream)
MT_uint8 __compare_addr (nand_addr_t first_addr, nand_addr_t second_addr)
MT_uint8 __is_valid_addr (nand_addr_t addr)
MT_uint8 __wait_for_ready ()
MT_uint8 Init_Driver (void)
MT_uint8 NAND_Block_Erase (nand_addr_t addr)
MT_uint8 NAND_Cache_Program (void)
MT_uint8 NAND_Cache_Read (void)
MT_uint8 NAND_Copy_Back (nand_addr_t src_addr, nand_addr_t dest_addr)
MT_uint8 NAND_Get_Feature (flash_width feature_address, flash_width *subfeature)
MT_uint8 NAND_Lock (void)
MT_uint8 NAND_Lock_Down (void)
MT_uint8 NAND_Multiplane_Block_Erase (void)
MT_uint8 NAND_Multiplane_Copy_Back (void)
MT_uint8 NAND_Multiplane_Page_Program (void)
MT_uint8 NAND_OTP_Mode_Enter (void)
MT_uint8 NAND_OTP_Mode_Exit (void)
MT_uint8 NAND_OTP_Mode_Protect (nand_addr_t addr)
MT_uint8 NAND_OTP_Page_Program (nand_addr_t addr, flash_width *buffer, MT_uint32 lenght)
MT_uint8 NAND_OTP_Page_Read (nand_addr_t addr, flash_width *buffer, MT_uint32 lenght)
MT_uint8 NAND_OTP_Spare_Program (nand_addr_t addr, flash_width *buffer, MT_uint32 lenght)
MT_uint8 NAND_OTP_Spare_Read (nand_addr_t addr, flash_width *buffer, MT_uint32 lenght)
MT_uint8 NAND_Page_Program (nand_addr_t addr, flash_width *buffer, MT_uint32 lenght)
MT_uint8 NAND_Page_Read (nand_addr_t addr, flash_width *buffer, MT_uint32 lenght)
MT_uint8 NAND_Read_ID (flash_width *buffer)
MT_uint8 NAND_Read_ID_ONFI (flash_width *buffer)
MT_uint8 NAND_Read_Lock_Status (nand_addr_t block_addr)
MT_uint8 NAND_Read_Param_Page (param_page_t *ppage)
flash_width NAND_Read_Status ()
flash_width NAND_Read_Status_Enhanced (nand_addr_t addr)
MT_uint8 NAND_Read_Unique_Id (flash_width *buffer)
MT_uint8 NAND_Reset (void)
MT_uint8 NAND_Set_Feature (flash_width feature_address, flash_width subfeature)
MT_uint8 NAND_Spare_Program (nand_addr_t addr, flash_width *buffer, MT_uint32 lenght)
MT_uint8 NAND_Spare_Read (nand_addr_t addr, flash_width *buffer, MT_uint32 lenght)
MT_uint8 NAND_Unlock (nand_addr_t start_block, nand_addr_t end_block)
MT_uint8 NAND_Unlock_Down (void)

Variables

struct parameter_page_t device_info
MT_uint8 driver_status = 1

Detailed Description

Filename: nand_MT29F_lld.c Description: Library routines for the Software Drivers for NAND flash

© 2012 Micron Technology, Inc. All Rights Reserved

You have a license to reproduce, display, perform, produce derivative works of, and distribute (in original or modified form) the Program, provided that you explicitly agree to the following disclaimer:

THIS PROGRAM IS PROVIDED "AS IT IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

Version History.

Ver. No Date Comments

First release 1.0 07/2012 Second release 1.1 03/2013 Added OTP functions

Definition in file nand_MT29F_lld.c.