- Fixed bug to prevent loop if an SD-card is not formatted correctly or if the file system is corrupt. Applies to STM32F4xx-SDIO.

git-svn-id: https://svn.code.sf.net/p/openblt/code/trunk@115 5dc33758-31d5-4daf-9ae8-b24bf3d40d73
This commit is contained in:
Frank Voorburg 2015-01-22 16:48:04 +00:00
parent 83206d7fac
commit e02caf47e9
14 changed files with 8920 additions and 8864 deletions

View File

@ -48,9 +48,9 @@
</TraceWindow>
<Watch1>
<Watches active="1" update="Never" >
<Watchpoint linenumber="121" radix="-1" name="free_running_counter_last" expression="free_running_counter_last" filename="d:/usr/feaser/software/openblt/target/source/armcm3_stm32/timer.c" />
<Watchpoint linenumber="152" radix="-1" name="free_running_counter_accumulative" expression="free_running_counter_accumulative" filename="d:/usr/feaser/software/openblt/target/source/armcm3_stm32/timer.c" />
<Watchpoint linenumber="124" radix="-1" name="free_running_counter_now" expression="free_running_counter_now" filename="d:/usr/feaser/software/openblt/target/source/armcm3_stm32/timer.c" />
<Watchpoint linenumber="152" radix="-1" name="free_running_counter_accumulative" expression="free_running_counter_accumulative" filename="d:/usr/feaser/software/openblt/target/source/armcm3_stm32/timer.c" />
<Watchpoint linenumber="121" radix="-1" name="free_running_counter_last" expression="free_running_counter_last" filename="d:/usr/feaser/software/openblt/target/source/armcm3_stm32/timer.c" />
</Watches>
</Watch1>
<Watch2>
@ -63,9 +63,9 @@
<Watches active="0" update="Never" />
</Watch4>
<Files>
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARMCM4_STM32_Olimex_STM32E407_Crossworks\Boot\main.c" y="54" path="C:\Work\software\OpenBLT\Target\Demo\ARMCM4_STM32_Olimex_STM32E407_Crossworks\Boot\main.c" left="18" selected="0" name="unnamed" top="50" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARMCM4_STM32_Olimex_STM32E407_Crossworks\Boot\blt_conf.h" y="186" path="C:\Work\software\OpenBLT\Target\Demo\ARMCM4_STM32_Olimex_STM32E407_Crossworks\Boot\blt_conf.h" left="18" selected="0" name="unnamed" top="186" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\work\software\openblt\target\demo\armcm4_stm32_olimex_stm32e407_crossworks\boot\usb_bsp.c" y="165" path="C:\work\software\openblt\target\demo\armcm4_stm32_olimex_stm32e407_crossworks\boot\usb_bsp.c" left="18" selected="1" name="unnamed" top="141" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARMCM4_STM32_Olimex_STM32E407_Crossworks\Boot\main.c" y="54" path="C:\Work\software\OpenBLT\Target\Demo\ARMCM4_STM32_Olimex_STM32E407_Crossworks\Boot\main.c" left="0" selected="0" name="unnamed" top="50" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\Work\software\OpenBLT\Target\Demo\ARMCM4_STM32_Olimex_STM32E407_Crossworks\Boot\blt_conf.h" y="186" path="C:\Work\software\OpenBLT\Target\Demo\ARMCM4_STM32_Olimex_STM32E407_Crossworks\Boot\blt_conf.h" left="0" selected="0" name="unnamed" top="186" />
<SessionOpenFile useTextEdit="1" useBinaryEdit="0" codecName="Latin1" x="0" debugPath="C:\work\software\openblt\target\demo\armcm4_stm32_olimex_stm32e407_crossworks\boot\usb_bsp.c" y="165" path="C:\work\software\openblt\target\demo\armcm4_stm32_olimex_stm32e407_crossworks\boot\usb_bsp.c" left="0" selected="1" name="unnamed" top="141" />
</Files>
<ARMCrossStudioWindow activeProject="openbtl_olimex_stm32e407" autoConnectTarget="SEGGER J-Link" debugSearchFileMap="" fileDialogInitialDirectory="C:\Work\software\OpenBLT\Target\Demo\ARMCM4_STM32_Olimex_STM32E407_Crossworks\Boot\lib\usbotgdriver\src" fileDialogDefaultFilter="*.c" autoConnectCapabilities="266111" debugSearchPath="" buildConfiguration="THUMB Debug" />
</session>

View File

@ -2812,6 +2812,7 @@ static SD_Error FindSCR(uint16_t rca, uint32_t *pscr)
uint32_t index = 0;
SD_Error errorstatus = SD_OK;
uint32_t tempscr[2] = {0, 0};
uint32_t timeout = 0;
/*!< Set Block Size To 8 Bytes */
/*!< Send CMD55 APP_CMD with argument as card's RCA */
@ -2873,7 +2874,14 @@ static SD_Error FindSCR(uint16_t rca, uint32_t *pscr)
{
*(tempscr + index) = SDIO_ReadData();
index++;
}
}
timeout++;
if (timeout > 10000)
{
return SD_DATA_TIMEOUT;
}
}
if (SDIO_GetFlagStatus(SDIO_FLAG_DTIMEOUT) != RESET)
@ -3139,12 +3147,15 @@ void SD_SDIO_DMA_IRQHANDLER(void)
DSTATUS disk_initialize (BYTE drv)
{
SD_Error result = SD_Init();
if (result == SD_OK) {
if (result == SD_OK)
{
SD_CardInfo card;
Stat &= ~STA_NOINIT; /* Clear STA_NOINIT */
SD_GetCardInfo(&card);
SD_GetCardInfo (&card);
return RES_OK;
} else {
}
else
{
Stat = STA_NOINIT; /* Set STA_NOINIT */
return RES_NOTRDY;
}
@ -3366,9 +3377,13 @@ DRESULT disk_ioctl(BYTE drv, BYTE ctrl, void *buff)
res = RES_ERROR;
if (Stat & STA_NOINIT) return RES_NOTRDY;
if (Stat & STA_NOINIT)
{
return RES_NOTRDY;
}
switch (ctrl) {
switch (ctrl)
{
case CTRL_SYNC : /* Make sure that no pending write process */
res = RES_OK;
break;
@ -3389,7 +3404,9 @@ DRESULT disk_ioctl(BYTE drv, BYTE ctrl, void *buff)
case GET_BLOCK_SIZE : /* Get erase block size in unit of sector (DWORD) */
if(drv == 0)
*(DWORD*)buff = 32;
{
* (DWORD*)buff = 32;
}
res = RES_OK;
break;

View File

@ -7,8 +7,8 @@ start address 0x08000000
Program Header:
LOAD off 0x00008000 vaddr 0x08000000 paddr 0x08000000 align 2**15
filesz 0x0000a010 memsz 0x0000a010 flags r-x
LOAD off 0x00018000 vaddr 0x20000000 paddr 0x0800a010 align 2**15
filesz 0x0000a028 memsz 0x0000a028 flags r-x
LOAD off 0x00018000 vaddr 0x20000000 paddr 0x0800a028 align 2**15
filesz 0x000000ec memsz 0x000000ec flags rw-
LOAD off 0x00018100 vaddr 0x20000100 paddr 0x0800a180 align 2**15
filesz 0x00000000 memsz 0x00003564 flags rw-
@ -16,31 +16,31 @@ private flags = 5000202: [Version5 EABI] [soft-float ABI] [has entry point]
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 0000a010 08000000 08000000 00008000 2**2
0 .text 0000a028 08000000 08000000 00008000 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 000000ec 20000000 0800a010 00018000 2**2
1 .data 000000ec 20000000 0800a028 00018000 2**2
CONTENTS, ALLOC, LOAD, DATA
2 .bss 00003564 20000100 0800a180 00018100 2**7
ALLOC
3 .debug_info 0001fb2d 00000000 00000000 000180ec 2**0
3 .debug_info 0001fb3e 00000000 00000000 000180ec 2**0
CONTENTS, READONLY, DEBUGGING
4 .debug_abbrev 00005409 00000000 00000000 00037c19 2**0
4 .debug_abbrev 00005409 00000000 00000000 00037c2a 2**0
CONTENTS, READONLY, DEBUGGING
5 .debug_loc 0000f432 00000000 00000000 0003d022 2**0
5 .debug_loc 0000f4ac 00000000 00000000 0003d033 2**0
CONTENTS, READONLY, DEBUGGING
6 .debug_aranges 00001558 00000000 00000000 0004c454 2**0
6 .debug_aranges 00001558 00000000 00000000 0004c4df 2**0
CONTENTS, READONLY, DEBUGGING
7 .debug_ranges 00001408 00000000 00000000 0004d9ac 2**0
7 .debug_ranges 00001420 00000000 00000000 0004da37 2**0
CONTENTS, READONLY, DEBUGGING
8 .debug_line 000079d5 00000000 00000000 0004edb4 2**0
8 .debug_line 000079e0 00000000 00000000 0004ee57 2**0
CONTENTS, READONLY, DEBUGGING
9 .debug_str 000073b3 00000000 00000000 00056789 2**0
9 .debug_str 000073b3 00000000 00000000 00056837 2**0
CONTENTS, READONLY, DEBUGGING
10 .comment 00000030 00000000 00000000 0005db3c 2**0
10 .comment 00000030 00000000 00000000 0005dbea 2**0
CONTENTS, READONLY
11 .ARM.attributes 00000033 00000000 00000000 0005db6c 2**0
11 .ARM.attributes 00000033 00000000 00000000 0005dc1a 2**0
CONTENTS, READONLY
12 .debug_frame 000036c0 00000000 00000000 0005dba0 2**2
12 .debug_frame 000036c4 00000000 00000000 0005dc50 2**2
CONTENTS, READONLY, DEBUGGING
SYMBOL TABLE:
08000000 l d .text 00000000 .text
@ -58,7 +58,7 @@ SYMBOL TABLE:
00000000 l d .debug_frame 00000000 .debug_frame
00000000 l df *ABS* 00000000 vectors.c
00000000 l df *ABS* 00000000 hooks.c
080095e8 l O .text 00000020 firmwareFilename
08009600 l O .text 00000020 firmwareFilename
20000100 l O .bss 00000228 logfile
00000000 l df *ABS* 00000000 main.c
00000000 l df *ABS* 00000000 usbd_bulk.c
@ -95,7 +95,7 @@ SYMBOL TABLE:
00000000 l df *ABS* 00000000 mmc.c
08001f74 l F .text 0000004e CmdResp2Error
08001fc4 l F .text 00000130 CmdResp1Error
080020f4 l F .text 0000024e SDEnWideBus
080020f4 l F .text 00000266 SDEnWideBus
20000339 l O .bss 00000001 TransferError
200000cc l O .data 00000004 DMAEndOfTransfer
2000033c l O .bss 00000018 SDIO_DataInitStructure
@ -120,38 +120,38 @@ SYMBOL TABLE:
00000000 l df *ABS* 00000000 stm32f4xx_usart.c
00000000 l df *ABS* 00000000 system_stm32f4xx.c
00000000 l df *ABS* 00000000 ff.c
080041b4 l F .text 00000012 mem_cpy
080041c8 l F .text 0000001e ld_clust
080041e8 l F .text 0000001e sum_sfn
08004208 l F .text 00000096 check_fs
080042a0 l F .text 00000076 sync_window
08004318 l F .text 00000032 move_window
0800434c l F .text 00000038 validate
08004384 l F .text 00000394 chk_mounted
08004718 l F .text 0000012c get_fileinfo
08004844 l F .text 000000bc sync_fs
08004a04 l F .text 00000098 dir_sdi
08004bac l F .text 000000cc create_chain
08004c78 l F .text 0000012a dir_next
08004da4 l F .text 000001a2 dir_find
08004f48 l F .text 00000332 follow_path
0800527c l F .text 00000130 dir_read
080053ac l F .text 00000058 dir_remove
08005404 l F .text 0000006e remove_chain
0800550c l F .text 00000236 dir_register
080041cc l F .text 00000012 mem_cpy
080041e0 l F .text 0000001e ld_clust
08004200 l F .text 0000001e sum_sfn
08004220 l F .text 00000096 check_fs
080042b8 l F .text 00000076 sync_window
08004330 l F .text 00000032 move_window
08004364 l F .text 00000038 validate
0800439c l F .text 00000394 chk_mounted
08004730 l F .text 0000012c get_fileinfo
0800485c l F .text 000000bc sync_fs
08004a1c l F .text 00000098 dir_sdi
08004bc4 l F .text 000000cc create_chain
08004c90 l F .text 0000012a dir_next
08004dbc l F .text 000001a2 dir_find
08004f60 l F .text 00000332 follow_path
08005294 l F .text 00000130 dir_read
080053c4 l F .text 00000058 dir_remove
0800541c l F .text 0000006e remove_chain
08005524 l F .text 00000236 dir_register
20000408 l O .bss 00000200 LfnBuf
20000608 l O .bss 00000002 Fsid
08009694 l O .text 00000080 ExCvt
08009714 l O .text 0000000d LfnOfs
080096ac l O .text 00000080 ExCvt
0800972c l O .text 0000000d LfnOfs
2000060c l O .bss 00000004 FatFs
00000000 l df *ABS* 00000000 unicode.c
08009724 l O .text 000001e0 tbl_lower.4259
08009904 l O .text 00000100 Tbl
08009a04 l O .text 000001e0 tbl_upper.4260
0800973c l O .text 000001e0 tbl_lower.4259
0800991c l O .text 00000100 Tbl
08009a1c l O .text 000001e0 tbl_upper.4260
00000000 l df *ABS* 00000000 uip.c
080060e8 l F .text 0000004c chksum
08006134 l F .text 00000042 upper_layer_chksum
080061f8 l F .text 00000030 uip_add_rcv_nxt
08006100 l F .text 0000004c chksum
0800614c l F .text 00000042 upper_layer_chksum
08006210 l F .text 00000030 uip_add_rcv_nxt
20000610 l O .bss 00000002 tmp16
20000612 l O .bss 00000002 ipid
20000614 l O .bss 00000004 iss
@ -159,11 +159,11 @@ SYMBOL TABLE:
20000624 l O .bss 00000001 c
20000625 l O .bss 00000001 opt
00000000 l df *ABS* 00000000 uip_arp.c
08007218 l F .text 00000116 uip_arp_update
08007230 l F .text 00000116 uip_arp_update
20000626 l O .bss 00000001 i
20000627 l O .bss 00000001 tmpage
20000628 l O .bss 00000060 arp_table
08009be4 l O .text 00000006 broadcast_ethaddr
08009bfc l O .text 00000006 broadcast_ethaddr
20000688 l O .bss 00000001 c
20000689 l O .bss 00000001 arptime
2000068c l O .bss 00000004 ipaddr
@ -175,18 +175,18 @@ SYMBOL TABLE:
200006d0 l O .bss 00000004 ARPTimerTimeOut
200006d4 l O .bss 00000004 periodicTimerTimeOut
00000000 l df *ABS* 00000000 xcp.c
08007a70 l F .text 00000016 XcpSetCtoError
08009bec l O .text 00000008 xcpStationId
08007a88 l F .text 00000016 XcpSetCtoError
08009c04 l O .text 00000008 xcpStationId
200006d8 l O .bss 0000004c xcpInfo
00000000 l df *ABS* 00000000 backdoor.c
20000724 l O .bss 00000001 backdoorOpen
20000728 l O .bss 00000004 backdoorOpenTime
00000000 l df *ABS* 00000000 cop.c
00000000 l df *ABS* 00000000 file.c
08007ec8 l F .text 0000002e FileLibByteNibbleToChar
08007ef8 l F .text 00000020 FileLibByteToHexString
08007f18 l F .text 00000046 FileLibLongToIntString
08007f60 l F .text 00000066 FileLibHexStringToByte
08007ee0 l F .text 0000002e FileLibByteNibbleToChar
08007f10 l F .text 00000020 FileLibByteToHexString
08007f30 l F .text 00000046 FileLibLongToIntString
08007f78 l F .text 00000066 FileLibHexStringToByte
2000072c l O .bss 00000040 loggingStr
2000076c l O .bss 00000001 firmwareUpdateState
20000770 l O .bss 00000008 eraseInfo
@ -196,26 +196,26 @@ SYMBOL TABLE:
20000d54 l O .bss 00000004 assert_failure_file
20000d58 l O .bss 00000004 assert_failure_line
00000000 l df *ABS* 00000000 can.c
08009dd8 l O .text 00000024 canTiming
08009df0 l O .text 00000024 canTiming
00000000 l df *ABS* 00000000 cpu.c
00000000 l df *ABS* 00000000 flash.c
080089d0 l F .text 00000044 FlashGetSector
08008a14 l F .text 00000078 FlashWriteBlock
08008a8c l F .text 00000062 FlashSwitchBlock
08008af0 l F .text 00000084 FlashAddToBlock
08009dfc l O .text 00000030 flashSectorNumToMask
08009e2c l O .text 0000006c flashLayout
080089e8 l F .text 00000044 FlashGetSector
08008a2c l F .text 00000078 FlashWriteBlock
08008aa4 l F .text 00000062 FlashSwitchBlock
08008b08 l F .text 00000084 FlashAddToBlock
08009e14 l O .text 00000030 flashSectorNumToMask
08009e44 l O .text 0000006c flashLayout
20000d5c l O .bss 00000204 bootBlockInfo
20000f60 l O .bss 00000204 blockInfo
00000000 l df *ABS* 00000000 uart.c
08008d84 l F .text 00000042 UartTransmitByte
08008dc8 l F .text 0000002c UartReceiveByte
08008d9c l F .text 00000042 UartTransmitByte
08008de0 l F .text 0000002c UartReceiveByte
20001164 l O .bss 00000041 xcpCtoReqPacket.7776
200011a8 l O .bss 00000001 xcpCtoRxLength.7777
200011a9 l O .bss 00000001 xcpCtoRxInProgress.7778
00000000 l df *ABS* 00000000 usb.c
08008f44 l F .text 0000007c UsbFifoMgrWrite
08008fc0 l F .text 00000076 UsbFifoMgrRead
08008f5c l F .text 0000007c UsbFifoMgrWrite
08008fd8 l F .text 00000076 UsbFifoMgrRead
200011ac l O .bss 00000040 xcpCtoReqPacket.8947
200011ec l O .bss 00000004 fifoCtrlFree
200011f0 l O .bss 00000030 fifoCtrl
@ -229,297 +229,297 @@ SYMBOL TABLE:
00000000 l df *ABS* 00000000 timer.c
200018e4 l O .bss 00000004 millisecond_counter
00000000 l df *ABS* 00000000 cstart.c
08009482 l F .text 00000000 zero_loop
0800949a l F .text 00000000 zero_loop
00000000 l df *ABS* 00000000 memcpy-stub.c
00000000 l df *ABS* 00000000 memset.c
00000000 l df *ABS* 00000000 ctype_.c
00000000 l df *ABS* 00000000
00000800 l *ABS* 00000000 __STACKSIZE__
080076c0 g F .text 00000030 ComInit
08008b90 g F .text 00000050 FlashWrite
080076d8 g F .text 00000030 ComInit
08008ba8 g F .text 00000050 FlashWrite
2000006c g O .data 00000012 USBD_DeviceDesc
080004e4 g F .text 0000001e USBD_USR_ProductStrDescriptor
08005fbc g F .text 0000004e f_gets
08005fd4 g F .text 0000004e f_gets
08001780 g F .text 00000010 USB_OTG_ReadDevOutEP_itr
08003a30 g F .text 0000002c FLASH_Unlock
08003a48 g F .text 0000002c FLASH_Unlock
08000684 g F .text 00000010 USB_OTG_BSP_mDelay
080005a0 g F .text 0000000a USBD_USR_DeviceConnected
080036b0 g F .text 00000012 ETH_FlushTransmitFIFO
080086c4 g F .text 0000001c AssertFailure
08004918 g F .text 000000ea get_fat
080088f0 g F .text 00000088 CanReceivePacket
080036c8 g F .text 00000012 ETH_FlushTransmitFIFO
080086dc g F .text 0000001c AssertFailure
08004930 g F .text 000000ea get_fat
08008908 g F .text 00000088 CanReceivePacket
2000009c g O .data 00000004 USBD_DCD_INT_fops
08009440 g F .text 00000058 reset_handler
08003c54 g F .text 00000028 GPIO_PinAFConfig
08009458 g F .text 00000058 reset_handler
08003c6c g F .text 00000028 GPIO_PinAFConfig
080017e0 g F .text 0000009a DCD_Init
080093f4 g F .text 00000022 TimerUpdate
08007ab8 g F .text 00000010 XcpPacketTransmitted
0800940c g F .text 00000022 TimerUpdate
08007ad0 g F .text 00000010 XcpPacketTransmitted
080004b8 g F .text 0000000a usbd_bulk_get_rx_buffer_ptr
08003204 g F .text 0000009e ETH_StructInit
080076f0 g F .text 000000a4 ComTask
08003f64 g F .text 0000000c SDIO_ClearFlag
0800302c g F .text 00000018 SD_GetStatus
08003b78 g F .text 0000003e FLASH_ProgramWord
08003e88 g F .text 0000000c SDIO_SetPowerState
0800337c g F .text 000002be ETH_Init
0800321c g F .text 0000009e ETH_StructInit
08007708 g F .text 000000a4 ComTask
08003f7c g F .text 0000000c SDIO_ClearFlag
08003044 g F .text 00000018 SD_GetStatus
08003b90 g F .text 0000003e FLASH_ProgramWord
08003ea0 g F .text 0000000c SDIO_SetPowerState
08003394 g F .text 000002be ETH_Init
080011c8 g F .text 00000046 USB_OTG_FlushRxFifo
20002790 g O .bss 00000002 uip_len
2000061c g O .bss 00000006 uip_ethaddr
08006178 g F .text 0000007e uip_add32
0800768c g F .text 0000001c BootInit
08006190 g F .text 0000007e uip_add32
080076a4 g F .text 0000001c BootInit
080018d0 g F .text 00000032 DCD_EP_Close
0800808c g F .text 00000038 FileSrecVerifyChecksum
080080a4 g F .text 00000038 FileSrecVerifyChecksum
0800187c g F .text 00000054 DCD_EP_Open
20001928 g O .bss 00000004 SET_TEST_MODE
08007e9c g F .text 00000022 BackDoorInit
08007eb4 g F .text 00000022 BackDoorInit
08000a28 g F .text 00000354 USBD_StdDevReq
08000564 g F .text 0000001e USBD_USR_InterfaceStrDescriptor
08003de8 g F .text 00000024 RCC_AHB1PeriphResetCmd
08004088 g F .text 0000000c USART_GetFlagStatus
08007ec4 g F .text 00000002 CopService
0800a010 g .text 00000000 _etext
08003e00 g F .text 00000024 RCC_AHB1PeriphResetCmd
080040a0 g F .text 0000000c USART_GetFlagStatus
08007edc g F .text 00000002 CopService
0800a028 g .text 00000000 _etext
20000330 g O .bss 00000004 USBD_ep_status
08002e18 g F .text 0000019a SD_WriteBlock
08002e30 g F .text 0000019a SD_WriteBlock
20000080 g O .data 0000001c USR_cb
080060b8 g F .text 0000002e ff_wtoupper
080060d0 g F .text 0000002e ff_wtoupper
08001a00 g F .text 00000014 DCD_DevDisconnect
08003980 g F .text 00000050 netdev_read
080062c0 g F .text 00000f1e uip_process
08008d78 g F .text 0000000a FlashGetUserProgBaseAddress
08003998 g F .text 00000050 netdev_read
080062d8 g F .text 00000f1e uip_process
08008d90 g F .text 0000000a FlashGetUserProgBaseAddress
08000590 g F .text 00000008 USBD_USR_DeviceSuspended
080031ec g F .text 00000018 ETH_DeInit
080094a0 g F .text 000000a6 memcpy
08008244 g F .text 00000480 FileTask
08003204 g F .text 00000018 ETH_DeInit
080094b8 g F .text 000000a6 memcpy
0800825c g F .text 00000480 FileTask
08000db4 g F .text 00000138 USBD_StdEPReq
080093e4 g F .text 0000000e TimerReset
08003044 g F .text 00000038 disk_initialize
080093fc g F .text 0000000e TimerReset
0800305c g F .text 00000038 disk_initialize
20002794 g O .bss 00000004 uip_sappdata
08000190 g F .text 00000002 UsbLeaveLowPowerModeHook
08003734 g F .text 00000226 netdev_init
0800374c g F .text 00000226 netdev_init
08000988 g F .text 0000001e USBD_CtlSendStatus
20002798 g O .bss 00000004 uip_acc32
08000d7c g F .text 00000036 USBD_StdItfReq
08006228 g F .text 00000024 uip_ipchksum
08002794 g F .text 000002b6 SD_GetCardInfo
08003f50 g F .text 00000014 SDIO_GetFlagStatus
08006240 g F .text 00000024 uip_ipchksum
080027ac g F .text 000002b6 SD_GetCardInfo
08003f68 g F .text 00000014 SDIO_GetFlagStatus
080009c8 g F .text 00000044 USBD_ParseSetupRequest
08004080 g F .text 00000008 USART_ReceiveData
080076a8 g F .text 00000018 BootTask
08004098 g F .text 00000008 USART_ReceiveData
080076c0 g F .text 00000018 BootTask
08001a14 g F .text 0000055e USBD_OTG_ISR_Handler
08003000 g F .text 0000002c SD_GetState
08008c6c g F .text 00000058 FlashWriteChecksum
08002a4c g F .text 00000084 SD_EnableWideBusOperation
08003dc4 g F .text 00000024 RCC_APB2PeriphClockCmd
08003ed4 g F .text 0000000e SDIO_GetCommandResponse
08003018 g F .text 0000002c SD_GetState
08008c84 g F .text 00000058 FlashWriteChecksum
08002a64 g F .text 00000084 SD_EnableWideBusOperation
08003ddc g F .text 00000024 RCC_APB2PeriphClockCmd
08003eec g F .text 0000000e SDIO_GetCommandResponse
08001000 g F .text 000000c8 USB_OTG_SelectCore
0800779c g F .text 00000060 ComTransmitPacket
08003bb8 g F .text 00000090 GPIO_Init
0800307c g F .text 00000032 disk_status
080080c4 g F .text 0000017e FileSrecParseLine
080077b4 g F .text 00000060 ComTransmitPacket
08003bd0 g F .text 00000090 GPIO_Init
08003094 g F .text 00000032 disk_status
080080dc g F .text 0000017e FileSrecParseLine
08001210 g F .text 0000002a USB_OTG_SetCurrentMode
0800628c g F .text 00000032 uip_listen
0800405c g F .text 0000001c USART_Cmd
080039d0 g F .text 00000060 netdev_send
080062a4 g F .text 00000032 uip_listen
08004074 g F .text 0000001c USART_Cmd
080039e8 g F .text 00000060 netdev_send
0800124c g F .text 0000000a USB_OTG_ReadCoreItr
08000588 g F .text 00000002 USBD_USR_DeviceReset
0800092c g F .text 0000000e USBD_ClrCfg
08003180 g F .text 00000062 disk_ioctl
08003198 g F .text 00000062 disk_ioctl
080008e0 g F .text 00000034 USBD_Init
08008008 g F .text 00000036 FileHandleFirmwareUpdateRequest
08008020 g F .text 00000036 FileHandleFirmwareUpdateRequest
20000020 g O .data 0000002c USBD_bulk_cb
08003da0 g F .text 00000024 RCC_APB1PeriphClockCmd
08005474 g F .text 00000098 gen_numname
08003db8 g F .text 00000024 RCC_APB1PeriphClockCmd
0800548c g F .text 00000098 gen_numname
2000279c g O .bss 00000001 uip_flags
08000974 g F .text 00000012 USBD_CtlContinueRx
20001a80 g O .bss 00000010 EnetDmaRx
08003d7c g F .text 00000024 RCC_AHB2PeriphClockCmd
08003d94 g F .text 00000024 RCC_AHB2PeriphClockCmd
0800022c g F .text 00000042 FileFirmwareUpdateCompletedHook
08007aa4 g F .text 00000012 XcpIsConnected
08005f00 g F .text 000000bc f_unlink
08007abc g F .text 00000012 XcpIsConnected
08005f18 g F .text 000000bc f_unlink
0800018c g F .text 00000002 UsbEnterLowPowerModeHook
0800363c g F .text 00000026 ETH_MACTransmissionCmd
08009388 g F .text 00000008 NvmInit
08008b74 g F .text 0000001a FlashInit
08003a5c g F .text 00000012 FLASH_Lock
08003654 g F .text 00000026 ETH_MACTransmissionCmd
080093a0 g F .text 00000008 NvmInit
08008b8c g F .text 0000001a FlashInit
08003a74 g F .text 00000012 FLASH_Lock
20002e64 g .bss 00000000 _ebss
0800600c g F .text 00000034 f_putc
08006024 g F .text 00000034 f_putc
08001790 g F .text 0000000c USB_OTG_ReadDevAllInEPItr
08001714 g F .text 00000034 USB_OTG_EPSetStall
08006040 g F .text 0000002c f_puts
08006058 g F .text 0000002c f_puts
08000504 g F .text 0000001e USBD_USR_ManufacturerStrDescriptor
0800942c g F .text 00000012 UnusedISR
08009444 g F .text 00000012 UnusedISR
08000598 g F .text 00000008 USBD_USR_DeviceResumed
08003e7c g F .text 0000000c SDIO_ClockCmd
08007794 g F .text 00000008 ComFree
08003f00 g F .text 00000030 SDIO_DataConfig
08003e94 g F .text 0000000c SDIO_ClockCmd
080077ac g F .text 00000008 ComFree
08003f18 g F .text 00000030 SDIO_DataConfig
080005b8 g F .text 000000ae USB_OTG_BSP_Init
08000524 g F .text 0000001e USBD_USR_SerialStrDescriptor
0800368c g F .text 00000012 ETH_SoftwareReset
08003314 g F .text 00000068 ETH_WritePHYRegister
080036a4 g F .text 00000012 ETH_SoftwareReset
0800332c g F .text 00000068 ETH_WritePHYRegister
080015f0 g F .text 00000122 USB_OTG_EP0StartXfer
080009a8 g F .text 0000001e USBD_CtlReceiveStatus
08008df4 g F .text 0000003e UartInit
08008e0c g F .text 0000003e UartInit
0800066c g F .text 00000018 USB_OTG_BSP_uDelay
08001258 g F .text 0000000c USB_OTG_InitDevSpeed
080014c0 g F .text 0000012e USB_OTG_EPStartXfer
0800931c g F .text 0000006c UsbReceivePipeBulkOUT
08003c7c g F .text 000000da RCC_GetClocksFreq
08009398 g F .text 00000008 NvmErase
08009334 g F .text 0000006c UsbReceivePipeBulkOUT
08003c94 g F .text 000000da RCC_GetClocksFreq
080093b0 g F .text 00000008 NvmErase
08000194 g F .text 00000018 CpuUserProgramStartHook
08000a0c g F .text 0000001a USBD_CtlError
0800395c g F .text 00000022 netdev_init_mac
08003f7c g F .text 000000de USART_Init
08003974 g F .text 00000022 netdev_init_mac
08003f94 g F .text 000000de USART_Init
080019b0 g F .text 00000040 DCD_EP_ClrStall
20000100 g .bss 00000000 _bss
08005d08 g F .text 00000014 f_close
08005d20 g F .text 00000014 f_close
0800058c g F .text 00000002 USBD_USR_DeviceConfigured
08003a7c g F .text 00000054 FLASH_GetStatus
08007ac8 g F .text 00000384 XcpPacketReceived
0800624c g F .text 0000000a uip_tcpchksum
08003a70 g F .text 0000000c FLASH_ClearFlag
08003ad0 g F .text 00000038 FLASH_WaitForLastOperation
080036ec g F .text 00000026 ETH_DMAReceptionCmd
08003a94 g F .text 00000054 FLASH_GetStatus
08007ae0 g F .text 00000384 XcpPacketReceived
08006264 g F .text 0000000a uip_tcpchksum
08003a88 g F .text 0000000c FLASH_ClearFlag
08003ae8 g F .text 00000038 FLASH_WaitForLastOperation
08003704 g F .text 00000026 ETH_DMAReceptionCmd
08000584 g F .text 00000002 USBD_USR_Init
080058dc g F .text 000001a8 f_read
08008d2c g F .text 0000004c FlashDone
080058f4 g F .text 000001a8 f_read
08008d44 g F .text 0000004c FlashDone
08001774 g F .text 0000000c USB_OTG_ReadDevAllOutEp_itr
08002afc g F .text 00000172 SD_Init
08002b14 g F .text 00000172 SD_Init
0800123c g F .text 00000010 USB_OTG_IsDeviceMode
08000fac g F .text 0000002a USB_OTG_WritePacket
200027a0 g O .bss 00000004 uip_appdata
08001970 g F .text 00000040 DCD_EP_Stall
200027a4 g O .bss 00000004 uip_conn
080036a0 g F .text 00000010 ETH_GetSoftwareResetStatus
080036b8 g F .text 00000010 ETH_GetSoftwareResetStatus
08001748 g F .text 0000002a USB_OTG_EPClearStall
200018e8 g O .bss 00000040 USB_Rx_Buffer
08009128 g F .text 0000007a UsbTransmitPacket
08002ad0 g F .text 0000002c SD_SelectDeselect
08008848 g F .text 000000a8 CanTransmitPacket
08009140 g F .text 0000007a UsbTransmitPacket
08002ae8 g F .text 0000002c SD_SelectDeselect
08008860 g F .text 000000a8 CanTransmitPacket
08000188 g F .text 00000002 UsbConnectHook
08003ea4 g F .text 00000030 SDIO_SendCommand
080032a4 g F .text 0000006e ETH_ReadPHYRegister
08003ebc g F .text 00000030 SDIO_SendCommand
080032bc g F .text 0000006e ETH_ReadPHYRegister
200027a8 g O .bss 00000068 uip_conns
08001904 g F .text 00000038 DCD_EP_PrepareRx
08001420 g F .text 0000005c USB_OTG_EPActivate
080031e4 g F .text 00000008 get_fattime
08007a88 g F .text 0000001c XcpInit
080031fc g F .text 00000008 get_fattime
08007aa0 g F .text 0000001c XcpInit
08000914 g F .text 00000018 USBD_SetCfg
08007fc8 g F .text 0000002c FileInit
08003f30 g F .text 0000000e SDIO_ReadData
08009038 g F .text 000000d8 UsbInit
080074bc g F .text 000001d0 uip_arp_out
08009110 g F .text 00000016 UsbFree
08008be0 g F .text 0000008a FlashErase
08007fe0 g F .text 0000002c FileInit
08003f48 g F .text 0000000e SDIO_ReadData
08009050 g F .text 000000d8 UsbInit
080074d4 g F .text 000001d0 uip_arp_out
08009128 g F .text 00000016 UsbFree
08008bf8 g F .text 0000008a FlashErase
080004c4 g F .text 0000000e USBD_USR_DeviceDescriptor
08009548 g F .text 0000009e memset
08009560 g F .text 0000009e memset
08000270 g F .text 00000020 FileFirmwareUpdateErrorHook
080002f0 g F .text 000000dc main
08003b08 g F .text 0000006e FLASH_EraseSector
08005c5c g F .text 000000ac f_sync
08002fb4 g F .text 0000004c SD_SendStatus
08003b20 g F .text 0000006e FLASH_EraseSector
08005c74 g F .text 000000ac f_sync
08002fcc g F .text 0000004c SD_SendStatus
080012b4 g F .text 0000011e USB_OTG_CoreInitDev
08001178 g F .text 0000004e USB_OTG_FlushTxFifo
08008040 g F .text 0000004c FileSrecGetLineType
080093a8 g F .text 00000012 NvmDone
08005744 g F .text 0000002a f_mount
08008e34 g F .text 00000066 UartTransmitPacket
080093a0 g F .text 00000008 NvmVerifyChecksum
080089b0 g F .text 0000001e CpuMemCopy
08003ee4 g F .text 0000001a SDIO_GetResponse
08008058 g F .text 0000004c FileSrecGetLineType
080093c0 g F .text 00000012 NvmDone
0800575c g F .text 0000002a f_mount
08008e4c g F .text 00000066 UartTransmitPacket
080093b8 g F .text 00000008 NvmVerifyChecksum
080089c8 g F .text 0000001e CpuMemCopy
08003efc g F .text 0000001a SDIO_GetResponse
20000068 g O .data 00000004 USBD_LangIDDesc
08001168 g F .text 0000000e USB_OTG_DisableGlobalInt
0800179c g F .text 00000042 USB_OTG_EP0_OutStart
080010c8 g F .text 00000090 USB_OTG_CoreInit
2000032c g O .bss 00000004 USBD_cfg_status
08004094 g F .text 00000120 SystemInit
080040ac g F .text 00000120 SystemInit
20000334 g O .bss 00000004 USBD_default_cfg
08004a9c g F .text 0000010e put_fat
08004ab4 g F .text 0000010e put_fat
0800193c g F .text 00000034 DCD_EP_Tx
08005d1c g F .text 00000198 f_lseek
08003f70 g F .text 0000000a SYSCFG_ETH_MediaInterfaceConfig
08007388 g F .text 00000134 uip_arp_arpin
08007818 g F .text 0000001c ComGetActiveInterfaceMaxTxLen
08008e9c g F .text 000000a8 UartReceivePacket
08005d34 g F .text 00000198 f_lseek
08003f88 g F .text 0000000a SYSCFG_ETH_MediaInterfaceConfig
080073a0 g F .text 00000134 uip_arp_arpin
08007830 g F .text 0000001c ComGetActiveInterfaceMaxTxLen
08008eb4 g F .text 000000a8 UartReceivePacket
080001f0 g F .text 0000000a FileGetFirmwareFilenameHook
080005ac g F .text 0000000a USBD_USR_DeviceDisconnected
08000668 g F .text 00000002 USB_OTG_BSP_EnableInterrupt
08002c70 g F .text 000001a6 SD_ReadBlock
08007330 g F .text 00000058 uip_arp_timer
08002c88 g F .text 000001a6 SD_ReadBlock
08007348 g F .text 00000058 uip_arp_timer
08000960 g F .text 00000012 USBD_CtlContinueSendData
20002810 g O .bss 00000002 uip_listenports
20002814 g O .bss 00000004 uip_draddr
080004d4 g F .text 0000000e USBD_USR_LangIDStrDescriptor
080013d4 g F .text 00000020 USB_OTG_GetDeviceSpeed
20000000 g .data 00000000 _data
08003714 g F .text 00000020 ETH_Start
0800372c g F .text 00000020 ETH_Start
20001a90 g O .bss 00000640 RxBuff
08005eb4 g F .text 0000004a f_stat
08007ec0 g F .text 00000002 CopInit
08002344 g F .text 0000002c SD_Detect
080086e0 g F .text 00000168 CanInit
08009390 g F .text 00000008 NvmWrite
08008978 g F .text 00000036 CpuStartUserProgram
08005ecc g F .text 0000004a f_stat
08007ed8 g F .text 00000002 CopInit
0800235c g F .text 0000002c SD_Detect
080086f8 g F .text 00000168 CanInit
080093a8 g F .text 00000008 NvmWrite
08008990 g F .text 00000036 CpuStartUserProgram
08000eec g F .text 0000004c USBD_GetString
08004900 g F .text 00000016 clust2sect
08004918 g F .text 00000016 clust2sect
20003664 g .bss 00000000 _estack
08004078 g F .text 00000008 USART_SendData
080091a4 g F .text 000000c8 UsbReceivePacket
08008cc4 g F .text 00000068 FlashVerifyChecksum
080078b0 g F .text 00000044 NetTransmitPacket
08004090 g F .text 00000008 USART_SendData
080091bc g F .text 000000c8 UsbReceivePacket
08008cdc g F .text 00000068 FlashVerifyChecksum
080078c8 g F .text 00000044 NetTransmitPacket
200000ec g .data 00000000 _edata
08007ff4 g F .text 00000014 FileIsIdle
080071e0 g F .text 0000000a htons
08005a84 g F .text 000001d8 f_write
0800800c g F .text 00000014 FileIsIdle
080071f8 g F .text 0000000a htons
08005a9c g F .text 000001d8 f_write
08001264 g F .text 00000050 USB_OTG_EnableDevInt
08000000 g O .text 00000188 _vectab
08000544 g F .text 0000001e USBD_USR_ConfigStrDescriptor
08005770 g F .text 0000016a f_open
08003114 g F .text 0000006c disk_write
08003664 g F .text 00000026 ETH_MACReceptionCmd
08005788 g F .text 0000016a f_open
0800312c g F .text 0000006c disk_write
0800367c g F .text 00000026 ETH_MACReceptionCmd
0800093c g F .text 00000022 USBD_CtlSendData
08000290 g F .text 00000060 FileFirmwareUpdateLogHook
200020d0 g O .bss 00000640 TxBuff
200000e8 g O .data 00000004 __ctype_ptr__
08007834 g F .text 00000008 ComIsConnected
0800784c g F .text 00000008 ComIsConnected
080013f4 g F .text 0000002a USB_OTG_EP0Activate
08000fd8 g F .text 00000026 USB_OTG_ReadPacket
08009f0c g O .text 00000101 _ctype_
080036c4 g F .text 00000026 ETH_DMATransmissionCmd
08003e48 g F .text 00000034 SDIO_Init
08009f24 g O .text 00000101 _ctype_
080036dc g F .text 00000026 ETH_DMATransmissionCmd
08003e60 g F .text 00000034 SDIO_Init
080001ac g F .text 00000044 FileIsFirmwareUpdateRequestedHook
080019f0 g F .text 00000010 DCD_EP_SetAddress
08006258 g F .text 00000032 uip_init
08002370 g F .text 0000027e SD_PowerON
08006270 g F .text 00000032 uip_init
08002388 g F .text 0000027e SD_PowerON
2000192c g O .bss 000000ff USBD_StrDesc
080077fc g F .text 0000001c ComGetActiveInterfaceMaxRxLen
08003d58 g F .text 00000024 RCC_AHB1PeriphClockCmd
080078f4 g F .text 0000010a NetReceivePacket
080030b0 g F .text 00000064 disk_read
08007e4c g F .text 0000004e BackDoorCheck
08007814 g F .text 0000001c ComGetActiveInterfaceMaxRxLen
08003d70 g F .text 00000024 RCC_AHB1PeriphClockCmd
0800790c g F .text 0000010a NetReceivePacket
080030c8 g F .text 00000064 disk_read
08007e64 g F .text 0000004e BackDoorCheck
20002e64 g .bss 00000000 _stack
08003e0c g F .text 00000024 RCC_APB2PeriphResetCmd
08003e24 g F .text 00000024 RCC_APB2PeriphResetCmd
20002818 g O .bss 00000004 uip_netmask
20000000 g O .data 00000020 usbd_bulk_CfgDesc
2000281c g O .bss 00000004 uip_hostaddr
0800606c g F .text 0000004a ff_convert
08009418 g F .text 00000012 TimerGet
08003e94 g F .text 00000010 SDIO_GetPowerState
0800926c g F .text 000000ae UsbTransmitPipeBulkIN
08006084 g F .text 0000004a ff_convert
08009430 g F .text 00000012 TimerGet
08003eac g F .text 00000010 SDIO_GetPowerState
08009284 g F .text 000000ae UsbTransmitPipeBulkIN
20002780 g O .bss 00000010 EnetDmaTx
08007a00 g F .text 00000070 NetApp
08007a18 g F .text 00000070 NetApp
2000004c g O .data 0000001c USR_desc
0800783c g F .text 00000074 NetInit
08007854 g F .text 00000074 NetInit
0800147c g F .text 00000042 USB_OTG_EPDeactivate
080025f0 g F .text 000001a4 SD_InitializeCards
08003c48 g F .text 0000000c GPIO_ReadInputDataBit
080093bc g F .text 00000028 TimerInit
08003f40 g F .text 0000000e SDIO_WriteData
08002608 g F .text 000001a4 SD_InitializeCards
08003c60 g F .text 0000000c GPIO_ReadInputDataBit
080093d4 g F .text 00000028 TimerInit
08003f58 g F .text 0000000e SDIO_WriteData
20002820 g O .bss 00000642 uip_buf
200000a0 g O .data 0000002c USBD_DCD_INT_cb
080071ec g F .text 0000002a uip_send
08007204 g F .text 0000002a uip_send
20002e62 g O .bss 00000002 uip_slen
080001fc g F .text 00000030 FileFirmwareUpdateStartedHook
08001158 g F .text 0000000e USB_OTG_EnableGlobalInt
08003e30 g F .text 00000018 SDIO_DeInit
08003e48 g F .text 00000018 SDIO_DeInit

View File

@ -2812,6 +2812,7 @@ static SD_Error FindSCR(uint16_t rca, uint32_t *pscr)
uint32_t index = 0;
SD_Error errorstatus = SD_OK;
uint32_t tempscr[2] = {0, 0};
uint32_t timeout = 0;
/*!< Set Block Size To 8 Bytes */
/*!< Send CMD55 APP_CMD with argument as card's RCA */
@ -2873,6 +2874,13 @@ static SD_Error FindSCR(uint16_t rca, uint32_t *pscr)
{
*(tempscr + index) = SDIO_ReadData();
index++;
}
timeout++;
if (timeout > 10000)
{
return SD_DATA_TIMEOUT;
}
}
@ -3139,12 +3147,15 @@ void SD_SDIO_DMA_IRQHANDLER(void)
DSTATUS disk_initialize (BYTE drv)
{
SD_Error result = SD_Init();
if (result == SD_OK) {
if (result == SD_OK)
{
SD_CardInfo card;
Stat &= ~STA_NOINIT; /* Clear STA_NOINIT */
SD_GetCardInfo(&card);
SD_GetCardInfo (&card);
return RES_OK;
} else {
}
else
{
Stat = STA_NOINIT; /* Set STA_NOINIT */
return RES_NOTRDY;
}
@ -3366,9 +3377,13 @@ DRESULT disk_ioctl(BYTE drv, BYTE ctrl, void *buff)
res = RES_ERROR;
if (Stat & STA_NOINIT) return RES_NOTRDY;
if (Stat & STA_NOINIT)
{
return RES_NOTRDY;
}
switch (ctrl) {
switch (ctrl)
{
case CTRL_SYNC : /* Make sure that no pending write process */
res = RES_OK;
break;
@ -3389,7 +3404,9 @@ DRESULT disk_ioctl(BYTE drv, BYTE ctrl, void *buff)
case GET_BLOCK_SIZE : /* Get erase block size in unit of sector (DWORD) */
if(drv == 0)
*(DWORD*)buff = 32;
{
* (DWORD*)buff = 32;
}
res = RES_OK;
break;

View File

@ -30,7 +30,7 @@
<Windows>
<Wnd2>
<Wnd0>
<Tabs>
<Tab>
<Identity>TabID-10231-8055</Identity>
@ -42,7 +42,7 @@
</Tab>
</Tabs>
<SelectedTab>0</SelectedTab></Wnd2><Wnd3><Tabs><Tab><Identity>TabID-19870-1384</Identity><TabName>Build</TabName><Factory>Build</Factory><Session/></Tab><Tab><Identity>TabID-11216-22197</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab><Tab><Identity>TabID-16597-313</Identity><TabName>Find All Declarations</TabName><Factory>Find-All-Declarations</Factory><Session/></Tab><Tab><Identity>TabID-7799-665</Identity><TabName>Ambiguous Definitions</TabName><Factory>Select-Ambiguous-Definitions</Factory><Session/></Tab><Tab><Identity>TabID-26870-1945</Identity><TabName>Find in Files</TabName><Factory>Find-in-Files</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd3></Windows>
<SelectedTab>0</SelectedTab></Wnd0><Wnd1><Tabs><Tab><Identity>TabID-19870-1384</Identity><TabName>Build</TabName><Factory>Build</Factory><Session/></Tab><Tab><Identity>TabID-11216-22197</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab><Tab><Identity>TabID-16597-313</Identity><TabName>Find All Declarations</TabName><Factory>Find-All-Declarations</Factory><Session/></Tab><Tab><Identity>TabID-7799-665</Identity><TabName>Ambiguous Definitions</TabName><Factory>Select-Ambiguous-Definitions</Factory><Session/></Tab><Tab><Identity>TabID-26870-1945</Identity><TabName>Find in Files</TabName><Factory>Find-in-Files</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd1></Windows>
<Editor>
@ -55,7 +55,7 @@
<Top><Row0><Sizes><Toolbar-02b8e9c8><key>iaridepm.enu1</key></Toolbar-02b8e9c8></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>963</Bottom><Right>413</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>104167</sizeHorzCX><sizeHorzCY>198413</sizeHorzCY><sizeVertCX>216146</sizeVertCX><sizeVertCY>957341</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>963</Bottom><Right>413</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>104167</sizeHorzCX><sizeHorzCY>198413</sizeHorzCY><sizeVertCX>216146</sizeVertCX><sizeVertCY>957341</sizeVertCY></Rect></Wnd3></Sizes></Row0></Right><Bottom><Row0><Sizes/></Row0></Bottom><Float><Sizes/></Float></Positions>
<Top><Row0><Sizes><Toolbar-015b9e68><key>iaridepm.enu1</key></Toolbar-015b9e68></Sizes></Row0></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>963</Bottom><Right>413</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>104167</sizeHorzCX><sizeHorzCY>198413</sizeHorzCY><sizeVertCX>216146</sizeVertCX><sizeVertCY>957341</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>963</Bottom><Right>413</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>104167</sizeHorzCX><sizeHorzCY>198413</sizeHorzCY><sizeVertCX>216146</sizeVertCX><sizeVertCY>957341</sizeVertCY></Rect></Wnd1></Sizes></Row0></Right><Bottom><Row0><Sizes/></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Workspace>

View File

@ -2812,6 +2812,7 @@ static SD_Error FindSCR(uint16_t rca, uint32_t *pscr)
uint32_t index = 0;
SD_Error errorstatus = SD_OK;
uint32_t tempscr[2] = {0, 0};
uint32_t timeout = 0;
/*!< Set Block Size To 8 Bytes */
/*!< Send CMD55 APP_CMD with argument as card's RCA */
@ -2873,7 +2874,14 @@ static SD_Error FindSCR(uint16_t rca, uint32_t *pscr)
{
*(tempscr + index) = SDIO_ReadData();
index++;
}
}
timeout++;
if (timeout > 10000)
{
return SD_DATA_TIMEOUT;
}
}
if (SDIO_GetFlagStatus(SDIO_FLAG_DTIMEOUT) != RESET)
@ -3139,12 +3147,15 @@ void SD_SDIO_DMA_IRQHANDLER(void)
DSTATUS disk_initialize (BYTE drv)
{
SD_Error result = SD_Init();
if (result == SD_OK) {
if (result == SD_OK)
{
SD_CardInfo card;
Stat &= ~STA_NOINIT; /* Clear STA_NOINIT */
SD_GetCardInfo(&card);
SD_GetCardInfo (&card);
return RES_OK;
} else {
}
else
{
Stat = STA_NOINIT; /* Set STA_NOINIT */
return RES_NOTRDY;
}
@ -3366,9 +3377,13 @@ DRESULT disk_ioctl(BYTE drv, BYTE ctrl, void *buff)
res = RES_ERROR;
if (Stat & STA_NOINIT) return RES_NOTRDY;
if (Stat & STA_NOINIT)
{
return RES_NOTRDY;
}
switch (ctrl) {
switch (ctrl)
{
case CTRL_SYNC : /* Make sure that no pending write process */
res = RES_OK;
break;
@ -3389,7 +3404,9 @@ DRESULT disk_ioctl(BYTE drv, BYTE ctrl, void *buff)
case GET_BLOCK_SIZE : /* Get erase block size in unit of sector (DWORD) */
if(drv == 0)
*(DWORD*)buff = 32;
{
* (DWORD*)buff = 32;
}
res = RES_OK;
break;