[完善]:修改429bsp,8g的sd卡可以使用,但是大容量32g的卡无法通过初始化。
This commit is contained in:
parent
326d405c26
commit
96383266b4
|
@ -72,7 +72,26 @@ CONFIG_FINSH_DEFAULT_PASSWORD="rtthread"
|
||||||
#
|
#
|
||||||
# Device virtual file system
|
# Device virtual file system
|
||||||
#
|
#
|
||||||
# CONFIG_RT_USING_DFS is not set
|
CONFIG_RT_USING_DFS=y
|
||||||
|
# CONFIG_DFS_USING_WORKDIR is not set
|
||||||
|
CONFIG_DFS_FILESYSTEMS_MAX=4
|
||||||
|
CONFIG_DFS_FD_MAX=16
|
||||||
|
CONFIG_RT_USING_DFS_ELMFAT=y
|
||||||
|
CONFIG_RT_DFS_ELM_CODE_PAGE=437
|
||||||
|
CONFIG_RT_DFS_ELM_WORD_ACCESS=y
|
||||||
|
# CONFIG_RT_DFS_ELM_USE_LFN_0 is not set
|
||||||
|
# CONFIG_RT_DFS_ELM_USE_LFN_1 is not set
|
||||||
|
# CONFIG_RT_DFS_ELM_USE_LFN_2 is not set
|
||||||
|
CONFIG_RT_DFS_ELM_USE_LFN_3=y
|
||||||
|
CONFIG_RT_DFS_ELM_USE_LFN=3
|
||||||
|
CONFIG_RT_DFS_ELM_MAX_LFN=255
|
||||||
|
CONFIG_RT_DFS_ELM_DRIVES=2
|
||||||
|
CONFIG_RT_DFS_ELM_MAX_SECTOR_SIZE=4096
|
||||||
|
# CONFIG_RT_DFS_ELM_USE_ERASE is not set
|
||||||
|
CONFIG_RT_DFS_ELM_REENTRANT=y
|
||||||
|
CONFIG_RT_USING_DFS_DEVFS=y
|
||||||
|
# CONFIG_RT_USING_DFS_NET is not set
|
||||||
|
# CONFIG_RT_USING_DFS_NFS is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# Device Drivers
|
# Device Drivers
|
||||||
|
@ -88,9 +107,12 @@ CONFIG_RT_USING_I2C_BITOPS=y
|
||||||
CONFIG_RT_USING_MTD_NAND=y
|
CONFIG_RT_USING_MTD_NAND=y
|
||||||
CONFIG_RT_MTD_NAND_DEBUG=y
|
CONFIG_RT_MTD_NAND_DEBUG=y
|
||||||
CONFIG_RT_USING_RTC=y
|
CONFIG_RT_USING_RTC=y
|
||||||
# CONFIG_RT_USING_SDIO is not set
|
CONFIG_RT_USING_SDIO=y
|
||||||
CONFIG_RT_USING_SPI=y
|
CONFIG_RT_USING_SPI=y
|
||||||
# CONFIG_RT_USING_SFUD is not set
|
CONFIG_RT_USING_SFUD=y
|
||||||
|
CONFIG_RT_SFUD_USING_SFDP=y
|
||||||
|
CONFIG_RT_SFUD_USING_FLASH_INFO_TABLE=y
|
||||||
|
CONFIG_RT_SFUD_DEBUG=y
|
||||||
# CONFIG_RT_USING_W25QXX is not set
|
# CONFIG_RT_USING_W25QXX is not set
|
||||||
# CONFIG_RT_USING_GD is not set
|
# CONFIG_RT_USING_GD is not set
|
||||||
# CONFIG_RT_USING_ENC28J60 is not set
|
# CONFIG_RT_USING_ENC28J60 is not set
|
||||||
|
|
|
@ -108,7 +108,7 @@ uint8_t NAND_ModeSet(uint8_t mode);
|
||||||
uint32_t NAND_ReadID(void);
|
uint32_t NAND_ReadID(void);
|
||||||
uint8_t NAND_ReadStatus(void);
|
uint8_t NAND_ReadStatus(void);
|
||||||
uint8_t NAND_WaitForReady(void);
|
uint8_t NAND_WaitForReady(void);
|
||||||
static rt_uint8_t nand_reset(void);
|
//static rt_uint8_t nand_reset(void);
|
||||||
uint8_t NAND_WaitRB(__IO uint8_t rb);
|
uint8_t NAND_WaitRB(__IO uint8_t rb);
|
||||||
void NAND_Delay(volatile rt_uint32_t i);
|
void NAND_Delay(volatile rt_uint32_t i);
|
||||||
uint8_t NAND_ReadPage(uint32_t PageNum,uint16_t ColNum,uint8_t *pBuffer,uint16_t NumByteToRead);
|
uint8_t NAND_ReadPage(uint32_t PageNum,uint16_t ColNum,uint8_t *pBuffer,uint16_t NumByteToRead);
|
||||||
|
|
|
@ -10,7 +10,7 @@ DMA_HandleTypeDef SDTxDMAHandler,SDRxDMAHandler; //SD
|
||||||
|
|
||||||
//SD卡初始化
|
//SD卡初始化
|
||||||
//返回值:0 初始化正确;其他值,初始化错误
|
//返回值:0 初始化正确;其他值,初始化错误
|
||||||
rt_uint8_t SD_Init(void)
|
rt_uint8_t SD_Init(void)
|
||||||
{
|
{
|
||||||
rt_uint8_t SD_Error;
|
rt_uint8_t SD_Error;
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,26 @@
|
||||||
|
|
||||||
/* Device virtual file system */
|
/* Device virtual file system */
|
||||||
|
|
||||||
/* RT_USING_DFS is not set */
|
#define RT_USING_DFS
|
||||||
|
/* DFS_USING_WORKDIR is not set */
|
||||||
|
#define DFS_FILESYSTEMS_MAX 4
|
||||||
|
#define DFS_FD_MAX 16
|
||||||
|
#define RT_USING_DFS_ELMFAT
|
||||||
|
#define RT_DFS_ELM_CODE_PAGE 437
|
||||||
|
#define RT_DFS_ELM_WORD_ACCESS
|
||||||
|
/* RT_DFS_ELM_USE_LFN_0 is not set */
|
||||||
|
/* RT_DFS_ELM_USE_LFN_1 is not set */
|
||||||
|
/* RT_DFS_ELM_USE_LFN_2 is not set */
|
||||||
|
#define RT_DFS_ELM_USE_LFN_3
|
||||||
|
#define RT_DFS_ELM_USE_LFN 3
|
||||||
|
#define RT_DFS_ELM_MAX_LFN 255
|
||||||
|
#define RT_DFS_ELM_DRIVES 2
|
||||||
|
#define RT_DFS_ELM_MAX_SECTOR_SIZE 4096
|
||||||
|
/* RT_DFS_ELM_USE_ERASE is not set */
|
||||||
|
#define RT_DFS_ELM_REENTRANT
|
||||||
|
#define RT_USING_DFS_DEVFS
|
||||||
|
/* RT_USING_DFS_NET is not set */
|
||||||
|
/* RT_USING_DFS_NFS is not set */
|
||||||
|
|
||||||
/* Device Drivers */
|
/* Device Drivers */
|
||||||
|
|
||||||
|
@ -80,9 +99,12 @@
|
||||||
#define RT_USING_MTD_NAND
|
#define RT_USING_MTD_NAND
|
||||||
#define RT_MTD_NAND_DEBUG
|
#define RT_MTD_NAND_DEBUG
|
||||||
#define RT_USING_RTC
|
#define RT_USING_RTC
|
||||||
/* RT_USING_SDIO is not set */
|
#define RT_USING_SDIO
|
||||||
#define RT_USING_SPI
|
#define RT_USING_SPI
|
||||||
/* RT_USING_SFUD is not set */
|
#define RT_USING_SFUD
|
||||||
|
#define RT_SFUD_USING_SFDP
|
||||||
|
#define RT_SFUD_USING_FLASH_INFO_TABLE
|
||||||
|
#define RT_SFUD_DEBUG
|
||||||
/* RT_USING_W25QXX is not set */
|
/* RT_USING_W25QXX is not set */
|
||||||
/* RT_USING_GD is not set */
|
/* RT_USING_GD is not set */
|
||||||
/* RT_USING_ENC28J60 is not set */
|
/* RT_USING_ENC28J60 is not set */
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<TargetOption>
|
<TargetOption>
|
||||||
<CLKADS>12000000</CLKADS>
|
<CLKADS>12000000</CLKADS>
|
||||||
<OPTTT>
|
<OPTTT>
|
||||||
<gFlags>0</gFlags>
|
<gFlags>1</gFlags>
|
||||||
<BeepAtEnd>1</BeepAtEnd>
|
<BeepAtEnd>1</BeepAtEnd>
|
||||||
<RunSim>0</RunSim>
|
<RunSim>0</RunSim>
|
||||||
<RunTarget>1</RunTarget>
|
<RunTarget>1</RunTarget>
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<IsCurrentTarget>1</IsCurrentTarget>
|
<IsCurrentTarget>1</IsCurrentTarget>
|
||||||
</OPTFL>
|
</OPTFL>
|
||||||
<CpuCode>0</CpuCode>
|
<CpuCode>18</CpuCode>
|
||||||
<Books>
|
<Books>
|
||||||
<Book>
|
<Book>
|
||||||
<Number>0</Number>
|
<Number>0</Number>
|
||||||
|
|
|
@ -256,17 +256,17 @@
|
||||||
<Size>0x0</Size>
|
<Size>0x0</Size>
|
||||||
</XRAM>
|
</XRAM>
|
||||||
<OCR_RVCT1>
|
<OCR_RVCT1>
|
||||||
<Type>0</Type>
|
<Type>1</Type>
|
||||||
<StartAddress>0x0</StartAddress>
|
<StartAddress>0x0</StartAddress>
|
||||||
<Size>0x0</Size>
|
<Size>0x0</Size>
|
||||||
</OCR_RVCT1>
|
</OCR_RVCT1>
|
||||||
<OCR_RVCT2>
|
<OCR_RVCT2>
|
||||||
<Type>0</Type>
|
<Type>1</Type>
|
||||||
<StartAddress>0x0</StartAddress>
|
<StartAddress>0x0</StartAddress>
|
||||||
<Size>0x0</Size>
|
<Size>0x0</Size>
|
||||||
</OCR_RVCT2>
|
</OCR_RVCT2>
|
||||||
<OCR_RVCT3>
|
<OCR_RVCT3>
|
||||||
<Type>0</Type>
|
<Type>1</Type>
|
||||||
<StartAddress>0x0</StartAddress>
|
<StartAddress>0x0</StartAddress>
|
||||||
<Size>0x0</Size>
|
<Size>0x0</Size>
|
||||||
</OCR_RVCT3>
|
</OCR_RVCT3>
|
||||||
|
@ -276,7 +276,7 @@
|
||||||
<Size>0x100000</Size>
|
<Size>0x100000</Size>
|
||||||
</OCR_RVCT4>
|
</OCR_RVCT4>
|
||||||
<OCR_RVCT5>
|
<OCR_RVCT5>
|
||||||
<Type>0</Type>
|
<Type>1</Type>
|
||||||
<StartAddress>0x0</StartAddress>
|
<StartAddress>0x0</StartAddress>
|
||||||
<Size>0x0</Size>
|
<Size>0x0</Size>
|
||||||
</OCR_RVCT5>
|
</OCR_RVCT5>
|
||||||
|
@ -322,7 +322,7 @@
|
||||||
<wLevel>2</wLevel>
|
<wLevel>2</wLevel>
|
||||||
<uThumb>0</uThumb>
|
<uThumb>0</uThumb>
|
||||||
<uSurpInc>0</uSurpInc>
|
<uSurpInc>0</uSurpInc>
|
||||||
<uC99>0</uC99>
|
<uC99>1</uC99>
|
||||||
<useXO>0</useXO>
|
<useXO>0</useXO>
|
||||||
<v6Lang>1</v6Lang>
|
<v6Lang>1</v6Lang>
|
||||||
<v6LangP>1</v6LangP>
|
<v6LangP>1</v6LangP>
|
||||||
|
|
Loading…
Reference in New Issue