資源簡介
stm32 用SPI 方式讀寫 SDHC, 在ST 2.03的庫上編譯通過
代碼片段和文件信息
/********************?(C)?COPYRIGHT?2008?STMicroelectronics?********************
*?File?Name??????????:?fsmc_nand.c
*?Author?????????????:?MCD?Application?Team
*?Version????????????:?V2.2.1
*?Date???????????????:?09/22/2008
*?Description????????:?This?file?provides?a?set?of?functions?needed?to?drive?the
*??????????????????????NAND512W3A2?memory?mounted?on?STM3210E-EVAL?board.
********************************************************************************
*?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.
*******************************************************************************/
/*?Includes?------------------------------------------------------------------*/
#include?“fsmc_nand.h“
/*?Private?typedef?-----------------------------------------------------------*/
/*?Private?define?------------------------------------------------------------*/
#define?FSMC_Bank_NAND?????FSMC_Bank2_NAND
#define?Bank_NAND_ADDR?????Bank2_NAND_ADDR?
#define?Bank2_NAND_ADDR????((u32)0x70000000)
/*?Private?macro?-------------------------------------------------------------*/
#define?ROW_ADDRESS?(Address.Page?+?(Address.Block?+?(Address.Zone?*?NAND_ZONE_SIZE))?*?NAND_BLOCK_SIZE)
/*?Private?variables?---------------------------------------------------------*/
/*?Private?function?prototypes?-----------------------------------------------*/
/*?Private?functions?---------------------------------------------------------*/
/*******************************************************************************
*?Function?Name??:?FSMC_NAND_Init
*?Description????:?Configures?the?FSMC?and?GPIOs?to?interface?with?the?NAND?memory.
*??????????????????This?function?must?be?called?before?any?write/read?operation
*??????????????????on?the?NAND.
*?Input??????????:?None
*?Output?????????:?None
*?Return?????????:?None
*******************************************************************************/
void?FSMC_NAND_Init(void)
{
??GPIO_InitTypeDef?GPIO_InitStructure;?
??FSMC_NANDInitTypeDef?FSMC_NANDInitStructure;
??FSMC_NAND_PCCARDTimingInitTypeDef??p;
??
??RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOD?|?RCC_APB2Periph_GPIOE?|?
?????????????????????????RCC_APB2Periph_GPIOF?|?RCC_APB2Periph_GPIOG?ENABLE);
??
/*--?GPIO?Configuration?------------------------------------------------------*/
/*?CLE?ALE?D0->D3?NOE?NWE?and?NCE2??NAND?pin?configuration??*/
??GPIO_InitStructure.GPIO_Pin?=??GPIO_Pin_11?|?GPIO_Pin_12?|?GPIO_Pin_14?|?GPIO_Pin_15?|??
?????????????????????????????????GPIO_Pin_0?|?GPIO_Pin_1?|?GPIO_Pin_4?|?GPIO_Pin_5?|?
??????????????????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????20145??2008-09-21?13:01??source\fsmc_nand.c
?????文件??????12619??2009-04-13?09:02??source\hw_config.c
?????文件???????3120??2008-09-21?13:01??source\main.c
?????文件???????7844??2009-04-13?10:07??source\mass_mal.c
?????文件???????5388??2009-02-04?17:04??source\memory.c
?????文件??????30880??2009-04-13?14:50??source\msd.c
?????文件??????17281??2008-09-21?13:01??source\nand_if.c
?????文件??????15984??2009-02-04?14:55??source\ram_disk.c
?????文件???????3717??2008-09-21?13:01??source\scsi_data.c
?????文件??????97217??2008-09-21?13:01??source\sdcard.c
?????文件??????29236??2008-09-21?13:01??source\stm32f10x_it.c
?????文件??????10862??2008-09-21?13:01??source\usb_bot.c
?????文件???????4856??2008-09-21?13:01??source\usb_desc.c
?????文件???????2393??2008-09-21?13:01??source\usb_endp.c
?????文件???????5281??2008-09-21?13:01??source\usb_istr.c
?????文件??????12917??2009-02-04?14:10??source\usb_prop.c
?????文件???????7105??2008-09-21?13:01??source\usb_pwr.c
?????文件??????14149??2008-09-21?13:01??source\usb_scsi.c
?????文件???????4502??2008-09-21?13:01??include\fsmc_nand.h
?????文件???????2226??2009-02-04?21:21??include\hw_config.h
?????文件???????1832??2008-09-21?13:01??include\mass_mal.h
?????文件???????1762??2008-09-21?13:01??include\memory.h
?????文件???????8142??2008-09-21?13:01??include\msd.h
?????文件???????2723??2008-09-21?13:01??include\nand_if.h
?????文件???????2643??2009-02-03?18:42??include\platform_config.h
?????文件????????519??2009-02-04?14:55??include\ram_disk.h
?????文件??????14634??2008-09-21?13:01??include\sdcard.h
?????文件???????6503??2009-04-12?17:42??include\stm32f10x_conf.h
?????文件???????3842??2008-09-21?13:01??include\stm32f10x_it.h
?????文件???????3381??2008-09-21?13:01??include\usb_bot.h
............此處省略22個文件信息
評論
共有 條評論