Merged F1 flash patch.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12809 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Giovanni Di Sirio 2019-05-19 12:46:30 +00:00
parent 627b9a60df
commit 8474c1dda5
3 changed files with 12 additions and 3 deletions

View File

@ -32,7 +32,6 @@
/* Driver local definitions. */
/*===========================================================================*/
#define STM32_FLASH_SECTOR_SIZE 1024U
#define STM32_FLASH_LINE_SIZE 2U
#define STM32_FLASH_LINE_MASK (STM32_FLASH_LINE_SIZE - 1U)
@ -321,8 +320,8 @@ flash_error_t efl_lld_program(void *instance, flash_offset_t offset,
/**
* @brief Starts a whole-device erase operation.
* @note This function does nothing, as STM32F1 has only one bank
* and it is where the program is running on.
* @note This function does nothing, the flash memory is where the program
* is running on.
*
* @param[in] ip pointer to a @p EFlashDriver instance
* @return An error code.

View File

@ -51,6 +51,10 @@
/* Derived constants and error checks. */
/*===========================================================================*/
#if !defined(STM32_FLASH_SECTOR_SIZE)
#error "STM32_FLASH_SECTOR_SIZE not defined in registry"
#endif
#if !defined(STM32_FLASH_NUMBER_OF_BANKS)
#error "STM32_FLASH_NUMBER_OF_BANKS not defined in registry"
#endif

View File

@ -117,6 +117,7 @@
/* Flash attributes.*/
#define STM32_FLASH_NUMBER_OF_BANKS 1
#define STM32_FLASH_SECTOR_SIZE 1024U
#if !defined(STM32_FLASH_SECTORS_PER_BANK) || defined(__DOXYGEN__)
#define STM32_FLASH_SECTORS_PER_BANK 32 /* Maximum, can be redefined.*/
#endif
@ -329,6 +330,7 @@
/* Flash attributes.*/
#define STM32_FLASH_NUMBER_OF_BANKS 1
#define STM32_FLASH_SECTOR_SIZE 1024U
#if !defined(STM32_FLASH_SECTORS_PER_BANK) || defined(__DOXYGEN__)
#define STM32_FLASH_SECTORS_PER_BANK 32 /* Maximum, can be redefined.*/
#endif
@ -513,6 +515,7 @@
/* Flash attributes.*/
#define STM32_FLASH_NUMBER_OF_BANKS 1
#define STM32_FLASH_SECTOR_SIZE 1024U
#if !defined(STM32_FLASH_SECTORS_PER_BANK) || defined(__DOXYGEN__)
#define STM32_FLASH_SECTORS_PER_BANK 128 /* Maximum, can be redefined.*/
#endif
@ -730,6 +733,7 @@
/* Flash attributes.*/
#define STM32_FLASH_NUMBER_OF_BANKS 1
#define STM32_FLASH_SECTOR_SIZE 2048U
#if !defined(STM32_FLASH_SECTORS_PER_BANK) || defined(__DOXYGEN__)
#define STM32_FLASH_SECTORS_PER_BANK 256 /* Maximum, can be redefined.*/
#endif
@ -969,6 +973,7 @@
/* Flash attributes.*/
#define STM32_FLASH_NUMBER_OF_BANKS 2
#define STM32_FLASH_SECTOR_SIZE 2048U
#if !defined(STM32_FLASH_SECTORS_PER_BANK) || defined(__DOXYGEN__)
#define STM32_FLASH_SECTORS_PER_BANK 256 /* Maximum, can be redefined.*/
#endif
@ -1228,6 +1233,7 @@
/* Flash attributes.*/
#define STM32_FLASH_NUMBER_OF_BANKS 1
#define STM32_FLASH_SECTOR_SIZE 2048U
#if !defined(STM32_FLASH_SECTORS_PER_BANK) || defined(__DOXYGEN__)
#define STM32_FLASH_SECTORS_PER_BANK 128 /* Maximum, can be redefined.*/
#endif