Skip to content

Commit

Permalink
F7_HAL/mmc: Fix CAPACITY constant used to determine high-capacity MMC.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dpgeorge committed Apr 1, 2019
1 parent d752828 commit a5e93de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion STM32F7xx_HAL_Driver/Inc/stm32f7xx_hal_mmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
* @{
Expand Down

0 comments on commit a5e93de

Please sign in to comment.