QEIWRM Chapter 5.6 says - " The BRG clock frequency is half the QUICC Engine clock divided by this combined source-clock factor.", so what is 'combined source-clock factor', how can I get the value of it?
Thanks
Jia
Solved! Go to Solution.
Have a great day,
The BRG provides a divide-by-16 option (BRGCn[DIV16]) and a 12-bit prescaler (BRGCn[CD]) to divide the source clock frequency. As combined source-clock factor they mean the BRG division factor (D) i.e. ratio of BRG input and output clock frequencies. Its value is given by expression
If BRGCx[DIV16]=1 then D = 16*(BRGCx[CD] + 1)
If BRGCx[DIV16]=0 then D = BRGCx[CD] + 1
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Have a great day,
The BRG provides a divide-by-16 option (BRGCn[DIV16]) and a 12-bit prescaler (BRGCn[CD]) to divide the source clock frequency. As combined source-clock factor they mean the BRG division factor (D) i.e. ratio of BRG input and output clock frequencies. Its value is given by expression
If BRGCx[DIV16]=1 then D = 16*(BRGCx[CD] + 1)
If BRGCx[DIV16]=0 then D = BRGCx[CD] + 1
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi Serguei,
Thanks for reply!
The device tree file in linux defined 'brg-frequency', 'bus-frequency', I believe 'bus-frequency' denotes qe clock frequency, and I just want to get the correct value of 'brg-frequency'. Is 'BRG clock frequency' mentioned above equal to baud rate, such as 115200 in case of ucc_uart? What is the 'source clock frequency'? Is it derived from qe clock?
An comment in linux kernel @ucc_uart.c also says:
"Older versions of U-Boot do not initialize the brg-frequency property, so in this case we assume the BRG frequency is half the QE bus frequency."
I'm still confused anyway:-(
Thanks
Jia
Typically
- bus-frequency : the clock frequency for QUICC Engine
- brg-frequency : the internal clock source frequency for baud-rate generators in Hz.
Clock source is selected by BRGCx[EXTC]. If the BRGCLK is selected then it is half of the QE frequency (bus-frequency).