Update,
Under Freescale->SDK_2.0_K64F->docs, there exist the following .pdf ( Kinetis SDK v.2.0 API Reference Manual)
Under the SDHC, I found the following:
Typical use case
/* Initializes the SDHC.
sdhcConfig->cardDetectDat3 = false;
sdhcConfig->endianMode = kSDHC_EndianModeLittle;
sdhcConfig->dmaMode = kSDHC_DmaModeAdma2;
sdhcConfig->readWatermarkLevel = 0x80U;
sdhcConfig->writeWatermarkLevel = 0x80U;
SDHC_Init(BOARD_SDHC_BASEADDR, sdhcConfig);
/* Fills state in the card driver.
card->sdhcBase = BOARD_SDHC_BASEADDR;
card->sdhcSourceClock = CLOCK_GetFreq(BOARD_SDHC_CLKSRC);
card->sdhcTransfer = sdhc_transfer_function;
/* Initializes the card.
if (SD_Init(card))
{
PRINTF("nrnnSD card init failed.nrnn");
}
PRINTF("nrnnRead/Write/Erase the card continuously until it encounters error......nrnn");
while (true)
{
if (kStatus_Success != SD_WriteBlocks(card, g_dataWrite, DATA_BLOCK_START, DATA_BLOCK_COUNT))
{
PRINTF("Write multiple data blocks failed.nrnn");
}
if (kStatus_Success != SD_ReadBlocks(card, g_dataRead, DATA_BLOCK_START, DATA_BLOCK_COUNT))
{
PRINTF("Read multiple data blocks failed.nrnn");
}
if (kStatus_Success != SD_EraseBlocks(card, DATA_BLOCK_START, DATA_BLOCK_COUNT))
{
PRINTF("Erase multiple data blocks failed.nrnn");
}
}
SD_Deinit(card);
1. Question is: "What are the includes needed?"
I am currently placing this one: #include "fsl_sd_disk.h", but sdhcConfig-> is not being recognized?
2. Question is: "Is the above all I need for the SDcard to function?".
thank you,
Neil Porven