|
|
@@ -491,8 +491,20 @@ static void MainTask(void *pvParameters)
|
|
|
#endif
|
|
|
#endif
|
|
|
|
|
|
-#if CPU_DEVICE_TYPE_SELECT == EMMC_FLASH
|
|
|
- if (EMMC_Init()) {
|
|
|
+#if DEVICE_TYPE_SELECT == EMMC_FLASH || CPU_DEVICE_TYPE_SELECT == EMMC_FLASH
|
|
|
+ int retries = 3;
|
|
|
+
|
|
|
+retry:
|
|
|
+ if (EMMC_Init() && retries--) {
|
|
|
+ printf("EMMC Reinit\n");
|
|
|
+ /* 此处修改为自身平台EMMC的复位脚操作,复位拉低时间参考颗粒规格书要求 */
|
|
|
+ GPIO_DirectionOutput(131, 0);
|
|
|
+ TIMER_Mdelay(10);
|
|
|
+ GPIO_DirectionOutput(131, 1);
|
|
|
+ TIMER_Mdelay(10);
|
|
|
+ goto retry;
|
|
|
+ }
|
|
|
+ if (retries < 0) {
|
|
|
printf("EMMC_Init fail!\n");
|
|
|
vTaskDelete(NULL);
|
|
|
return;
|