操作方法:
1. 更新PB. 更新补丁放在//10.1.10.250/software/WinCE50 Update/WinCEPB50-071231-Product-Update-Rollup-Armv4I.msi
2. 在platform->setting->environment 中设置IMGSDBUS2 = 1
之所以要设置这个环境变量是因为sdbus2.dll 才支持大容量的SD的。
在common.bib中
#if defined IMGSDBUS2
; @CESYSGEN IF CE_MODULES_SDBUS2
sdbus.dll $(_FLATRELEASEDIR)/sdbus2.dll NK SH
; @CESYSGEN ENDIF CE_MODULES_SDBUS2
#else
; @CESYSGEN IF CE_MODULES_SDBUS
sdbus.dll $(_FLATRELEASEDIR)/sdbus.dll NK SH
; @CESYSGEN ENDIF CE_MODULES_SDBUS
#endif
3. 修改BSP下的代码
(1)SendCommand(UINT16 Cmd, UINT32 Arg, UINT16 respType, BOOL bDataTransfer)函数里在case ResponseR6:下面加case ResponseR7:
case ResponseR1:
case ResponseR1b:
case ResponseR7: // add by wogo at 2009.05.06添加的地方
//--- SHORT RESPONSE (48 bits total)---
// Format: { START_BIT(1) | TRANSMISSION_BIT(1) | COMMAND_INDEX(6) | CARD_STATUS(32) | CRC7(7) | END_BIT(1) }
// NOTE: START_BIT and TRANSMISSION_BIT = 0, END_BIT = 1
//
*(respBuff ) = (BYTE)(START_BIT | TRANSMISSION_BIT | pRequest->CommandCode);
*(respBuff + 1) = (BYTE)(vm_pSDIReg->SDIRSP0 );
*(respBuff + 2) = (BYTE)(vm_pSDIReg->SDIRSP0 >> 8 );
*(respBuff + 3) = (BYTE)(vm_pSDIReg->SDIRSP0 >> 16);
*(respBuff + 4) = (BYTE)(vm_pSDIReg->SDIRSP0 >> 24);
*(respBuff + 5) = (BYTE)(END_RESERVED | END_BIT);
break;
(2)函数GetCommandResponse(PSD_BUS_REQUEST pRequest)中加在case ResponseR1b:下面
case ResponseR1:
case ResponseR1b:
case ResponseR7: //------------------------添加的地方
//--- SHORT RESPONSE (48 bits total)---
// Format: { START_BIT(1) | TRANSMISSION_BIT(1) | COMMAND_INDEX(6) | CARD_STATUS(32) | CRC7(7) | END_BIT(1) }
// NOTE: START_BIT and TRANSMISSION_BIT = 0, END_BIT = 1
//
*(respBuff ) = (BYTE)(START_BIT | TRANSMISSION_BIT | pRequest->CommandCode);
*(respBuff + 1) = (BYTE)(vm_pSDIReg->SDIRSP0 );
*(respBuff + 2) = (BYTE)(vm_pSDIReg->SDIRSP0 >> 8 );
*(respBuff + 3) = (BYTE)(vm_pSDIReg->SDIRSP0 >> 16);
*(respBuff + 4) = (BYTE)(vm_pSDIReg->SDIRSP0 >> 24);
*(respBuff + 5) = (BYTE)(END_RESERVED | END_BIT);
break;
主要是要添加对cmd7的支持。
然后重新sysgen个工程即可。
==================================完毕!=================================
4. 重新sysgen platform。
补充:对于2410 支持大容量SD问题也是类似 如果是4.2BSP就要修改中断申请等问题了。4.2BSP支持大容量的SD卡办法请参考这里
http://topic.csdn.net/u/20080911/16/111A849C-FD1F-4955-840D-6DDFBA8EE1FA.html
http://topic.csdn.net/u/20081104/13/5024B712-07F4-4B33-A015-F2D5BAAFA027.html
http://topic.csdn.net/u/20081021/10/52df6b8b-c69b-4e7b-a278-0816e133f881.html?seed=508798215
http://topic.csdn.net/u/20080916/16/00D9A2BE-E4F8-4BEA-B892-F25E20AC4C83.html
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/gooogleman/archive/2009/05/07/4154020.aspx