[BSP][RT1050] improve sdio stability and speed. | 优化SDIO接口稳定性和速度.

1.格式化代码.
2.优化SDIO接口稳定性和速度: 将SDIO时钟树中分频数增大, 提高内部时钟的稳定性, 同时SDIO速度提高到30M. 并且通过USB拷贝12M MP3文件测试, 多次拷贝数据稳定.
This commit is contained in:
liu2guang 2018-05-10 07:36:59 +08:00
parent 236fd82e5d
commit 51f638ad63
1 changed files with 150 additions and 148 deletions

View File

@ -76,7 +76,8 @@ static int enable_log = 1;
ALIGN(USDHC_ADMA2_ADDR_ALIGN) uint32_t g_usdhcAdma2Table[USDHC_ADMA_TABLE_WORDS] SECTION("NonCacheable");
struct imxrt_mmcsd {
struct imxrt_mmcsd
{
struct rt_mmcsd_host *host;
struct rt_mmcsd_req *req;
struct rt_mmcsd_cmd *cmd;
@ -217,7 +218,7 @@ static void _mmcsd_host_init(struct imxrt_mmcsd * mmcsd)
static void _mmcsd_clk_init(struct imxrt_mmcsd *mmcsd)
{
CLOCK_EnableClock(mmcsd->ip_clock);
CLOCK_SetDiv(mmcsd->usdhc_div, 0U);
CLOCK_SetDiv(mmcsd->usdhc_div, 5U);
}
static void _mmcsd_isr_init(struct imxrt_mmcsd *mmcsd)
@ -492,7 +493,8 @@ FINSH_FUNCTION_EXPORT(log_toggle, toglle log dumple);
//
//}
static const struct rt_mmcsd_host_ops ops = {
static const struct rt_mmcsd_host_ops ops =
{
_mmc_request,
_mmc_set_iocfg,
RT_NULL,//_mmc_get_card_status,