Skip to content

Commit 4e6e81c

Browse files
committed
Don't hide the bank swap registers behind DUALBANK_SWAP.
1 parent 0fb1f81 commit 4e6e81c

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

hal/stm32h5.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -254,16 +254,11 @@
254254
#define FLASH_OPSR_CODE_OPT_CHANGE (0x6 << 29)
255255
#define FLASH_OPSR_CODE_OBK_SWAP (0x7 << 29)
256256

257+
#define FLASH_OPTSR_CUR (*(volatile uint32_t *)(FLASH_BASE + 0x50))
258+
#define FLASH_OPTSR_PRG (*(volatile uint32_t *)(FLASH_BASE + 0x54))
259+
#define FLASH_OPTSR_SWAP_BANK (1 << 31)
257260

258261

259-
260-
261-
#if defined(DUALBANK_SWAP)
262-
#define FLASH_OPTSR_CUR (*(volatile uint32_t *)(FLASH_BASE + 0x50))
263-
#define FLASH_OPTSR_PRG (*(volatile uint32_t *)(FLASH_BASE + 0x54))
264-
#define FLASH_OPTSR_SWAP_BANK (1 << 31)
265-
#endif
266-
267262
/* Register values (for both secure and non secure registers)
268263
* RM0481 Table 75 */
269264

0 commit comments

Comments
 (0)