How to calculate the clock of UART

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to calculate the clock of UART

ソリューションへジャンプ
1,196件の閲覧回数
chengwu
Contributor I

Dear all,

I have an i.MX53 evk board and a standard BSP for the board, now I want to know how to calculate the frequnce of the UART & DDR, for example, there may be some registers in CCM & PLL modules specify the frequence, can anyone tell me what's the registers and how to calculate the frequence? Thank you very much.

ラベル(1)
0 件の賞賛
返信
1 解決策
1,031件の閲覧回数
AnsonHuang
NXP Employee
NXP Employee

Hi, Chengwu

     You need to read register CCM_CSCMR1[25-24] to see what is the UART's clock source, PLL1 or PLL2 or PLL3 or LPAPM, then you need to read these PLLx's register to see what are their frequence. For PLL, there is formula to calculate their freq, in RM chapter 21.3.2.4. For LPAPM, it should be 24MHz from OSC, you need to see CCM_CCSR[10] to see whether it is from OSC or PLL4. Then you will know what is the freq of UART. But, you need to be aware of there is divider in CCM_CSCDR1 for UART, PRE and PODF, you need to divided both PRE and PODF divider. The BSP should already support reading such clock's rate directly from clk API, clk_get_rate, you can just call it to get UART's rate.

     Same for DDR, first, get its parent's freq, then div by its divider, you can look up register description in CCM chapter.

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,032件の閲覧回数
AnsonHuang
NXP Employee
NXP Employee

Hi, Chengwu

     You need to read register CCM_CSCMR1[25-24] to see what is the UART's clock source, PLL1 or PLL2 or PLL3 or LPAPM, then you need to read these PLLx's register to see what are their frequence. For PLL, there is formula to calculate their freq, in RM chapter 21.3.2.4. For LPAPM, it should be 24MHz from OSC, you need to see CCM_CCSR[10] to see whether it is from OSC or PLL4. Then you will know what is the freq of UART. But, you need to be aware of there is divider in CCM_CSCDR1 for UART, PRE and PODF, you need to divided both PRE and PODF divider. The BSP should already support reading such clock's rate directly from clk API, clk_get_rate, you can just call it to get UART's rate.

     Same for DDR, first, get its parent's freq, then div by its divider, you can look up register description in CCM chapter.

0 件の賞賛
返信
1,031件の閲覧回数
chengwu
Contributor I

Hi,Yongcai Huang

Thank you very much.

0 件の賞賛
返信
1,030件の閲覧回数
AnsonHuang
NXP Employee
NXP Employee

Hi,

     If you do NOT have any question, can you please check the correct answer and close this topic? If you still have question, please let me know.

0 件の賞賛
返信