<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<memoryMap>
  <name>OptionBytes</name>
  <baseAddress>0x1FFF3100</baseAddress>
  <addressBlock>
    <offset>0x0</offset>
    <size>0x20</size>
  </addressBlock>
  <registers>
    <register>
      <name>OPTR</name>
      <description>User Option</description>
      <addressOffset>0x0</addressOffset>
      <resetValue>0x2755D8AA</resetValue>
      <fields>
        <field>
          <name>RDP</name>
          <description>Read protection option byte</description>
          <bitRange>[7:0]</bitRange>
          <options>
            <option Value="0xAA" Display="level 0, read protection disable" Default="1"/>
            <option Value="0x55" Display="level 1, read protection enable"/>
          </options>
        </field>
        <field>
          <name>IWDG_SW</name>
          <description>Independent watchdog</description>
          <bitRange>[11:11]</bitRange>
          <options>
            <option Value="0" Display="Hardware watchdog"/>
            <option Value="1" Display="Software watchdog" Default="1"/>
          </options>
        </field>
        <field>
          <name>WWDG_SW</name>
          <description>Window watchdog</description>
          <bitRange>[12:12]</bitRange>
          <options>
            <option Value="0" Display="Hardware watchdog"/>
            <option Value="1" Display="Software watchdog" Default="1"/>
          </options>
        </field>
        <field>
          <name>NRST_MODE</name>
          <description>NRST pin mode</description>
          <bitRange>[13:13]</bitRange>
          <options>
            <option Value="0" Display="Reset input only" Default="1"/>
            <option Value="1" Display="Standard GPIO pad functionality"/>
          </options>
        </field>
        <field>
          <name>nBOOT1</name>
          <description>BOOT1 value</description>
          <bitRange>[14:14]</bitRange>
          <options>
            <option Value="0" Display="Boot from Flash if BOOT0 = 0, otherwise Embedded SRAM"/>
            <option Value="1" Display="Boot from Flash if BOOT0 = 0, otherwise system memory" Default="1"/>
          </options>
        </field>
        <field>
          <name>IWDG_STOP</name>
          <description>IWDG stop mode option byte</description>
          <bitRange>[15:15]</bitRange>
          <options>
            <option Value="0" Display="Freeze IWDG counter in stop mode"/>
            <option Value="1" Display="IWDG counter active in stop mode" Default="1"/>
          </options>
        </field>
      </fields>
    </register>
    <register>
      <name>BORCR</name>
      <description>BOR Control</description>
      <addressOffset>0x8</addressOffset>
      <resetValue>0xFFE0001F</resetValue>
      <fields>
        <field>
          <name>BOR_EN</name>
          <description>BOR enable/disable option byte</description>
          <bitRange>[5:5]</bitRange>
          <options>
            <option Value="0" Display="BOR disable" Default="1"/>
            <option Value="1" Display="BOR enable"/>
          </options>
        </field>
        <field>
          <name>BOR_LEV</name>
          <description>These bits contain the supply level threshold that activates/releases the reset</description>
          <bitRange>[15:13]</bitRange>
          <options>
            <option Value="0" Display="BOR rising threshold 1.8 V, falling threshold 1.7 V" Default="1"/>
            <option Value="1" Display="BOR rising threshold 2.0 V, falling threshold 1.9 V"/>
            <option Value="2" Display="BOR rising threshold 2.2 V, falling threshold 2.1 V"/>
            <option Value="3" Display="BOR rising threshold 2.4 V, falling threshold 2.3 V"/>
            <option Value="4" Display="BOR rising threshold 2.6 V, falling threshold 2.5 V"/>
            <option Value="5" Display="BOR rising threshold 2.8 V, falling threshold 2.7 V"/>
            <option Value="6" Display="BOR rising threshold 3.0 V, falling threshold 2.9 V"/>
            <option Value="7" Display="BOR rising threshold 3.2 V, falling threshold 3.1 V"/>
          </options>
        </field>
      </fields>
    </register>
    <register>
      <name>WRPR</name>
      <description>Write Protection</description>
      <addressOffset>0x18</addressOffset>
      <resetValue>0x00000FFFF</resetValue>
      <fields>
        <field>
          <name>WRP0</name>
          <description>Write protection for 0x08000000 ~ 0x08001FFF</description>
          <bitRange>[0:0]</bitRange>
          <options>
            <option Value="0" Display="write protection enable"/>
            <option Value="1" Display="write protection disable" Default="1"/>
          </options>
        </field>
        <field>
          <name>WRP1</name>
          <description>Write protection for 0x08002000 ~ 0x08003FFF</description>
          <bitRange>[1:1]</bitRange>
          <options>
            <option Value="0" Display="write protection enable"/>
            <option Value="1" Display="write protection disable" Default="1"/>
          </options>
        </field>
        <field>
          <name>WRP2</name>
          <description>Write protection for 0x08004000 ~ 0x08005FFF</description>
          <bitRange>[2:2]</bitRange>
          <options>
            <option Value="0" Display="write protection enable"/>
            <option Value="1" Display="write protection disable" Default="1"/>
          </options>
        </field>
        <field>
          <name>WRP3</name>
          <description>Write protection for 0x08006000 ~ 0x08007FFF</description>
          <bitRange>[3:3]</bitRange>
          <options>
            <option Value="0" Display="write protection enable"/>
            <option Value="1" Display="write protection disable" Default="1"/>
          </options>
        </field>
        <field>
          <name>WRP4</name>
          <description>Write protection for 0x08008000 ~ 0x08009FFF</description>
          <bitRange>[4:4]</bitRange>
          <options>
            <option Value="0" Display="write protection enable"/>
            <option Value="1" Display="write protection disable" Default="1"/>
          </options>
        </field>
        <field>
          <name>WRP5</name>
          <description>Write protection for 0x0800A000 ~ 0x0800BFFF</description>
          <bitRange>[5:5]</bitRange>
          <options>
            <option Value="0" Display="write protection enable"/>
            <option Value="1" Display="write protection disable" Default="1"/>
          </options>
        </field>
        <field>
          <name>WRP6</name>
          <description>Write protection for 0x0800C000 ~ 0x0800DFFF</description>
          <bitRange>[6:6]</bitRange>
          <options>
            <option Value="0" Display="write protection enable"/>
            <option Value="1" Display="write protection disable" Default="1"/>
          </options>
        </field>
        <field>
          <name>WRP7</name>
          <description>Write protection for 0x0800E000 ~ 0x0800FFFF</description>
          <bitRange>[7:7]</bitRange>
          <options>
            <option Value="0" Display="write protection enable"/>
            <option Value="1" Display="write protection disable" Default="1"/>
          </options>
        </field>
        <field>
          <name>WRP8</name>
          <description>Write protection for 0x08010000 ~ 0x08011FFF</description>
          <bitRange>[8:8]</bitRange>
          <options>
            <option Value="0" Display="write protection enable"/>
            <option Value="1" Display="write protection disable" Default="1"/>
          </options>
        </field>
        <field>
          <name>WRP9</name>
          <description>Write protection for 0x08012000 ~ 0x08013FFF</description>
          <bitRange>[9:9]</bitRange>
          <options>
            <option Value="0" Display="write protection enable"/>
            <option Value="1" Display="write protection disable" Default="1"/>
          </options>
        </field>
        <field>
          <name>WRP10</name>
          <description>Write protection for 0x08014000 ~ 0x08015FFF</description>
          <bitRange>[10:10]</bitRange>
          <options>
            <option Value="0" Display="write protection enable"/>
            <option Value="1" Display="write protection disable" Default="1"/>
          </options>
        </field>
        <field>
          <name>WRP11</name>
          <description>Write protection for 0x08016000 ~ 0x08017FFF</description>
          <bitRange>[11:11]</bitRange>
          <options>
            <option Value="0" Display="write protection enable"/>
            <option Value="1" Display="write protection disable" Default="1"/>
          </options>
        </field>
        <field>
          <name>WRP12</name>
          <description>Write protection for 0x08018000 ~ 0x08019FFF</description>
          <bitRange>[12:12]</bitRange>
          <options>
            <option Value="0" Display="write protection enable"/>
            <option Value="1" Display="write protection disable" Default="1"/>
          </options>
        </field>
        <field>
          <name>WRP13</name>
          <description>Write protection for 0x0801A000 ~ 0x0801BFFF</description>
          <bitRange>[13:13]</bitRange>
          <options>
            <option Value="0" Display="write protection enable"/>
            <option Value="1" Display="write protection disable" Default="1"/>
          </options>
        </field>
        <field>
          <name>WRP14</name>
          <description>Write protection for 0x0801C000 ~ 0x0801DFFF</description>
          <bitRange>[14:14]</bitRange>
          <options>
            <option Value="0" Display="write protection enable"/>
            <option Value="1" Display="write protection disable" Default="1"/>
          </options>
        </field>
        <field>
          <name>WRP15</name>
          <description>Write protection for 0x0801E000 ~ 0x0801FFFF</description>
          <bitRange>[15:15]</bitRange>
          <options>
            <option Value="0" Display="write protection enable"/>
            <option Value="1" Display="write protection disable" Default="1"/>
          </options>
        </field>
      </fields>
    </register>
  </registers>
</memoryMap>
