stm3210e_eval_fsmc_nand.h File Reference

This file contains all the functions prototypes for the stm3210e_eval_fsmc_nand firmware driver. More...

#include "stm32f10x.h"

Go to the source code of this file.

Data Structures

struct  NAND_ADDRESS
struct  NAND_IDTypeDef

Defines

#define ADDR_1st_CYCLE(ADDR)   (uint8_t)((ADDR)& 0xFF)
 FSMC NAND memory address computation.
#define ADDR_2nd_CYCLE(ADDR)   (uint8_t)(((ADDR)& 0xFF00) >> 8)
#define ADDR_3rd_CYCLE(ADDR)   (uint8_t)(((ADDR)& 0xFF0000) >> 16)
#define ADDR_4th_CYCLE(ADDR)   (uint8_t)(((ADDR)& 0xFF000000) >> 24)
#define ADDR_AREA   (uint32_t)(1<<17)
#define CMD_AREA   (uint32_t)(1<<16)
 NAND Area definition for STM3210E-EVAL Board RevD.
#define DATA_AREA   ((uint32_t)0x00000000)
#define NAND_BLOCK_SIZE   ((uint16_t)0x0020)
#define NAND_BUSY   ((uint32_t)0x00000000)
#define NAND_CMD_AREA_A   ((uint8_t)0x00)
 FSMC NAND memory command.
#define NAND_CMD_AREA_B   ((uint8_t)0x01)
#define NAND_CMD_AREA_C   ((uint8_t)0x50)
#define NAND_CMD_ERASE0   ((uint8_t)0x60)
#define NAND_CMD_ERASE1   ((uint8_t)0xD0)
#define NAND_CMD_LOCK_STATUS   ((uint8_t)0x7A)
#define NAND_CMD_READID   ((uint8_t)0x90)
#define NAND_CMD_RESET   ((uint8_t)0xFF)
#define NAND_CMD_STATUS   ((uint8_t)0x70)
#define NAND_CMD_WRITE0   ((uint8_t)0x80)
#define NAND_CMD_WRITE_TRUE1   ((uint8_t)0x10)
#define NAND_ERROR   ((uint32_t)0x00000001)
#define NAND_INVALID_ADDRESS   ((uint32_t)0x00000200)
#define NAND_MAX_ZONE   ((uint16_t)0x0004)
#define NAND_PAGE_SIZE   ((uint16_t)0x0200)
 FSMC NAND memory parameters.
#define NAND_READY   ((uint32_t)0x00000040)
#define NAND_SPARE_AREA_SIZE   ((uint16_t)0x0010)
#define NAND_TIMEOUT_ERROR   ((uint32_t)0x00000400)
#define NAND_VALID_ADDRESS   ((uint32_t)0x00000100)
 NAND memory status.
#define NAND_ZONE_SIZE   ((uint16_t)0x0400)

Functions

uint32_t NAND_AddressIncrement (NAND_ADDRESS *Address)
 Increment the NAND memory address.
uint32_t NAND_EraseBlock (NAND_ADDRESS Address)
 This routine erase complete block from NAND FLASH.
uint32_t NAND_GetStatus (void)
 Get the NAND operation status.
void NAND_Init (void)
 Configures the FSMC and GPIOs to interface with the NAND memory.
void NAND_ReadID (NAND_IDTypeDef *NAND_ID)
 Reads NAND memory's ID.
uint32_t NAND_ReadSmallPage (uint8_t *pBuffer, NAND_ADDRESS Address, uint32_t NumPageToRead)
 This routine is for sequential read from one or several 512 Bytes Page size.
uint32_t NAND_ReadSpareArea (uint8_t *pBuffer, NAND_ADDRESS Address, uint32_t NumSpareAreaToRead)
 This routine read the spare area information from the specified pages addresses.
uint32_t NAND_ReadStatus (void)
 Reads the NAND memory status using the Read status command.
uint32_t NAND_Reset (void)
 This routine reset the NAND FLASH.
uint32_t NAND_WriteSmallPage (uint8_t *pBuffer, NAND_ADDRESS Address, uint32_t NumPageToWrite)
 This routine is for writing one or several 512 Bytes Page size.
uint32_t NAND_WriteSpareArea (uint8_t *pBuffer, NAND_ADDRESS Address, uint32_t NumSpareAreaTowrite)
 This routine write the spare area information for the specified pages addresses.

Detailed Description

This file contains all the functions prototypes for the stm3210e_eval_fsmc_nand firmware driver.

Author:
MCD Application Team
Version:
V4.3.0
Date:
10/15/2010

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

© COPYRIGHT 2010 STMicroelectronics

Definition in file stm3210e_eval_fsmc_nand.h.

STM32F10x Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM32(CORTEX M3) 32-bit Microcontrollers platform visit  www.st.com/STM32