STM32100E_EVAL_FSMC_ONENAND_Private_Functions
[STM32100E_EVAL_FSMC_ONENAND]

Functions

void OneNAND_AsynchronousRead (uint16_t *pBuffer, uint32_t ReadAddr, uint32_t NumHalfwordToRead)
 Reads a block of data from the OneNAND memory.
uint16_t OneNAND_EraseBlock (uint32_t BlockAddr)
 Erases the specified OneNAND memory block.
void OneNAND_Init (void)
 Configures the FSMC and GPIOs to interface with the OneNAND memory.
uint16_t OneNAND_ReadControllerStatus (void)
 Reads the OneNAND Controller status.
void OneNAND_ReadID (OneNAND_IDTypeDef *OneNAND_ID)
 Reads OneNAND memory's Manufacturer and Device Code.
uint16_t OneNAND_ReadStatus (void)
 Reads the OneNAND memory status.
void OneNAND_Reset (void)
 Resets the OneNAND memory.
void OneNAND_SynchronousRead (uint16_t *pBuffer, uint32_t ReadAddr, uint32_t NumHalfwordToRead)
 Reads a block of data from the OneNAND memory.
uint16_t OneNAND_Unlock (void)
 Unlocks the OneNAND memory.
uint16_t OneNAND_WriteBuffer (uint16_t *pBuffer, uint32_t WriteAddr, uint32_t NumHalfwordToWrite)
 Writes a Half-word buffer to the OneNAND memory.

Function Documentation

void OneNAND_AsynchronousRead ( uint16_t *  pBuffer,
uint32_t  ReadAddr,
uint32_t  NumHalfwordToRead 
)

Reads a block of data from the OneNAND memory.

Parameters:
pBuffer : pointer to the buffer that receives the data read from the OneNAND memory.
ReadAddr : OneNAND memory internal address to read from.
NumHalfwordToRead : number of half-words to read.
Return values:
None 

Definition at line 337 of file stm32100e_eval_fsmc_onenand.c.

References Bank1_NOR1_ADDR, OneNAND_REG_SYSTEMCONFIGURATION, and OneNAND_WRITE.

Referenced by main().

uint16_t OneNAND_EraseBlock ( uint32_t  BlockAddr  ) 

Erases the specified OneNAND memory block.

Parameters:
None 
Return values:
The returned value can be: OneNAND_SUCCESS, OneNAND_ERROR or OneNAND_TIMEOUT

Definition at line 231 of file stm32100e_eval_fsmc_onenand.c.

References Bank1_NOR1_ADDR, and status.

Referenced by main().

void OneNAND_Init ( void   ) 

Configures the FSMC and GPIOs to interface with the OneNAND memory.

This function must be called before any write/read operation on the OneNAND.

Parameters:
None 
Return values:
None 

< OneNAND Data lines configuration

< OneNAND Address lines configuration

< CLK, NOE and NWE configuration

< NE1 configuration

< NL configuration

< NWAIT configuration

Definition at line 100 of file stm32100e_eval_fsmc_onenand.c.

References ENABLE, FSMC_NORSRAMTimingInitTypeDef::FSMC_AccessMode, FSMC_AccessMode_B, FSMC_NORSRAMTimingInitTypeDef::FSMC_AddressHoldTime, FSMC_NORSRAMTimingInitTypeDef::FSMC_AddressSetupTime, FSMC_NORSRAMInitTypeDef::FSMC_AsynchronousWait, FSMC_AsynchronousWait_Disable, FSMC_NORSRAMInitTypeDef::FSMC_Bank, FSMC_Bank1_NORSRAM1, FSMC_NORSRAMInitTypeDef::FSMC_BurstAccessMode, FSMC_BurstAccessMode_Enable, FSMC_NORSRAMTimingInitTypeDef::FSMC_BusTurnAroundDuration, FSMC_NORSRAMTimingInitTypeDef::FSMC_CLKDivision, FSMC_NORSRAMInitTypeDef::FSMC_DataAddressMux, FSMC_DataAddressMux_Disable, FSMC_NORSRAMTimingInitTypeDef::FSMC_DataLatency, FSMC_NORSRAMTimingInitTypeDef::FSMC_DataSetupTime, FSMC_NORSRAMInitTypeDef::FSMC_ExtendedMode, FSMC_ExtendedMode_Disable, FSMC_NORSRAMInitTypeDef::FSMC_MemoryDataWidth, FSMC_MemoryDataWidth_16b, FSMC_NORSRAMInitTypeDef::FSMC_MemoryType, FSMC_MemoryType_NOR, FSMC_NORSRAMCmd(), FSMC_NORSRAMInit(), FSMC_NORSRAMInitTypeDef::FSMC_ReadWriteTimingStruct, FSMC_NORSRAMInitTypeDef::FSMC_WaitSignal, FSMC_WaitSignal_Disable, FSMC_NORSRAMInitTypeDef::FSMC_WaitSignalActive, FSMC_WaitSignalActive_BeforeWaitState, FSMC_NORSRAMInitTypeDef::FSMC_WaitSignalPolarity, FSMC_WaitSignalPolarity_Low, FSMC_NORSRAMInitTypeDef::FSMC_WrapMode, FSMC_WrapMode_Disable, FSMC_NORSRAMInitTypeDef::FSMC_WriteBurst, FSMC_WriteBurst_Disable, FSMC_NORSRAMInitTypeDef::FSMC_WriteOperation, FSMC_WriteOperation_Enable, FSMC_NORSRAMInitTypeDef::FSMC_WriteTimingStruct, GPIO_Init(), GPIO_InitStructure, GPIO_InitTypeDef::GPIO_Mode, GPIO_Mode_AF_PP, GPIO_Mode_IN_FLOATING, GPIO_InitTypeDef::GPIO_Pin, GPIO_Pin_0, GPIO_Pin_1, GPIO_Pin_10, GPIO_Pin_11, GPIO_Pin_12, GPIO_Pin_13, GPIO_Pin_14, GPIO_Pin_15, GPIO_Pin_2, GPIO_Pin_3, GPIO_Pin_4, GPIO_Pin_5, GPIO_Pin_6, GPIO_Pin_7, GPIO_Pin_8, GPIO_Pin_9, GPIO_InitTypeDef::GPIO_Speed, GPIO_Speed_50MHz, GPIOB, GPIOD, GPIOE, GPIOF, GPIOG, RCC_AHBPeriph_FSMC, RCC_AHBPeriphClockCmd(), RCC_APB2Periph_GPIOD, RCC_APB2Periph_GPIOE, RCC_APB2Periph_GPIOF, RCC_APB2Periph_GPIOG, and RCC_APB2PeriphClockCmd().

Referenced by main().

uint16_t OneNAND_ReadControllerStatus ( void   ) 

Reads the OneNAND Controller status.

Parameters:
None 
Return values:
OneNAND Controller Status

Definition at line 217 of file stm32100e_eval_fsmc_onenand.c.

References Bank1_NOR1_ADDR, OneNAND_REG_CONTROLSTATUS, and status.

void OneNAND_ReadID ( OneNAND_IDTypeDef OneNAND_ID  ) 

Reads OneNAND memory's Manufacturer and Device Code.

Parameters:
OneNAND_ID,: pointer to a OneNAND_IDTypeDef structure which will hold the Manufacturer and Device Code.
Return values:
None 

Definition at line 189 of file stm32100e_eval_fsmc_onenand.c.

References Bank1_NOR1_ADDR, OneNAND_IDTypeDef::Device_ID, OneNAND_IDTypeDef::Manufacturer_ID, OneNAND_CMD_READ_ID, OneNAND_REG_COMMAND, OneNAND_REG_DEVICEID, OneNAND_REG_MANUFACTERID, and OneNAND_WRITE.

Referenced by main().

uint16_t OneNAND_ReadStatus ( void   ) 

Reads the OneNAND memory status.

Parameters:
None 
Return values:
OneNAND Status

Definition at line 204 of file stm32100e_eval_fsmc_onenand.c.

References Bank1_NOR1_ADDR, OneNAND_REG_INTERRUPT, and status.

void OneNAND_Reset ( void   ) 

Resets the OneNAND memory.

Parameters:
None 
Return values:
None 

Definition at line 255 of file stm32100e_eval_fsmc_onenand.c.

References ONENAND_BOOTPARTITION_ADDR, OneNAND_CMD_RESET, OneNAND_REG_COMMAND, and OneNAND_WRITE.

void OneNAND_SynchronousRead ( uint16_t *  pBuffer,
uint32_t  ReadAddr,
uint32_t  NumHalfwordToRead 
)

Reads a block of data from the OneNAND memory.

Parameters:
pBuffer : pointer to the buffer that receives the data read from the OneNAND memory.
ReadAddr : OneNAND memory internal address to read from.
NumHalfwordToRead : number of half-words to read.
Return values:
None 

Definition at line 361 of file stm32100e_eval_fsmc_onenand.c.

References Bank1_NOR1_ADDR, OneNAND_REG_SYSTEMCONFIGURATION, and OneNAND_WRITE.

uint16_t OneNAND_Unlock ( void   ) 

Unlocks the OneNAND memory.

Parameters:
None 
Return values:
None 

Definition at line 265 of file stm32100e_eval_fsmc_onenand.c.

References Bank1_NOR1_ADDR, and status.

uint16_t OneNAND_WriteBuffer ( uint16_t *  pBuffer,
uint32_t  WriteAddr,
uint32_t  NumHalfwordToWrite 
)

Writes a Half-word buffer to the OneNAND memory.

Parameters:
pBuffer : pointer to buffer.
WriteAddr : OneNAND memory internal address from which the data will be written.
NumHalfwordToWrite : number of half-words to write.
Return values:
None 

Definition at line 290 of file stm32100e_eval_fsmc_onenand.c.

References Bank1_NOR1_ADDR, and status.

Referenced by main().

STM32F10x Standard Peripherals Library: Footer

 

 

 

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