SDC LLD development questions

Discussions and support about ChibiOS/HAL, the MCU Hardware Abstraction Layer.
Post Reply
wiml
Posts: 7
Joined: Fri Dec 08, 2017 6:52 am
Has thanked: 2 times
Been thanked: 5 times

SDC LLD development questions

Post by wiml »

I'm writing a LLD for the Kinetis K64F's SDHC peripheral. I have a handful of questions about how the higher level driver expects the LLD to behave. I can make guesses about some of them but I'd rather have the info from a more authoritative source

My main question right now is the sdc_lld_sync() function, which is in the template, but it's not clear what it's for. It's not called by anything I can find. What is it supposed to do?
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: SDC LLD development questions

Post by Giovanni »

Hi,

It is called by sdcSync() in hal_sdc.c, implementation is not mandatory, the STM32 driver does not implement it.

Giovanni
wiml
Posts: 7
Joined: Fri Dec 08, 2017 6:52 am
Has thanked: 2 times
Been thanked: 5 times

Re: SDC LLD development questions

Post by wiml »

Hmmm, OK. But if it is implemented, what is it supposed to do? Or, how do I know whether my LLD should implement it or not? Is it related to the DAT0 BUSY signal?
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: SDC LLD development questions

Post by Giovanni »

It is supposed to wait until all driver-related activity is over. It is part of the ioblock interface, it is not necessary meaningful for an SD card.

Giovanni
Post Reply