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

cross mob
chwa_1570756
Level 4
Level 4
25 sign-ins 25 replies posted 10 replies posted

Hello,

I need a 2.5Mbps baudrate of UART and set it with the code below:

UART_Stop();

clk_divide = 40000000/2500000/8-1;     //the oversampling of 8 has been set in UART component

UART_SCBCLK_SetFractionalDividerRegister(clk_divide, 0u);

UART_Start();

But it seems not work, the max. baudrate can be selected in UART component is 921600 bps,

Can UART's baudrate is set as 2.5Mbps?

Regards,

Chris

0 Likes
1 Solution

If you choose SCB based UART component, you can try to check "Clock from terminal" checkbox, then you can drag a 'Clock' component and connected it to UART clock terminal, then the actual baud rate of UART is only decided by the Clock freq you provided to UART component and oversampling parameter(can be configured in UART component),  for example if clock = 12MHz, oversampling = 12, then actual uart baud rate = 12MHZ/12 = 1Mbps.  You can config clock freq and oversampling value to increase the baud rate to 2.5MHz。  I don't know if SCB based UART can such high baud rate(datasheet say the maximum is 1Mpps), but you can try it.

If you choose UDB based UART, i think 2.5Mpbs is not a problem, but you need to choose "External Clock" under Advanced tab, drag a 'Clock' component and connected it to UART clock terminal, the clock freq decides the actual baud rate of UDB UART component ( baud rate = clock freq/8).

View solution in original post

0 Likes
4 Replies
Vison_Zhang
Moderator
Moderator
Moderator
750 replies posted 250 sign-ins 250 solutions authored

Which PSoC4 part number you used by now?

0 Likes

I use KIT-042(CY8C4245AXI-483)to test it, and will use CY8C4246AZI-L423 in my product.

0 Likes

If you choose SCB based UART component, you can try to check "Clock from terminal" checkbox, then you can drag a 'Clock' component and connected it to UART clock terminal, then the actual baud rate of UART is only decided by the Clock freq you provided to UART component and oversampling parameter(can be configured in UART component),  for example if clock = 12MHz, oversampling = 12, then actual uart baud rate = 12MHZ/12 = 1Mbps.  You can config clock freq and oversampling value to increase the baud rate to 2.5MHz。  I don't know if SCB based UART can such high baud rate(datasheet say the maximum is 1Mpps), but you can try it.

If you choose UDB based UART, i think 2.5Mpbs is not a problem, but you need to choose "External Clock" under Advanced tab, drag a 'Clock' component and connected it to UART clock terminal, the clock freq decides the actual baud rate of UDB UART component ( baud rate = clock freq/8).

0 Likes

Yes, when I transfer to UDB based UART, it can work at 2.5M baud rate.

0 Likes