You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/11/11 03:32:38 UTC
[GitHub] [incubator-nuttx] yjdwbj commented on issue #2276: Atmel sam4s-xplained-pro board can't using built-in SD Card and nand flash
yjdwbj commented on issue #2276:
URL: https://github.com/apache/incubator-nuttx/issues/2276#issuecomment-725125177
Thank you @adamfeuer reply to me, I having a logic analyzer, and connected to the right PIOD interface.
![1537179147](https://user-images.githubusercontent.com/321919/98761556-acac9400-2410-11eb-9666-e00b591d3c21.jpg)
And I enabled the sam_sendcmd output like below:
```sh
BD
initializing HSMCI
sam_hsmci_initialize: Initializing SDIO
sdio_initialize: slotno: 0
mmcsd_slotinitialize: minor: 0
mmcsd_hwinitialize: DMA supported: 1
mmcsd_hwinitialize: Attached MMC/SD interrupts
sam_registercallback: Register 0x413e65(0x200042e0)
sam_callbackenable: eventset: 02
sam_callback: Callback 0x413e65(0x200042e0) cbevents: 02 cdstatus: 00
sam_callback: No... return without performing the callback
mmcsd_slotinitialize: MMC/SD slot is empty
sam_cardinserted: Slot 0 inserted: YES
sdio_mediachange: cdstatus OLD: 00 NEW: 01
sam_callback: Callback 0x413e65(0x200042e0) cbevents: 02 cdstatus: 01
sam_callback: Callback to 0x413e65(0x200042e0)
mmcsd_mediachange: arg: 0x200042e0
mmcsd_probe: type: 0 probed: 0
mmcsd_removed: type: 0 present: 1
sam_sendcmd: cmd: 00000000 arg: 00000000 regval: 00000000
sam_sendcmd: cmd: 00000000 arg: 00000000 regval: 00000000
sam_sendcmd: cmd: 00008101 arg: 40200000 regval: 00001041
sam_waitresponse: ERROR: cmd: 00008101 events: 009b0001 SR: 0410c0e4
mmcsd_sendcmdpoll: ERROR: Wait for response to cmd: 00008101 failed: -116
mmcsd_cardidentify: ERROR: CMD1 RECVR3: -22
sam_sendcmd: cmd: 00000208 arg: 000001aa regval: 00001048
mmcsd_cardidentify: SD V2.x card
sam_sendcmd: cmd: 00000077 arg: 00000000 regval: 00001077
sam_sendcmd: cmd: 00000129 arg: 40100000 regval: 00001069
mmcsd_cardidentify: R3: 00ff8000
sam_sendcmd: cmd: 00000077 arg: 00000000 regval: 00001077
sam_sendcmd: cmd: 00000129 arg: 40100000 regval: 00001069
mmcsd_cardidentify: R3: c0ff8000
mmcsd_cardidentify: SD V2.x card with block addressing
sam_sendcmd: cmd: 000000c2 arg: 00000000 regval: 00001082
mmcsd_decode_cid: mid: 02 oid: 544d pnm: SA08G prv: 7 psn: 1107393314 mdt: c6 crc: 7e
sam_sendcmd: cmd: 000001c3 arg: 00000000 regval: 00001043
mmcsd_sdinitialize: RCA: 1234
sam_sendcmd: cmd: 0000004d arg: 12340000 regval: 0000104d
sam_sendcmd: cmd: 000000c9 arg: 12340000 regval: 00001089
mmcsd_decode_csd: CSD:
mmcsd_decode_csd: CSD_STRUCTURE: 1 SPEC_VERS: 0 (MMC)
mmcsd_decode_csd: TAAC {TIME_UNIT: 6 TIME_VALUE: 1} NSAC: 0
mmcsd_decode_csd: TRAN_SPEED {TRANSFER_RATE_UNIT: 2 TIME_VALUE: 6}
mmcsd_decode_csd: CCC: 1461
mmcsd_decode_csd: READ_BL_LEN: 9 READ_BL_PARTIAL: 0
mmcsd_decode_csd: WRITE_BLK_MISALIGN: 0 READ_BLK_MISALIGN: 0
mmcsd_decode_csd: DSR_IMP: 0
mmcsd_decode_csd: SD Block Addressing:
mmcsd_decode_csd: C_SIZE: 15199 SD_ER_BLK_EN: 1
mmcsd_decode_csd: SD_SECTOR_SIZE: 127 SD_WP_GRP_SIZE: 0
mmcsd_decode_csd: WP_GRP_EN: 0 MMC DFLT_ECC: 0 (MMC) R2W_FACTOR: 2
mmcsd_decode_csd: WRITE_BL_LEN: 9 WRITE_BL_PARTIAL: 0
mmcsd_decode_csd: FILE_FORMAT_GROUP: 0 COPY: 0
mmcsd_decode_csd: PERM_WRITE_PROTECT: 0 TMP_WRITE_PROTECT: 0
mmcsd_decode_csd: FILE_FORMAT: 0 ECC: 0 (MMC) CRC: 58
mmcsd_decode_csd: Capacity: 7782400Kb, Block size: 512b, nblocks: 15564800 wrprotect: 0
sam_sendcmd: cmd: 00000087 arg: 12340000 regval: 000010c7
sam_sendcmd: cmd: 00000050 arg: 00000008 regval: 00001050
sam_dmarecvsetup: SAM_HSMCI_MR = 0x00008702
sam_sendcmd: cmd: 00000077 arg: 12340000 regval: 00001077
sam_sendcmd: cmd: 00000473 arg: 00000000 regval: 00051073
mmsd_decode_scr: SCR:
mmsd_decode_scr: SCR_STRUCTURE: 0 SD_VERSION: 2
mmsd_decode_scr: DATA_STATE_AFTER_ERASE: 0 SD_SECURITY: 3 SD_BUS_WIDTHS: 5
mmsd_decode_scr: Manufacturing data: 00000001
sam_sendcmd: cmd: 00000077 arg: 12340000 regval: 00001077
sam_sendcmd: cmd: 0000006a arg: 00000000 regval: 0000106a
sam_sendcmd: cmd: 00000077 arg: 12340000 regval: 00001077
sam_sendcmd: cmd: 00000046 arg: 00000002 regval: 00001046
mmcsd_widebus: Wide bus operation selected
```
The CMD and CLK that it's looks like right.
![sdio](https://user-images.githubusercontent.com/321919/98761483-7bcc5f00-2410-11eb-81ee-812d0480837d.png)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org