SW_Tx_UART baud rate tolerance for PSoC4S

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

cross mob
YoIs_1298666
Level 5
Level 5
250 sign-ins 100 replies posted 100 sign-ins

Hello,

We would like to know about SW_Tx_UART baud rate tolerance.

pastedImage_0.pngpastedImage_1.png

In case of UART(SCB mode)  default oversamping(12) for IMO 24MHz, the tolerance from 115200bps is from 0.08% to 4.17%.

We hope it between about +/-2%.

pastedImage_2.png

So, we should set oversampling value to 16.

pastedImage_3.png

In case of SW_TX_UART for IMO 24MHz, what about this case?

Best regards,

Yocchi

0 Likes
1 Solution
RyanZhao
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Hello YoIs_1298666,

SW_TX_UART uses software to simulate UART Tx(Not RX). There is no requirement to sample transmitted data from outside and it uses GPIO Write to send data out. So Over Sampling  is not used in  SW_TX_UART.

In case of SW_TX_UART for IMO 24MHz, as per its datasheet, the error could be:

pastedImage_0.png

Assume baud rate is set as 115200,

Divider can be calculated out: (int)(24000000+(115200/2))/115200 = (int)208.

So, actual baud rate could be: 24000000/208 = 115384.6 +/- 2%. The result is similar with the second table(Over Sampling = 16) you showed in the thread.

View solution in original post

0 Likes
2 Replies
RyanZhao
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Hello YoIs_1298666,

SW_TX_UART uses software to simulate UART Tx(Not RX). There is no requirement to sample transmitted data from outside and it uses GPIO Write to send data out. So Over Sampling  is not used in  SW_TX_UART.

In case of SW_TX_UART for IMO 24MHz, as per its datasheet, the error could be:

pastedImage_0.png

Assume baud rate is set as 115200,

Divider can be calculated out: (int)(24000000+(115200/2))/115200 = (int)208.

So, actual baud rate could be: 24000000/208 = 115384.6 +/- 2%. The result is similar with the second table(Over Sampling = 16) you showed in the thread.

0 Likes

If you are using the WCO in your system, you could use it to trim the IMO, which might drop the accuracy of the IMO from 2% to 0.2%.