dsp study notes 2- clock and control system

1 ,. system clock source:

The clock signal for the microcontroller is very important, it provides a stable working machine cycle of the microcontroller such that the system is functioning properly. Clock system like the human heart, if there is a problem of the whole system would collapse. We know that belong DSP digital signal processor, it can be said is an advanced single-chip, to work it must also provide the clock signal. The source of the clock signal is generated by a clock signal (referred to as the clock source), here we have to analyze the internal clock circuit F28335. as the picture shows:

 

We introduced according to the drawing reference numeral sequence, can be seen from the figure, the clock source F28335 in two ways:
(1) an external oscillator as a clock source (referred to as the external clock), providing a constant frequency clock pin in XCLKIN signal, X1 may also be provided by a pin multiplexing, i.e., introduced by an external oscillator or other digital systems.
(2) The F28335 internal oscillator as a clock source (the internal clock), a connection between the crystal X1 and X2 pins can generate a clock source.
An external clock source signal ① There are two access methods, respectively, for the voltage of 3.3V and 1.9V external clock external clock.
(A) access the external clock signal 1, i.e. the external clock 3.3V. 7.1.2 As shown below:

3.3V XCLKIN direct access to an external clock signal pin, the X1 pin is connected to GND, X2 pin floating system the system can not exceed VDDIO high, i.e., 3.3V.
(B) 2 access the external clock signal, i.e. an external clock of 1.9V. 7.1.3 As shown below:

1.9V direct access to the external clock signal X1 pin, the XCLKIN pin is connected to GND, X2 pin floating, the system can not exceed the VDD high level, i.e., 1.9V.
② internal clock signal source connection shown in FIG. 7.1.4:

 

从上图可以看到 XCLKIN 引脚接地, X1 和 X2 引脚间接入了一个晶振。在实际的应用中, 我们一般不采用外部振荡器方式, 直接采用内部振荡器的方式更多一些。典型的接法是在 X1 和 X2 引脚间接入一个 30MHz 晶振,选择 30MHZ晶振是因为若直接采用更高频率晶振, 不仅价格会上升, 而且晶振电路还需要做EMC 处理, 即需要设计特殊的晶振电路, 而 30MHZ 晶振目前是比较容易获取的。
(3) 我们知道 F28335 工作的最高主频是 150MHz, 但实际提供的晶振是30MHZ, 我们希望 CPU 能工作在最高主频上, 这时怎么能让这 30M 转变成 150M供 CPU 工作呢? 这就需要提到 F28335 内部的 PLL 锁相环了。 从上图可以看到,内部信号时钟源与外部信号时钟源通过异或门后选择接入成为 OSCCLK 即振荡器时钟信号, 该信号受到寄存器 PLLSTS(OSCOFF) 位控制, 该位置 1 即开关合上,振荡器信号允许通过, 然后分两路传输, 一路直接过去, 另一路经过 PLL 锁相环模块。 一般不能直接使用 OSCCLK 信号, 该信号的频率是由石英晶体产生, 频率不够高, 需要进入锁相环倍频和分频后才能使用, 所以要使能 PLL 锁相环, 即对寄存器 PLLSTS(PLLOFF) 位控制。 使能后通过寄存器 PLLCTR 来设置倍频数, 倍频值最大可设置为 10, 通常我们就设置倍频数为10, 这样通过 PLL 后的时钟信 号 VCOCLK 即为 300MHZ。 因为 F28335 芯片最高工作频率是 150MHZ, 所以此时还不能直接 CPU 内核使用, 还需要对其分频处理, 可通过寄存器 PLLSTS(DIVSEL)
位来设置分频系数, 为了使 CPU 工作在最高频率下, 通常设置分频系数为 2, 即最终时钟信号 CLKIN 为 150MHZ 供给 CPU。

 

Guess you like

Origin www.cnblogs.com/caiya/p/11097707.html