stm3210e_eval_fsmc_nor.c File Reference

This file provides a set of functions needed to drive the M29W128FL, M29W128GL and S29GL128P NOR memories mounted on STM3210E-EVAL board. More...

#include "stm3210e_eval_fsmc_nor.h"
#include "stm32f10x.h"

Go to the source code of this file.

Defines

#define ADDR_SHIFT(A)   (Bank1_NOR2_ADDR + (2 * (A)))
#define Bank1_NOR2_ADDR   ((uint32_t)0x64000000)
 FSMC Bank 1 NOR/SRAM2.
#define BlockErase_Timeout   ((uint32_t)0x00A00000)
#define ChipErase_Timeout   ((uint32_t)0x30000000)
#define NOR_WRITE(Address, Data)   (*(__IO uint16_t *)(Address) = (Data))
#define Program_Timeout   ((uint32_t)0x00001400)

Functions

NOR_Status NOR_EraseBlock (uint32_t BlockAddr)
 Erases the specified Nor memory block.
NOR_Status NOR_EraseChip (void)
 Erases the entire chip.
NOR_Status NOR_GetStatus (uint32_t Timeout)
 Returns the NOR operation status.
void NOR_Init (void)
 Configures the FSMC and GPIOs to interface with the NOR memory.
NOR_Status NOR_ProgramBuffer (uint16_t *pBuffer, uint32_t WriteAddr, uint32_t NumHalfwordToWrite)
 Writes a half-word buffer to the FSMC NOR memory.
void NOR_ReadBuffer (uint16_t *pBuffer, uint32_t ReadAddr, uint32_t NumHalfwordToRead)
 Reads a block of data from the FSMC NOR memory.
uint16_t NOR_ReadHalfWord (uint32_t ReadAddr)
 Reads a half-word from the NOR memory.
void NOR_ReadID (NOR_IDTypeDef *NOR_ID)
 Reads NOR memory's Manufacturer and Device Code.
NOR_Status NOR_Reset (void)
 Returns the NOR memory to Read mode and resets the errors in the NOR memory Status Register.
NOR_Status NOR_ReturnToReadMode (void)
 Returns the NOR memory to Read mode.
NOR_Status NOR_WriteBuffer (uint16_t *pBuffer, uint32_t WriteAddr, uint32_t NumHalfwordToWrite)
 Writes a half-word buffer to the FSMC NOR memory.
NOR_Status NOR_WriteHalfWord (uint32_t WriteAddr, uint16_t Data)
 Writes a half-word to the NOR memory.

Detailed Description

This file provides a set of functions needed to drive the M29W128FL, M29W128GL and S29GL128P NOR memories mounted on STM3210E-EVAL board.

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_nor.c.

STM32F10x Standard Peripherals Library: Footer

 

 

 

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