我现在在调试FLASH保护,想先弄清楚这个吧: 使用的是STR7X的库.
FLASH_WritePrConfig(0x03,ENABLE); //保护Bank 0 sectors 1-0. FLASH_WritePrConfig(0x03,DISABLE); //解除
结果查看FLASH_NVWPAR寄存器发现保护的扇区解除不了,这是什么原因?
下面的话怎么解释: The first time you program FLASH_NVWPAR or FLASH_NVAPR0 both the non-volatile and volatile part of the register are written. At any later stage, any write to these registers will affect only the volatile part, which will be restored with the content of the corresponding nonvolatile part at the next reset event.
|