I am trying to use a SD-Card / FatFS with the STM32F0-Discovery-Board. Since there is no demo, I copied the relevant Code from the F107 Olimex demo. Part of the code is working (I can read at least the filenames from the card), but I don't understand the usage of the TM subsystem.
If I activate the TM subsystem at halconf (like it is in the F107-demo), the compiler gives me an error: unknown type name 'halrtcnt_t'. I compared the makefiles and conffiles an can not figure out what i'm missing.
I guess the TM subsystem is needed for this:
Code: Select all
static void tmrfunc(void *p) {
BaseBlockDevice *bbdp = p;
chSysLockFromIsr()
;
if (cnt > 0) {
if (blkIsInserted(bbdp)) {
if (--cnt == 0) {
chEvtBroadcastI(&inserted_event);
}
}
else
cnt = POLLING_INTERVAL;
}
else {
if (!blkIsInserted(bbdp)) {
cnt = POLLING_INTERVAL;
chEvtBroadcastI(&removed_event);
}
}
chVTSetI(&tmr, MS2ST(POLLING_DELAY), tmrfunc, bbdp);
chSysUnlockFromIsr();
}
Do I have to switch on another part (mcuconf or somewhere)? Any guidance is greatly appreciated beforehand!