AnsweredAssumed Answered

KSDK assertion failed clocking the SDHC at 20MHz

Question asked by Simon Haines on Oct 23, 2018
Latest reply on Oct 31, 2018 by Simon Haines

Not sure if this is a bug, but in my MK64F project I clock the SDHC from a 20MHz oscillator (kCLOCK_OSC0ErClk). The SD_CardInit and SD_SelectBusTiming functions call SDHC_SetSdClock functions with parameters like SD_CLOCK_25MHZ, SD_CLOCK_50MHZ and SD_CLOCK_100MHZ.

 

In the SDHC_SetSdClock function there is the assertion:

assert((busClock_Hz != 0U) && (busClock_Hz <= srcClock_Hz));

This will assert because my source clock is 20MHz and the bus clock is greater. I have added the following line to SDHC_SetSdClock as a workaround.

busClock_Hz = MIN(srcClock_Hz, busClock_Hz);

Is this an issue?

 

Also, this document indicates the maximum SDHC timing for K64 parts should be 40MHz, and not 50MHz as in the SDK... Does that advice still apply?

Outcomes