Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions hal/stm32c0.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@
#define FLASH_CR_PG (1 << 0) /* RM0490 - 3.7.5 - FLASH_CR */
#define FLASH_CR_SEC_PROT (1 << 28) /* RM0490 - 3.7.5 - FLASH_CR */

#define FLASH_CR_PNB_SHIFT 3 /* RM0490 - 3.7.5 - FLASH_CR - PNB bits 8:3 */
#define FLASH_CR_PNB_MASK 0x3f /* RM0490 - 3.7.5 - FLASH_CR - PNB bits 8:3 - 6 bits */
#define FLASH_CR_PNB_SHIFT 3 /* RM0490 - 4.7.5 - FLASH_CR - PNB bits 9:3 */
#define FLASH_CR_PNB_MASK 0x7f /* RM0490 - 4.7.5 - FLASH_CR - PNB bits 9:3 - 7 bits */

#define FLASH_SECR_SEC_SIZE_POS (0U)
#define FLASH_SECR_SEC_SIZE_MASK (0xFF)
Expand Down
4 changes: 2 additions & 2 deletions hal/stm32g0.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@
#define FLASH_CR_PG (1 << 0) /* RM0444 - 3.7.5 - FLASH_CR */
#define FLASH_CR_SEC_PROT (1 << 28) /* RM0444 - 3.7.5 - FLASH_CR */

#define FLASH_CR_PNB_SHIFT 3 /* RM0444 - 3.7.5 - FLASH_CR - PNB bits 8:3 */
#define FLASH_CR_PNB_MASK 0x3f /* RM0444 - 3.7.5 - FLASH_CR - PNB bits 8:3 - 6 bits */
#define FLASH_CR_PNB_SHIFT 3 /* RM0444 - 3.7.5 - FLASH_CR - PNB bits 9:3 */
#define FLASH_CR_PNB_MASK 0x7f /* RM0444 - 3.7.5 - FLASH_CR - PNB bits 9:3 - 7 bits */

#define FLASH_SECR_SEC_SIZE_POS (0U)
#define FLASH_SECR_SEC_SIZE_MASK (0xFF)
Expand Down
4 changes: 4 additions & 0 deletions hal/stm32h5.h
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@
#define FLASH_CR_BER (1 << 3)
#define FLASH_CR_FW (1 << 4)
#define FLASH_CR_STRT (1 << 5)
/* Page number selection:
* Up to 31 pages: H523/33xx
* Up to 127 pages: All others
*/
#define FLASH_CR_PNB_SHIFT 6
#define FLASH_CR_PNB_MASK 0x7F
#define FLASH_CR_MER (1 << 15)
Expand Down
2 changes: 1 addition & 1 deletion hal/stm32l5.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
#define FLASH_CR_PER (1 << 1)
#define FLASH_CR_MER1 (1 << 2)
#define FLASH_CR_PNB_SHIFT 3
#define FLASH_CR_PNB_MASK 0x7F
#define FLASH_CR_PNB_MASK 0x7F /* up to 127 pages */
#define FLASH_CR_BKER (1 << 11)
#define FLASH_CR_MER2 (1 << 15)
#define FLASH_CR_STRT (1 << 16)
Expand Down
7 changes: 6 additions & 1 deletion hal/stm32u5.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,13 @@
#define FLASH_CR_PG (1 << 0)
#define FLASH_CR_PER (1 << 1)
#define FLASH_CR_MER1 (1 << 2)
/* Page number selection:
* Up to 31 pages: U535/U545
* Up to 127 pages: U575/U585
* Up to 255 pages: U59x/5Ax/5Fx/5Gx
*/
#define FLASH_CR_PNB_SHIFT 3
#define FLASH_CR_PNB_MASK 0x7F
#define FLASH_CR_PNB_MASK 0xFF /* support up to 255 pages */
#define FLASH_CR_BKER (1 << 11)
#define FLASH_CR_MER2 (1 << 15)
#define FLASH_CR_STRT (1 << 16)
Expand Down