soc(二) 时钟

  • 时钟与soc的关系
时钟为soc的各个组件提供统一步调.原理是什么?
	关键词:D触发器,flip-flop
	https://www.cnblogs.com/PengfeiSong/p/6348093.html
	https://blog.csdn.net/weixin_38440112/article/details/70543982
	https://blog.csdn.net/beeka/article/details/50240565
	http://www.360doc.com/content/16/0419/07/908538_551811235.shtml
	https://blog.csdn.net/weixin_34111819/article/details/93275151
	https://www.zhihu.com/question/360077496/answer/929824757
	https://www.zhihu.com/question/21981280
	https://www.zhihu.com/question/53019975
	CPU大部分由数字同步逻辑组成,可以看作成某种意义上的流水线.
	Flop保持数据,逻辑门处理数据;处理好了传递给下一个人。
	逻辑门处理数据需要一定时间,在这个时间里,要Flop要保持数据的稳定性。
	这个过程需要Clock这个节奏器来同步,来告诉Flop啥时候可以接受新的从上面一个人那里传来的数据,来给自己的逻辑门处理.
各个组件时钟频率相同吗?如果不同怎么协调?
	sram 与 cpu 频率一致
	如果不同,一般中间加个控制器就行了
时钟一般在 soc 中表现为什么?
  * 外部直接输入时钟信号,SoC有个引脚用来输入外部时钟信号,用的很少。
  * 外部晶振+内部时钟发生器产生时钟,大部分低频单片机都是这么工作的。
  * 外部晶振+内部时钟发生器+内部PLL产生高频时钟+内部分频器分频得到各种频率的时钟,210属于这种。

soc实例中的时钟

  • cortex-m
时钟供给分类
	外部时钟
		外部高速时钟 // HSE
			– external 4-to-26 MHz crystal oscillator // 需要外接
		外部低速时钟 // LSE
			LSE OSC 32.768K
	内部时钟
		内部高速时钟 // HSI
			– Internal 16 MHz factory-trimmed RC (1% accuracy)
			The wakeup times given in Table 25 is measured on a wakeup phase with a 16 MHz HSI RC oscillator. 
		外部高速时钟
			– Internal 32 kHz RC with calibration
				– 32 kHz oscillator for RTC with calibration // 供独立看门狗和自动唤醒单元使用

时钟倍频分频
	PLL

启动时的时钟配置
	On reset the 16 MHz internal RC oscillator is selected as the default CPU clock. 
	The 16 MHz internal RC oscillator is factory-trimmed to offer 1% accuracy over the full temperature range. 
	
	The application can then select as system clock either the RC oscillator or an external 4-26 MHz clock source. 
	
	This clock can be monitored for failure. If a failure is detected, the system automatically switches back to the internal RC oscillator and a software interrupt is generated (if enabled). This clock source is input to a PLL thus allowing to increase the frequency up to 168 MHz. 

cpu的频率
	frequency up to 168 MHz
  • s2c2440
OM[3:2] 配置 Clock Source Selection at Boot-Up
  • i.mx6ull
晶振经 OSC(振荡器之后) ,经 时钟产生器, 产生时钟,然后经过CCM,经过 LPCG 产生各个模块的时钟

在这里插入图片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章