2440支持大容量SD卡的解決辦法
現(xiàn)在借花獻佛,寫個詳細(xì)的做法,希望后人收益。
操作方法:
1. 更新PB. 更新補丁放在\10.1.10.250softwareWinCE50 UpdateWinCEPB50-071231-Product-Update-Rollup-Armv4I.msi
2. 在platform->setting->environment 中設(shè)置IMGSDBUS2 = 1
之所以要設(shè)置這個環(huán)境變量是因為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)函數(shù)里在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)函數(shù)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
linux操作系統(tǒng)文章專題:linux操作系統(tǒng)詳解(linux不再難懂)
評論