| 最近用MSP430F149做项目,发现一个奇怪的问题,我看官方的flash时钟范围在 Write and erase operations are controlled by the flash timing generator shown
 in Figure 5−3. The flash timing generator operating frequency, f (FTG) , must be
 
 in the range from ~ 257 kHz to ~ 476 kHz (see device-specific datasheet).
 
 
 
 但问题是选择的时钟是MCLK(8M),二分频竟然成功了,如果按照官方的文档要求,那需要配置24分频才对。希望知道原因的朋友帮忙解释下,下面是我的测试代码
 
 
 
 
 for(i=0;i<10;i++)
 
 {
 
 flash_erase((uint8*)0x1080);//擦除指定地址flash
 
 flash_write((uint8*)0x1080, &i, 1);//向某flash地址写入数据
 
 flash_read((uint8*)0x1080, &data2, 1,1);//从flash中特定地址读取数据
 
 if(i==data2)
 
 {
 
 printf("ok\n");
 
 
 
 }
 
 else
 
 {
 
 printf("error\n");
 
 
 
 }
 
 }
 
 
 
 
 
 void bsp_flash_init(void)//片上flash初始化
 
 {
 
 FCTL2 = FWKEY + FSSEL_1+FN3+FN4;// FN0; // MCLK/2 for Flash Timing Generator
 
 }
 |