Cut and paste this URL to share the unmodified register and value:
https://regviz.com/r/Keil/AT32F407xx_v2/FLASH/STS3#0x0
Status 3 register
Operate busy flag
program error
Erase/program protection error
Operate done flag
https://github.com/cmsis-svd/cmsis-svd-data