How to handle the data abord in SDIO card but not SD memory card?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-05-24 8:46 AM
For SD memory card when there are errors in data transfer or do multiple block transfer, we need use CMD12 to abort the transfer, And there is function for SD card in HAL library, for example, there is 'SDMMC_CmdStopTransfer' in STM32H7's lib. But how about SDIO? The SDIO specification states CMD52 is needed at card side. Then what we should do at STM32 side, particularly in STM32H7?
Thanks.
- Labels:
-
SDIO-SDMMC
-
STM32H7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-05-24 10:05 AM
SDIO should be compatible with SD. What specification are you seeing that CMD52 is required to abort the transfer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-05-24 7:49 PM
SDIO Simplified specification:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-05-24 8:21 PM
You're right.
You'll have to create your own function as this command isn't in the HAL library. You can use SDMMC_CmdStopTransfer function as a template and change CmdIndex to 52 and change Argument to set the correct bits. However, it looks like the response is R5, which doesn't appear to be supported by HAL either--there doesn't appear to be a SDMMC_GetCmdResp5 function. You'd have to create this as well.
So short answer, do it yourself or wait until it's implemented into HAL, if ever.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-05-25 8:07 PM
But what make me not so confident is the ST's manual only mentions how to handle CMD12 with abort. Such as use CMD12 with CMDSTOP. Will this flow works for CMD52 too?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-05-25 11:36 PM
Pretty sure you're going to have to work through and test these things. You'll need to rationalize​ the SD/MMC specs vs the SDIO/SDMMC peripheral functionality.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-05-26 5:58 AM
I haven't done this, but it seems like the SDMMC peripheral is fully capable of handling the SDIO commands. Could be wrong. As clive1 says, you're going to have to test it.
