diff options
-rw-r--r-- | testhal/STM32/SDIO/main.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/testhal/STM32/SDIO/main.c b/testhal/STM32/SDIO/main.c index 075af2cc3..8c5452ed7 100644 --- a/testhal/STM32/SDIO/main.c +++ b/testhal/STM32/SDIO/main.c @@ -28,7 +28,7 @@ static const SDCConfig sdccfg = { 0
};
-static uint8_t buf[SDC_BLOCK_SIZE * 2];
+static uint8_t blkbuf[SDC_BLOCK_SIZE * 4];
/*
* Application entry point.
@@ -53,15 +53,18 @@ int main(void) { int i;
/* Repeated multiple reads.*/
for (i = 0; i < 5000; i++) {
- if (sdcRead(&SDCD1, 0, buf, 2))
+ if (sdcRead(&SDCD1, 0, blkbuf, 4))
+ chSysHalt();
+ }
+ /* Repeated multiple write.*/
+ for (i = 0; i < 100; i++) {
+ if (sdcRead(&SDCD1, 0x10000, blkbuf, 4))
+ chSysHalt();
+ if (sdcWrite(&SDCD1, 0x10000, blkbuf, 4))
+ chSysHalt();
+ if (sdcWrite(&SDCD1, 0x10000, blkbuf, 4))
chSysHalt();
}
- if (sdcRead(&SDCD1, 0x10000, buf, 2))
- chSysHalt();
- if (sdcWrite(&SDCD1, 0x10000, buf, 2))
- chSysHalt();
- if (sdcRead(&SDCD1, 0x10000, buf, 2))
- chSysHalt();
if (sdcDisconnect(&SDCD1))
chSysHalt();
}
|