Hi CarlosCasillas and lpcxpresso_support
I found a cause why USDHC does not work. It was caused by BOARD_SD_HOST_SUPPORT_SD104_FREQ and USDHC_SDClock as follows.
In board.h
#define BOARD_SD_HOST_SUPPORT_SDR104_FREQ (200000000U)
In fsl_usdhc.h
uint32_t USDHC_SetSdClock(USDHC_Type *base, uint32_t srcClock_Hz, uint32_t busClock_Hz)
{
assert(srcClock_Hz != 0U);
assert((busClock_Hz != 0U) && (busClock_Hz <= srcClock_Hz));
In case of USDHC_CLK_ROOT == 198MHz, It stopped at the assertion of the 2nd line of USDHC_SDClock
(Because these clocks are busClock_Hz == 200MHz and srcClock_Hz == 198MHz, assertion is correct).
Also I changed BOARD_SD_HOST_SUPPORT_SD104_FREQ to 198000000.
As a result, SD card Initializing copmpleted, But File write/Read verify Test FAILED.
After all, if the sample code is correct, USDHC_CLK_ROOT must be grater than 198 MHz. And if I set USDHC_CLK_ROOT to 198 MHz, it seems that reading and writing of SD card becomes unstable.
I will return to the first question,
Q. how is the correct range of USDHC_CLK_ROOT?
Best Regards,
T.Kashiwagi