请教下各位大佬为何ch32f103r8 快速擦写失败代码如下
FLASH_Unlock();
while(FLASH->CTLR&0x01<<7)
while(FLASH->STATR&0x01);
FLASH->MODEKEYR=0x45670123;
FLASH->MODEKEYR=0xCDEF89AB;
while(FLASH->CTLR&0x01<<15)
FLASH->CTLR|=0x01<<17;
FLASH->ADDR=addr;
FLASH->CTLR|=0x01<<6;
while(!(FLASH->STATR&(0x01<<5)));
FLASH->STATR|=(0x01<<5);
FLASH->CTLR&=~(0x01<<17);
热门产品 :
CH397: 高集成度、低功耗USB网卡芯片