Hi Giampietro
Unfortunately there is no such example because by default the slot for sdcard is not connected on FrdmK22 and TWR-K22, the interface on these two boards are via SPI not ture SDHC signals.
You can refer to the API reference manual for typical use case
sdhcConfig->cardDetectDat3 = false;
sdhcConfig->endianMode = kSDHC_EndianModeLittle;
sdhcConfig->dmaMode = kSDHC_DmaModeAdma2;
sdhcConfig->readWatermarkLevel = 0x80U;
sdhcConfig->writeWatermarkLevel = 0x80U;
SDHC_Init(BOARD_SDHC_BASEADDR, sdhcConfig);
/* Save host information. */
card->host.base = BOARD_SDHC_BASEADDR;
card->host.sourceClock_Hz = CLOCK_GetFreq(BOARD_SDHC_CLKSRC);
card->host.transfer = SDHC_TransferFunction;
/* Init card. */
if (MMC_Init(card))
{
PRINTF("nn MMC card init failed nn");
}
while (true)
{
if (kStatus_Success != MMC_WriteBlocks(card, g_dataWrite, DATA_BLOCK_START,
DATA_BLOCK_COUNT))
{
PRINTF("Write multiple data blocks failed.nrnn");
}
if (kStatus_Success != MMC_ReadBlocks(card, g_dataRead, DATA_BLOCK_START,
DATA_BLOCK_COUNT))
{
PRINTF("Read multiple data blocks failed.nrnn");
}
}
MMC_Deinit(card);
This below link maybe helpful to you.
I noticed that the KSDK 2.0 has support for the eMMC. Are there any examples?
Regards
Daniel