AnsweredAssumed Answered

LPC4337 SDIO Read_Direct for instance card size

Question asked by on Feb 20, 2017
Latest reply on Feb 22, 2017 by Kerry Zhou

Dear All, 


I am using SDIO to store data on a SD card and I would like to get the SD card size/capacity [in GB] (which corresponds to CMD9 with SD protocol and SPI). In the example ''periph_SDIO'', there is:


SDIO_Read_Direct(LPC_SDMMC, 1, 0x1C, &val) and SDIO_Read_Direct(LPC_SDMMC, 1, 0x1D, &val)


Where do the 0x1C or 0x1D come from ?


I look into the file "simplified_SDIO_card_spec.pdf" but cannot make sense of it to answer the question above. I understand that the information should be in the FBR -> CIS register (right?).  

Looking further in the "periph_SDIO" example, there is SDIO_Read_Direct(LPC_SDMMC, 1, 0x04, &val) (clear the interrupt). Again, I am not able to understand or to calculate the 0x04 address.


Could you explain or point to a good document in order to understand these addresses?


Thank you very much.