Cut and paste this URL to share the unmodified register and value:
https://regviz.com/r/Keil/AT32F403xx_v2/FLASH/CTRL2#0x0
Control 2 register
Flash program
Sector erase
Bank erase
Erasing start
Operation lock
Error interrupt enable
Operation done flag interrupt enable
https://github.com/cmsis-svd/cmsis-svd-data