[bsp][renesas] 修复SDHI尝试多块读取时只能读取到第一个块的问题 (#7737)

This commit is contained in:
Jay 2023-06-29 17:42:13 +08:00 committed by GitHub
parent 34bc78331c
commit 69ec7981c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -94,6 +94,11 @@ rt_err_t command_send(sdhi_instance_ctrl_t *p_ctrl, struct rt_mmcsd_cmd *cmd)
cmd->cmd_code |= SDHI_CMD_DATA_DIR_READ;
}
}
if (data->blks > 1)
{
cmd->cmd_code |= SDHI_BLK_TRANSFER;
cmd->cmd_code |= SDHI_BLK_NOT_AUTO_STOP;
}
}
p_ctrl->p_reg->SD_CMD = cmd->cmd_code;

View File

@ -44,6 +44,7 @@
#define SDHI_CMD_ADTC_EN (1 << 11)
#define SDHI_CMD_DATA_DIR_READ (1 << 12)
#define SDHI_BLK_TRANSFER (1 << 13)
#define SDHI_BLK_NOT_AUTO_STOP (1 << 14)
#define SDIO_MAX_FREQ 25000000