我想用内部晶振将总线频率调到高于8M(手册上说范围是4 MHz < fBus < 20 MHz,见datasheet page110 Table 7-4. ICG Configuration Consideration,有的资料说只能到8M),不知道怎么配置(该调那几个参数)。另外手册上说“After the MCU is released from reset, the ICG is in self-clocked mode (SCM) and supplies approximately
8 MHz on ICGOUT which corresponds to a 4 MHz bus frequency (fBus).”(见page114最后两行)我写了如下代码:
void main(void)
{
system_initialize();
EnableInterrupts;
PTFDD = 0xff;
for(;;)
{
PTFD = 0x00;
asm
{
NOP;
NOP;
NOP;
NOP;
}
PTFD = 0xff;
for(i=0;i<200;i++)
{
}
__RESET_WATCHDOG();
}
}
以求得到宽度1us的负脉冲,实际测量却是2us,4 MHz bus frequency ,4个NOP (1s/4M)*4=1us,不对吗?没想通,请大家点拨点拨我吧,虽然愚钝但想把它弄通。 |