Configuration of fractional divider : UART

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
WonjinHan
Level 5
Level 5
Distributor
50 questions asked 100 sign-ins 50 replies posted

Dears.

Now I’m taking the test with software logic analysis of Traveo II SDL 6.6.0 on CYTVII-B-E-176-SO.

In UART(115200Baud rate) clock part, I don’t understand the following code to configure the fractional divider.

uint64_t targetFreq     = UART_OVERSAMPLING * boadrate;

        uint64_t sourceFreq_fp5 = ((uint64_t)sourceFreq << 5ull);

        uint32_t divSetting_fp5 = (uint32_t)(sourceFreq_fp5 / targetFreq);

       Cy_SysClk_PeriphSetFracDivider(CY_SYSCLK_DIV_24_5_BIT, 0ul, ((divSetting_fp5 & 0x1FFFFFE0ul) >> 5ul), (divSetting_fp5 & 0x0000001Ful));

Could you give me your explanation or tips to clearly understand it?

Br,

WonjinHan.

0 Likes
1 Solution
WonjinHan
Level 5
Level 5
Distributor
50 questions asked 100 sign-ins 50 replies posted

Dear all.

I clearly understood it from Architecture Technical Reference and Appliation Note as the following.

CLK_PERI Frequency = 80MHz
115200 * 8 = Input Clock = 921600

DIV24.5 = 80MHz / 921600 = 86.805

Fractional Divider
Integer : 86 ,   Fractional : 25

Thank you.

WonjinHan.

View solution in original post

0 Likes
1 Reply
WonjinHan
Level 5
Level 5
Distributor
50 questions asked 100 sign-ins 50 replies posted

Dear all.

I clearly understood it from Architecture Technical Reference and Appliation Note as the following.

CLK_PERI Frequency = 80MHz
115200 * 8 = Input Clock = 921600

DIV24.5 = 80MHz / 921600 = 86.805

Fractional Divider
Integer : 86 ,   Fractional : 25

Thank you.

WonjinHan.

0 Likes