先说注意点
1、写之前的第一步是要先解锁flash,解锁后最好清除下所有的flag,然后是擦除操作,然后是写,最后写完加锁保护flash。写有个写双字库函数(FLASH_ProgramDoubleWord)不能用,因为没有外部Vpp,怎么才有外部Vpp看点3。
2、flash擦除的最小单位是扇区。
3、flash擦除操作正常情况下使用电压使用VoltageRange_3就行,只所以不使用VoltageRange_4如下:
VoltageRange_4: when the device voltage range is 2.7V to 3.6V + External Vpp,
the operation will be done by double word (64-bit)