系統(tǒng)源碼泄密mand_第1頁
系統(tǒng)源碼泄密mand_第2頁
系統(tǒng)源碼泄密mand_第3頁
系統(tǒng)源碼泄密mand_第4頁
系統(tǒng)源碼泄密mand_第5頁
已閱讀5頁,還剩10頁未讀, 繼續(xù)免費閱讀

付費下載

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

V1.4–Aug07,modify0xFDFACommand*CBWByte28:CSAddSPC1burningtoolcommandModifyICVersionValuebyte3from0xfftoAddGetCSValueandSDRAMInitialConformityallprojectintheoneFredfirstrevisionforUSBToolUSBTool主要是依據(jù)USBSCSICommand的協(xié)議方式,PC軟體通過下VendorCommand和小機溝通并且操作的方式。為了避免VendorCommand和其他廠商的應(yīng)用和Generalplus發(fā)生,PC在下SCSIVendorCommandHandshake的。然后才下具體的mand已Device操作。VendorCommand。;Version;Byte8~Byte10:Date。eg://0~3:ICbodyis//4~7:ICVersion,0xFFFFFFmeansmask//Date//Date//DateProjectGetICVersionValueandUsedCommandUsedRomCodeByte4~7:HandshakeMethodFotisIDEUSBtoPrintBridgeToolByte4~7:HandshakeMethod u’nSPIDEUSBSpeedupDownloadToolByte4~7:HandshakeMethodInitialforu’pIDEUSBDownloadupfunctionSPC1USBburningByte4~7:HandshakeMethodSPC1USBburningtoolUSBSCSIVendorCommandOperation1.USBSCSIVendorCommandHandshakeMethodSetvendor*CBWByte15:*CBWByte16:*CBWByte29-30:GP*IN10BytesforReGetDriveStatus:TheLogicUnitNumberthatoperatingnow*CBWByte15*CBWByte16*CBWByte29-30:GPChangNo*CBWByte15*CBWByte16*CBWByte29-30:GP *IN512BytesforDescription*IN512BytesforDescriptionGetIC*CBWByte15*CBWByte16*CBWByte29-30:GP*IN11BytesforICVersionExit*CBWByte15:*CBWByte16:*CBWByte29-30:GP2.ROMTestTool Operation(*Type0~2):EraseNandFlashPhysical*CBWByte15*CBWByte16*CBWByte13:Block*CBWByte29-30:GPOperation(*Type0~2):ReadNandFlashPhysicalOperation(*Type3):Read*CBWByte15*CBWByte16*CBWByte17:HighOperation*CBWByte18:LowOperation*CBWByte21:*CBWByte22:HighOperationData*CBWByte23:LowOperationData*CBWByte29-30:GPOperation(*Type0~2):WriteNandFlashPhysicalOperation(*Type3):Write*CBWByte15*CBWByte16*CBWByte17:HighOperation*CBWByte18:LowOperation*CBWByte21:*CBWByte22:HighbyteOperationData*CBWByte23:LowbyteOperationData*CBWByte29-30:GP ReportNeedEraseNandFlash*CBWByte15*CBWByte16*CBWByte29-30:GPNandflashPhysicalOperation(*Type0~2):EraseNandFlashPhysicalone*CBWByte15*CBWByte16*CBWByte17:OperationBlock*CBWByte29-30:GPRAMOperation(*Type Callfunctioninram*CBWByte15*CBWByte16*CBWByte17:HighwordHighbyteOperationAddress*CBWByte18:HighwordLowbyteOperationAddress*CBWByte19:LowwordHighbyteOperationAddress*CBWByte20:LowwordLowbyteOperationAddress*CBWByte29-30:GPRAMOperation(*Type Gotofunctioninram*CBWByte15*CBWByte16*CBWByte17:HighwordHighbyteOperationAddress*CBWByte18:HighwordLowbyteOperationAddress*CBWByte19:LowwordHighbyteOperationAddress*CBWByte20:LowwordLow*CBWByte29-30:GPNandflashLogicoperation*CBWByte15StandardSCSIWrite Operation(*Type4):ReadLogicoperation*CBWByte15*GPStandardSCSIReadSavedatainfileWrite*CBWByte15:*CBWByte16:*CBWByte17:HighwordHighbyteOperationAddress*CBWByte18:HighwordLowbyteOperationAddress*CBWByte19:LowwordHighbyteOperationAddress*CBWByte20:LowwordLowbyteOperationAddress*CBWByte21:*CBWByte22:HighbyteOperationData*CBWByte23:LowbyteOperationData*CBWByte29-30:GPRead*CBWByte15:*CBWByte16:*CBWByte17:HighwordHighbyteOperationAddress*CBWByte18:HighwordLowbyteOperationAddress*CBWByte19:LowwordHighbyteOperationAddress*CBWByte20:LowwordLowbyteOperationAddress*CBWByte21:*CBWByte22:HighbyteOperationData*CBWByte23:LowbyteOperationData*CBWByte29-30:GPEraseNorFlashOne*CBWByte15*CBWByte16*CBWByte19:HighbyteOperation*CBWByte20:LowbyteOperation*CBWByte29-30:GPEraseMEMORYBy*CBWByte15:*CBWByte16:*CBWByte17:HighwordHighbyteOperationAddress*CBWByte18:HighwordLowbyteOperationAddress*CBWByte19:LowwordHighbyteOperationAddress*CBWByte20:LowwordLowbyteOperationAddress*CBWByte21:*Type(only*CBWByte29-30:GPPollingchipEraseis*CBWByte15:*CBWByte16:*CBWByte17:HighwordHighbyteOperationAddress*CBWByte18:HighwordLowbyteOperationAddress*CBWByte19:LowwordHighbyteOperationAddress*CBWByte20:LowwordLowbyteOperationAddress*CBWByte21:*Type(only*CBWByte29-30:GPInput:1ByteforreturnpollingEraseMEMORYByOne*CBWByte15:*CBWByte16:*CBWByte17:HighwordHighbyteOperationAddress*CBWByte18:HighwordLowbyteOperationAddress*CBWByte19:LowwordHighbyteOperationAddress*CBWByte20:LowwordLowbyteOperationAddress*CBWByte21:*CBWByte29-30:GP EraseisOK*CBWByte15*CBWByte16*CBWByte17:HighwordHighbyteOperationAddress*CBWByte18:HighwordLowbyteOperationAddress*CBWByte19:LowwordHighbyteOperationAddress*CBWByte20:LowwordLowbyteOperationAddress*CBWByte29-30:GPInput:1ByteforreturnpollingGetchecksumbyrefertostartaddress/endaddress*CBWByte15:*CBWByte16:*CBWByte17:HighwordHighbyteStart*CBWByte18:HighwordLowbyteStart*CBWByte19:LowwordHighbyteStart*CBWByte20:LowwordLowbyteStart*CBWByte21:HighwordHighbyteEnd*CBWByte22:HighwordLowbyteEnd*CBWByte23:LowwordHighbyteEnd*CBWByte24:LowwordLowbyteEnd*CBWByte29-30:GPInput:4BytesforsavechecksumInitialSDRAM*CBWByte15:*CBWByte16:*CBWByte17:P_SD_TIMINGHigh*CBWByte18:P_SD_TIMINGLow*CBWByte19:P_SD_CTRL0High*CBWByte20:P_SD_CTRL0Low*CBWByte21:*CBWByte22:P_SD_CTRL1High*CBWByte23:P_SD_CTRL1Low*CBWByte24:P_SD_CBRCYCHigh*CBWByte25:P_SD_CBRCYCLow*CBWByte26:P_SD_MISCHigh*CBWByte27:P_SD_MISCLow*CBWByte28:CS*CBWByte29-30:GP4.Initialforu’pIDEUSBDownloadSpeedupfunctionSetCS0~CS4*CBWByte15:*CBWByte16:*CBWByte17:CS0ValueLow*CBWByte18:CS0Valuehigh*CBWByte19:CS1ValueLow*CBWByte20:CS1Valuehigh*CBWByte21:CS2ValueLow*CBWByte22:CS2Valuehigh*CBWByte23:CS3ValueLow*CBWByte24:CS3Valuehigh*CBWByte25:CS4ValueLow*CBWByte26:CS4Valuehigh*CBWByte29-30:GPGetCS0~CS4*CBWByte15:*CBWByte16:*CBWByte29-30:GPInput:10BytesforCS0~CS4SetAddress*CBWByte15:*CBWByte16:*CBWByte17:HighwordHighbyte*CBWByte18:HighwordLowbyte*CBWByte19:LowwordHighbyte*CBWByte20:LowwordLowbyte*CBWByte21:*CBWByte22:Highbyte*CBWByte22:lowbyte*CBWByte29-30:GPGetAddress*CBWByte15:*CBWByte16:*CBWByte17:HighwordHighbyte*CBWByte18:HighwordLowbyte*CBWByte19:LowwordHigh*CBWByte20:LowwordLowbyte*CBWByte21:*CBWByte29-30:GPInput:2BytesforGetAddress5.FORTISIDEUSBtoPrintToolPrintportcontrolcommand:PCsenddatatoprintdataport*CBWByte15*CBWByte16*CBWByte17*CBWByte29-30:GPPrintportcontrolcommand:PCsenddatatoprintcontrol*CBWByte15*CBWByte16*CBWByte17*CBWByte29-30:GPPrintportcontrolcommand:PCreaddatafromprint*CBWByte15*CBWByte16*CBWByte29-30:GPSimpleICEcommand:send*CBWByte15*CBWByte16*CBWByte17*CBWByte18*CBWByte29-30:GP receive1bytedata*CBWByte15*CBWByte16*CBWByte17*CBWByte29-30:GP receive1worddata*CBWByte15*CBWByte16*CBWByte17*CBWByte29-30:GPSimpleICEcommand:post*CBWByte15*CBWByte16*CBWByte17*CBWByte29-30:GPSimpleICEcommand:*CBWByte15*CBWByte16*CBWByte17*CBWByte29-30:GPICEcommand:*CBWByte15*CBWByte16*CBWByte17:download*CBWByte18:downloadstart*CBWByte19:downloadend*CBWByte23:downloadaddresslow*CBWByte23:downloadaddresshigh*CBWByte23:downloadsizelow*CBWByte23:downloadsizehigh*CBWByte29-30:GP *CBWByte15*CBWByte16*CBWByte17:ICEcommand*CBWByte18:uploadaddresslow*CBWByte19:uploadaddresshigh*CBWByte20:ICEcommand*CBWByte21:ICEcommand*CBWByte22:ICEcommand*CBWByte23:uploadsizelow*CBWByte23:uploadsizehigh*CBWByte29-30:GP *CBWByte15*CBWByte16*CBWByte29-30:GPAdvancedICEcommand:senddata(multiplesend*CBWByte15*CBWByte16*CBWByte17:datasizelow*CBWByte18:datasizehigh*CBWByte29-30:GPAdvancedICEcommand:postdata(multiplepost*CBWByte15*CBWByte16*CBWByte17:datasizelow*CBWByte18:datasizehigh*CBWByte29-30:GPAdvancedICEcommand:set*CBWByte15*CBWByte16*CBWByte17:countlow*CBWByte18:counthigh*CBWByte29-30:GP getCPUregisterdata*CBWByte15*CBWByte16*CBWByte17:ICEcommand*CBWByte18:ICEcommand*CBWByte19:ICEcommand*CBWByte20:ICEcommand*CBWByte21:ICEcommand*CBWByte22:ICEcommand**CBWByte29-30:GP6.SPC1USBburningtoolSelecttargetNorFlashthatwanttoburning*CBWByte15*CBWByte16*CBWByte17:targetNorFlashindex,startfrom0*CBWByte29-30:GP*Type:CBWByte21//CallfunctionGetCMDValueEx(21); NandFlashphysicaloperation NandFlashlogic SST SPI MX GPTAG(TheSameintheallproject)CBWByte29:’G’ASCIIValueCBWByte30:’P’ASCIIValue*CBWSignaturethathelpsidentifythisdatapacketasaCBW.Thesignaturefieldshallcontainthevalueh(littleendian),indicatingaCBW.ACommandBlockTagsentbythehost.ThedeviceshallechothecontentsofthisfieldbacktothehostinthedCSWTagfieldoftheassociatedCSW.ThedCSWTagpositivelyassociatesaCSWwiththecorrespondingCBW.ThenumberofbytesofdatathatthehostexpectstotransferontheBulk-InorBulk-Outendpoint(asindicatedbytheDirectionbit)duringtheexecutionofthiscommand.Ifthisfieldiszero,thedeviceandthehostshalltransfernodatabetweentheCBWandtheassociatedCSW,andthedeviceshallignorethevalueoftheDirectionbitinbmCBWFlags.ThebitsofthisfieldaredefinedasBit7Direction-thedeviceshallignorethisbitifthedCBWDataTransferLengthfieldiszero,otherwise:0=Data-Outfromhosttothe1=Data-InfromthedevicetotheBit6Obsolete.ThehostshallsetthisbittoBits -thehostshallsetthesebitstoThedeviceLogicalUnitNumber(LUN)towhichthecommandblockisbeingsent.FordevicesthatsupportmultipleLUNs,thehostshall ceintothisfieldtheLUNtowhichthiscommandblockisaddressed.Otherwise,thehostshallsetthisfieldtozero.ThevalidlengthoftheCBWCBinbytes.Thisdefinesthevalidlengthofthecommandblock.Theonlylegalvaluesare1through16(01hthrough10h).Allothervaluesare Thecommandblocktobeexecutedbythedevice.ThedeviceshallinterpretthefirstbCBWCBLengthbytesinthisfieldasacommandblockasdefinedbythecommandsetidentifiedbybInterfaceSubClass.Ifthecommandsetsupportedbythedeviceusescommandblocksoffewerthan16(10h)bytesinlength,thesignificantbytesshallbetransferredfirst,beginningwiththebyteatoffset15(Fh).ThedeviceshallignorethecontentoftheCBWCBfieldpastthebyteatoffset(15+bCBWCBLength-1).*CBWCBOperationThefirstbyteofallcommandblocksshallcontainanOperationCode.TheOperationCodeoftheblockindicatestheoperationtobeperformed.Thereare256possibleoperationcodes.Operationcodesaredefinedinthesubsequentsections.LogicalUnitTheLogicalUnitNumberfieldspecifiestheLogicalUnitthatshallprocessthecommandEventhoughSFF-8070istatesthattheLogicalUnitNumber(LUN)attheblock(packet)levelwillbemadeobsoleteinafuturestandard,blocklevelLUNsareusedbyUFIcommandblocksbecauseacontrollevelLUNdoesnotexist.(ThecontrollevelLUNissetintheATAPIBlockDeviceSelectRegister,whichdoesnotexistontheUFIdevice.)IftheUFIdevicesupportsonlyonelogicalunit,itsLogicalUnitNumbershallbezero.ForotherthantheINQUIRYcommand,iftheUFIdevicedetectsaunsupportedLogicalUnitNumber,thedeviceshallabortthecommand,settingthesensekeyshallbesettoILLEGALREQUESTandtheadditionalsensecodetoLOGICALUNITNOTSUPPORTED.LogicalBlockTheLogicalBlockAddressmustbeginwithblockzeroandbecontiguousthroughthelastlogicalblock.FortheUSB-FDU,thelogicalblockisthelogicalsector,whichoccupiesonephysicalsectoronthefloppydiskettemedium.Logicalblock0isthefirstsectoronthediskette,namely,track0,head0,sector1.TheLogicalBlockAddresscanbecalculatedfromthetrack-head-sectornumbersusingthefollowingformula.LBA Head_u SectorLBALogicalBlockAddress(zero-based)TrackTrackNumber(zero-based)HeadTrkNumberofheadspertrackHeadHeadNumber(zero-based)SecTrkNumberofsectorspertrackSectorSectorNumber(one-based)Thenumberofheadspertrackandthenumberofsectorspertrackdependsontheformatofthefloppymedium.Givenalogicalblockaddress,thetrack,head,andsectornumberscanbecalculatedasfollows:Sector_LBAmod Head_LBAySecTrk_modHeadTrkTrack_LBAySecTrk_yHeadTrkwheremodisthemoduloorremainderTransferTheTransferLengthFieldspecifiestheamountofdatatobetransferred,usuallythenumberofblocks.ForseveralcommandblockstheTransferLengthindicatestherequestednumberofbytestobesentasdefinedinthecommandblockdescription.Forthesecommand

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論