智能车制作

标题: K60F 120/150MHz系列单片机频率设置与K60D系列有较大不同 [打印本页]

作者: waterbright    时间: 2013-3-24 23:50
标题: K60F 120/150MHz系列单片机频率设置与K60D系列有较大不同
为了浮点数运算买了块k60fx512的芯片,系统频率设置出来恰好是预设值的一半,颇为郁闷……
去飞思卡尔官方社区终于找到问题所在,原来是这类120/150M单片机多了个自动的二分频,着实让人无语。
另外,120/150M单片机的pll设置底层与K60D 100M系列有些不同,可参考官方源代码,貌似我不能上传附件啊,需要的话自行去这里下载KINETIS_120MHZ_SC吧:http://www.freescale.com/zh-Hans/webapp/sps/site/prod_summary.jsp?code=K60_120&nodeId=01624698C9DE2DDDAF&fpsp=1&tab=Design_Tools_Tab

下面是来自https://community.freescale.com/thread/110760的相关说明:

I would check carefully the valid frequency ranges when using the K60/K70 120 or 150MHz FPU part since they are different to the K60 100M parts, for example.


Whereas the K60 100MHz part can divide the 50MHz clock first down to 2MHz (it needs 2MHz..4MHz) this is not in the valid frequency range for the K70 120MHz/150MHz, which requires it to be between 8 and 16MHz.

The K70 120M/150M parts also have an extra divide at the output of their VCO.


To run the K70 120MHz part at its maximum 120MHz system speed and generate 48MHz for USB the typical method is to divide the 50MHz PHY clock by 5 to 10MHz. Then multiply this by 24 to get 240MHz VCO output frequency (must be between 180MHz and 360MHz). The VCO output is automatically divided by 2 to give a 120MHz system clock.


Using the MCGPLL0CLK as source to derive the USB clock it requires a divide value of 4 in the SIM's CLKDIV2 setting with fractional flag set. That is 0x00000009 -> 120MHz * 2/(5) = 48MHz.


Regards


Mark



作者: fmadot    时间: 2013-3-25 01:49
多谢
作者: 奋斗小青年、    时间: 2013-3-25 03:12

作者: 洋葱圈    时间: 2013-3-25 09:02
MK60F系列的MCG寄存器和D是有区别的,不能直接套用。
作者: weltry    时间: 2014-2-27 21:31
洋葱圈 发表于 2013-3-25 09:02
MK60F系列的MCG寄存器和D是有区别的,不能直接套用。

那我直接把官方的固件库替换掉  还是可以直接用你们的底层库的吧
作者: 洋葱圈    时间: 2014-2-27 21:34
weltry 发表于 2014-2-27 21:31
那我直接把官方的固件库替换掉  还是可以直接用你们的底层库的吧

try it~

作者: 南宫封枫    时间: 2014-3-1 11:09
洋葱圈 发表于 2014-2-27 21:34
try it~

你好,请教一个问题,v2固件库中是不是没有编写正交解码部分的代码啊。。谢谢

作者: 洋葱圈    时间: 2014-3-1 23:02
南宫封枫 发表于 2014-3-1 11:09
你好,请教一个问题,v2固件库中是不是没有编写正交解码部分的代码啊。。谢谢

没有,用V3库

作者: Riot_Kobs    时间: 2014-3-4 20:23
我用的是野火的库能不能修改?是只替换几个官方库函数就好了嘛?
作者: yandld    时间: 2014-3-13 09:32
150M很多东西和以前的100/120不同,尤其MCG,Chip Configuration 系统内联等设置。用过的时候小心。




欢迎光临 智能车制作 (http://www.znczz.com/) Powered by Discuz! X3.2