请教:AW60外部晶震是4M,BUSCLK是不是就是4M啊?谢谢。[求助]

- UID
- 153886
- 性别
- 男
|
请教:AW60外部晶震是4M,BUSCLK是不是就是4M啊?谢谢。[求助]
TPM2MODH=0xf4; //
TPM2MODL=0x24; //
(void)(TPM2SC == 0);
TPM2SC = 0x4E;
上面的设置为什么是1S的定时呢?
|
|
|
|
|
|
 
- UID
- 104380
- 性别
- 男
|
若直接采用外部4M晶振为时钟源,则总线频率为2M。关键是你的ICG的设置是怎样的,总线频率要由它决定。 |
|
|
|
|
|

- UID
- 153886
- 性别
- 男
|
ICGC1 = 0x00;
ICGC2 = 0x00;
ICGS1 = 0x00;
ICGS2 = 0x00;
---------------------------- |
|
|
|
|
|
 
- UID
- 104380
- 性别
- 男
|
你采用的是自时钟模式,此时DCO自由振荡,ICG输出频率大概是8M,总线频率约4M。 |
|
|
|
|
|

- UID
- 153886
- 性别
- 男
|
我定时一秒,但和秒表比,时间越来越快。
是不是DCO自由振荡,频率不精确?
谢谢。 |
|
|
|
|
|

- UID
- 153886
- 性别
- 男
|
TPM2MODH=0x7a; // 1s
TPM2MODL=0x12; // |
|
|
|
|
|
 
- UID
- 104380
- 性别
- 男
|
|
|
|
|
|