diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-01-18 09:16:25 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-01-18 09:16:25 +0000 |
commit | 83ad77612c9ebc3df58aa85236350226da88cf31 (patch) | |
tree | fd8c6da895521927d0a3c7e2efbbbf0c975218c7 /os/hal/ports | |
parent | 4364ccbaff17b634a0e8d08dd0ee3ea72acac012 (diff) | |
download | ChibiOS-83ad77612c9ebc3df58aa85236350226da88cf31.tar.gz ChibiOS-83ad77612c9ebc3df58aa85236350226da88cf31.tar.bz2 ChibiOS-83ad77612c9ebc3df58aa85236350226da88cf31.zip |
Fixed bug #458.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6631 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports')
-rw-r--r-- | os/hal/ports/STM32/sdc_lld.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/os/hal/ports/STM32/sdc_lld.c b/os/hal/ports/STM32/sdc_lld.c index 6337a955b..c3b95c688 100644 --- a/os/hal/ports/STM32/sdc_lld.c +++ b/os/hal/ports/STM32/sdc_lld.c @@ -607,16 +607,16 @@ bool sdc_lld_read_aligned(SDCDriver *sdcp, uint32_t startblk, SDIO_MASK_DATAENDIE;
SDIO->DLEN = n * MMCSD_BLOCK_SIZE;
- /* Talk to card what we want from it.*/
- if (sdc_lld_prepare_read(sdcp, startblk, n, resp) == TRUE)
- goto error;
-
/* Transaction starts just after DTEN bit setting.*/
SDIO->DCTRL = SDIO_DCTRL_DTDIR |
SDIO_DCTRL_DBLOCKSIZE_3 |
SDIO_DCTRL_DBLOCKSIZE_0 |
SDIO_DCTRL_DMAEN |
SDIO_DCTRL_DTEN;
+
+ /* Talk to card what we want from it.*/
+ if (sdc_lld_prepare_read(sdcp, startblk, n, resp) == TRUE)
+ goto error;
if (sdc_lld_wait_transaction_end(sdcp, n, resp) == TRUE)
goto error;
|