I integrated the SD card fatfs code into my application and it works as does the rest of my code.
The only issue is once I initialize the SD card, LEDs D8 (blue), D9 (red), D10 (green) and D11 (red power) get dim. D8-D10 are powered by V_LED, D11 powered by VDD_TARGET. V_LED does not dip after initialization. It is still at 3.3V. I can remove the SD card after initialization and the issue is still present.
I have two Analog Devices codec boards running off of 5V on the Arduino connector.
Thanks,
Dan
Solved! Go to Solution.
Found the issue. The SD card voltage was being lowered to 1.8V in the driver.
I hacked the following to fix the SD card at 3.3V.
1) in /MIMXRT685S_Project/device/MIMXRT685S_cm33_features.h
change these definitions from 1 to 0
/* @brief Has SDR50 support (HOST_CTRL_CAP[SDR50_SUPPORT]) */
#define FSL_FEATURE_USDHC_HAS_SDR50_MODE (0)
/* @brief Has SDR104 support (HOST_CTRL_CAP[SDR104_SUPPORT]) */
#define FSL_FEATURE_USDHC_HAS_SDR104_MODE (0)
2) in /MIMXRT685S_Project/sdmmc/host/fsl_sdmmc_host.h
change from
#define SDMMCHOST_SUPPORT_DDR50 (1U)
change to
#define SDMMCHOST_SUPPORT_DDR50 (0U)
this comments out the following set 1.8V code /MIMXRT685S_Project/sdmmc/src/fsl_sd.c
#if SDMMCHOST_SUPPORT_DDR50 || SDMMCHOST_SUPPORT_SDR104 || SDMMCHOST_SUPPORT_SDR50
/* check if card support 1.8V */
if ((card->flags & kSD_SupportVoltage180v))
{
if ((card->usrParam.ioVoltage != NULL) && (card->usrParam.ioVoltage->type == kSD_IOVoltageCtrlNotSupport))
{
break;
}
error = SD_SwitchVoltage(card, kSDMMC_OperationVoltage180V);
if (kStatus_SDMMC_SwitchVoltageFail == error)
{
break;
}
if (error == kStatus_SDMMC_SwitchVoltage18VFail33VSuccess)
{
applicationCommand41Argument &= ~SDMMC_MASK(kSD_OcrSwitch18RequestFlag);
card->flags &= ~kSD_SupportVoltage180v;
continue;
}
else
{
card->operationVoltage = kSDMMC_OperationVoltage180V;
break;
}
}
Found the issue. The SD card voltage was being lowered to 1.8V in the driver.
I hacked the following to fix the SD card at 3.3V.
1) in /MIMXRT685S_Project/device/MIMXRT685S_cm33_features.h
change these definitions from 1 to 0
/* @brief Has SDR50 support (HOST_CTRL_CAP[SDR50_SUPPORT]) */
#define FSL_FEATURE_USDHC_HAS_SDR50_MODE (0)
/* @brief Has SDR104 support (HOST_CTRL_CAP[SDR104_SUPPORT]) */
#define FSL_FEATURE_USDHC_HAS_SDR104_MODE (0)
2) in /MIMXRT685S_Project/sdmmc/host/fsl_sdmmc_host.h
change from
#define SDMMCHOST_SUPPORT_DDR50 (1U)
change to
#define SDMMCHOST_SUPPORT_DDR50 (0U)
this comments out the following set 1.8V code /MIMXRT685S_Project/sdmmc/src/fsl_sd.c
#if SDMMCHOST_SUPPORT_DDR50 || SDMMCHOST_SUPPORT_SDR104 || SDMMCHOST_SUPPORT_SDR50
/* check if card support 1.8V */
if ((card->flags & kSD_SupportVoltage180v))
{
if ((card->usrParam.ioVoltage != NULL) && (card->usrParam.ioVoltage->type == kSD_IOVoltageCtrlNotSupport))
{
break;
}
error = SD_SwitchVoltage(card, kSDMMC_OperationVoltage180V);
if (kStatus_SDMMC_SwitchVoltageFail == error)
{
break;
}
if (error == kStatus_SDMMC_SwitchVoltage18VFail33VSuccess)
{
applicationCommand41Argument &= ~SDMMC_MASK(kSD_OcrSwitch18RequestFlag);
card->flags &= ~kSD_SupportVoltage180v;
continue;
}
else
{
card->operationVoltage = kSDMMC_OperationVoltage180V;
break;
}
}
NXP did reply with a workaround in the case you want to run at a faster SD card rate (requires 1.8V), still have bright LEDs.
Yes, RT685 EVK REV E will have such an issue when LDO2_OUT is programmed from 3.3V to 1.8V.
As a workaround for RT685 EVK REV E, you can cut the trace between JS13.1 and JS13.2, connect JS13.1 to JS16.
Hello Dan,
Thank you for sharing your solution. I'm sure it will help other Community users.
Regards,
Gustavo