Browse Source

F7_HAL/mmc: Fix CAPACITY constant used to determine high-capacity MMC.

In the code CAPACITY is compared against number of logical blocks, not
number of bytes, so should be expressed as 2GB in 512 blocks.  This is how
it's done in the F4 code.
work-f1-1.10.2
Damien George 5 years ago
committed by Damien George
parent
commit
91b1234e8e
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_mmc.h

+ 1
- 1
STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_mmc.h View File

@@ -243,7 +243,7 @@ typedef struct
*/

#define BLOCKSIZE ((uint32_t)512U) /*!< Block size is 512 bytes */
#define CAPACITY ((uint32_t)0x80000000U) /*!< 2 G bytes constant */
#define CAPACITY ((uint32_t)0x400000U) /*!< Log Block Number for 2 G bytes Cards */

/** @defgroup MMC_Exported_Constansts_Group1 MMC Error status enumeration Structure definition
* @{


Loading…
Cancel
Save