STM32U073 - FLASH_OPTR discrepancy in reference manual
There appears to be a discrepancy between the STM32U073 reference manual and the header file for the part. Given that STM32CubeProg seems to agree with the header file, I'm inclined to think it's an error in the reference manual.
I'm looking at programming the brownout detection bits in the STM32U073. If I look at stm32u073xx.h (STM32Cube FW_U0 v1.2), I see this:
/******************* Bits definition for FLASH_OPTR register ****************/
#define FLASH_OPTR_RDP_Pos (0U)
#define FLASH_OPTR_RDP_Msk (0xFFUL << FLASH_OPTR_RDP_Pos) /*!< 0x000000FF */
#define FLASH_OPTR_RDP FLASH_OPTR_RDP_Msk
#define FLASH_OPTR_BOR_EN_Pos (8U)
#define FLASH_OPTR_BOR_EN_Msk (0x1UL << FLASH_OPTR_BOR_EN_Pos) /*!< 0x00000100 */
#define FLASH_OPTR_BOR_EN FLASH_OPTR_BOR_EN_Msk
#define FLASH_OPTR_BORR_LEV_Pos (9U)
#define FLASH_OPTR_BORR_LEV_Msk (0x3UL << FLASH_OPTR_BORR_LEV_Pos) /*!< 0x00000600 */
#define FLASH_OPTR_BORR_LEV FLASH_OPTR_BORR_LEV_Msk
#define FLASH_OPTR_BORR_LEV_0 (0x1UL << FLASH_OPTR_BORR_LEV_Pos) /*!< 0x00000200 */
#define FLASH_OPTR_BORR_LEV_1 (0x2UL << FLASH_OPTR_BORR_LEV_Pos) /*!< 0x00000400 */
#define FLASH_OPTR_BORF_LEV_Pos (11U)
#define FLASH_OPTR_BORF_LEV_Msk (0x3UL << FLASH_OPTR_BORF_LEV_Pos) /*!< 0x00001800 */
#define FLASH_OPTR_BORF_LEV FLASH_OPTR_BORF_LEV_Msk
#define FLASH_OPTR_BORF_LEV_0 (0x1UL << FLASH_OPTR_BORF_LEV_Pos) /*!< 0x00000800 */
#define FLASH_OPTR_BORF_LEV_1 (0x2UL << FLASH_OPTR_BORF_LEV_Pos) /*!< 0x00001000 */And if I connect a Nucleo-U083 and look at STM32CubeProg (v2.19), I see this:

However, if I look in the STM32U0 reference manual (RM0503 Rev 2), I see this:


The header file and CubeProg suggest there are two bits (four levels) of BOR detection with a separate enable bit, but the reference manual suggests there are three bits of level with no separate enable. I'm inclined to believe the header file and CubeProg.
Is this an error in the reference manual?
Dana M.
