; Default SDIO Protocol Definition File ; This file defines the transfers to/from any device ; using the SPI bus ; ; Events ; 1 - Start of Packet ; 2 - End of Packet ; 3 - APP CMD packet ; 4 - R1 response packet ; 5 - R2 response packet ; 6 - R3 response packet ; 7 - R6 response packet ; 8 - Data Packet [Protocol] name = SDIOBus bytewise [DEBUG] ;DebugOn [Packet] [Start] type = event event = 1 ; Start of Packet channelxory [End] type = event event = 2 ; End of Packet channelxory [Decode] [Fields] ; Data Packets Fields [8], Data.Ny.h ; Do all of the Command Packets Fields [!3], Start.1x.h, HOST.1x=1.h, CMD.6x=4.L, DSR.16x.h Fields [!3], Start.1x.h, HOST.1x=1.h, CMD.6x=7.L, RCA.16x.h Fields [!3], Start.1x.h, HOST.1x=1.h, CMD.6x=9.L, RCA.16x.h Fields [!3], Start.1x.h, HOST.1x=1.h, CMD.6x=10.L, RCA.16x.h Fields [!3], Start.1x.h, HOST.1x=1.h, CMD.6x=13.L, RCA.16x.h Fields [!3], Start.1x.h, HOST.1x=1.h, CMD.6x=15.L, RCA.16x.h Fields [!3], Start.1x.h, HOST.1x=1.h, CMD.6x=16.L, BLOCK_LEN.32x.h Fields [!3], Start.1x.h, HOST.1x=1.h, CMD.6x=17.L, Address.32x.h Fields [!3], Start.1x.h, HOST.1x=1.h, CMD.6x=18.L, Address.32x.h Fields [!3], Start.1x.h, HOST.1x=1.h, CMD.6x=24.L, Address.32x.h Fields [!3], Start.1x.h, HOST.1x=1.h, CMD.6x=25.L, Address.32x.h Fields [!3], Start.1x.h, HOST.1x=1.h, CMD.6x=28.L, Address.32x.h Fields [!3], Start.1x.h, HOST.1x=1.h, CMD.6x=29.L, Address.32x.h Fields [!3], Start.1x.h, HOST.1x=1.h, CMD.6x=30.L, Address.32x.h Fields [!3], Start.1x.h, HOST.1x=1.h, CMD.6x=32.L, Address.32x.h Fields [!3], Start.1x.h, HOST.1x=1.h, CMD.6x=33.L, Address.32x.h Fields [!3], Start.1x.h, HOST.1x=1.h, CMD.6x=55.L, RCA.16x.h Fields [!3], Start.1x.h, HOST.1x=1.h, CMD.6x=56.L, nua.31x.i, RD/WR#.1.h ; All of the App Command packets Fields [3], Start.1x.h, HOST.1x=1.h, ACMD.6x=6.L, nua.30x.i, BUS_WIDTH.2.h Fields [3], Start.1x.h, HOST.1x=1.h, ACMD.6x=13.L Fields [3], Start.1x.h, HOST.1x=1.h, ACMD.6x=23.L, nua.9x.i, BLOCKS.23.h Fields [3], Start.1x.h, HOST.1x=1.h, ACMD.6x=41.L, OCR.32.h Fields [3], Start.1x.h, HOST.1x=1.h, ACMD.6x=42.L, nua.30x.i, SET_CD.1.h Fields [3], Start.1x.h, HOST.1x=1.h, ACMD.6x.L ; Catchall ACMD no parameters Fields [!3], Start.1x.h, HOST.1x=1.h, CMD.6x.L ; Catchall for no parameters ; The R6 response packet Fields [7], $R6, Start.1x.h, DEVICE.1x=0.h, CMD.6x.L, RCA.16x.h, STATUS.16x.h ; The R3 response packet Fields [6], $R3, Start.1x.h, DEVICE.1x=0.h, CMD.6x.L, OCR.32x.h ; The R2 response packet Fields [5], $R2, Start.1x.h, DEVICE.1x=0.h, CMD.6x.L, DATA.128x.h ; The R1 response packet Fields [4], $R1, Start.1x.h, DEVICE.1x=0.h, CMD.6x.L, OUT_OF_RANGE.1x.tft, ADDRESS_ERROR.1x.tft, BLOCK_LEN_ERROR.1x.tft, ERASE_SEQ_ERROR.1x.tft, ERASE_PARAM.1x.tft, WP_VIOLATION.1x.tft, CARD_IS_LOCKED.1x.tft, LOCK_UNLOCK_FAILED.1x.tft, ILLEGAL_COMMAND.1x.tft, CARD_ECC_FAILED.1x.tft, CC_ERROR.1x.tft, ERROR.1x.tft, UNDERRUN.1x.tft, OVERRUN.1x.tft, CID/CSD_OVERWRITE.1x.tft, WP_ERASE_SKIP.1x.tft, CARD_ECC_DISABLE.1x.tft, ERASE_REST.1x.tft, CURRENT_STATE.4x.L, READY_FOR_DATA.1x.tff, nu1.2x.i, APP_CMD.1x.tft, nu4.1x.i, AKE_SEQ_ERROR.1x.tft, RSV_2.1x.i, RSV_TEST_MODE.2x.i Lookup CURRENT_STATE [0]=$Idle [1]=$Ready [2]=$Ident [3]=$Stby [4]=$Tran [5]=$Data [6]=$Rcv [7]=$Prg [8]=$Dis [9]=$reserved [10]=$reserved [11]=$reserved [12]=$reserved [13]=$reserved [14]=$reserved [15]=$reserved Lookup CMD [0]=$GO_IDLE_STATE [1]=$CMD1 [2]=$ALL_SEND_CID [3]=$SEND_RELATIVE_ADDR [4]=$SET_DSR [5]=$CMD5 [6]=$SWITCH_FUNC [7]=$SEL/DESEL_CARD [8]=$SEND_IF_COND [9]=$SEND_CSD [10]=$SEND_CID [11]=$VOLTAGE_SWITCH [12]=$STOP_TRANSMISSION [13]=$SEND_STATUS [14]=$CMD14 [15]=$GO_INACTIVE_STATE [16]=$SET_BLOCKLEN [17]=$READ_SINGLE_BLOCK [18]=$READ_MULTIPLE_BLOCK [19]=$SEND_TUNING_BLOCK [20]=$SPEED_CLASS_CONTROL ; cmd 20 [21]=$CMD21 ; cmd 21 [22]=$CMD22 ; cmd 22 [23]=$SET_BLOCK_COUNT ; cmd 23 [24]=$WRITE_BLOCK ; cmd 24 [25]=$WRITE_MULTIPLE_BLOCK ; cmd 25 [26]=$CMD26 ; cmd 26 [27]=$PROGRAM_CSD ; cmd 27 [28]=$SET_WRITE_PROT ; cmd 28 [29]=$CLR_WRITE_PROT ; cmd 29 [30]=$SEND_WRITE_PROT ; cmd 30 [31]=$CMD31 ; cmd 31 [32]=$ERASE_WR_BLK_START ; cmd 32 [33]=$ERASE_WR_BLK_END ; cmd 33 [34]=$CMD34 ; cmd 34 [35]=$CMD35 ; cmd 35 [36]=$CMD36 ; cmd 36 [37]=$CMD37 ; cmd 37 [38]=$ERASE ; cmd 38 [39]=$CMD39 ; cmd 39 [40]=$CMD40 ; cmd 40 [41]=$CMD41 ; cmd 41 [42]=$LOCK_UNLOCK ; cmd 42 [43]=$CMD43 ; cmd 43 [44]=$CMD44 ; cmd 44 [45]=$CMD45 ; cmd 45 [46]=$CMD46 ; cmd 46 [47]=$CMD47 ; cmd 47 [48]=$CMD48 ; cmd 48 [49]=$CMD49 ; cmd 49 [50]=$CMD50 ; cmd 50 [51]=$CMD51 ; cmd 51 [52]=$CMD52 ; cmd 52 [53]=$CMD53 ; cmd 53 [54]=$CMD54 ; cmd 54 [55]=$APP_CMD ; cmd 55 [56]=$GEN_CMD ; cmd 56 [57]=$CMD57 ; cmd 57 [58]=$CMD58 ; cmd 58 [59]=$CMD59 ; cmd 59 [60]=$CMD60 ; cmd 60 [61]=$CMD61 ; cmd 61 [62]=$CMD62 ; cmd 62 [63]=$CMD63 ; cmd 63 Lookup ACMD [6]=$SET_BUS_WIDTH [13]=$SD_STATUS [22]=$SEND_NUM_WR_BLOCKS [23]=$SET_WR_BLK_ERASE_COUNT [41]=$SD_APP_OP_COND [42]=$SET_CLR_CARD_DETECT [51]=$SEND_SCR