cancel
Showing results forÂ
Search instead forÂ
Did you mean:Â

# WICED Studio Bluetooth

New Contributor II

## CYBT-333032 / how to calculate the baud rate error

Jump to solution

Hello Cypress,

https://community.cypress.com/t5/WICED-Studio-Bluetooth/CYBT-343026-UART-baud-rates/m-p/51281
Another person has already been asked in this thread, but there is no answer.

Please tell me how to calculate the baud rate error dut to use a custom baud rate not on a table.

Thanks,
Manabu

1 Solution
Moderator

## Re: CYBT-333032 / how to calculate the baud rate error

Jump to solution

If the baud rate is higher than 1.5M, the dlbr is used as a direct divider.

For example, if you choose 3M, then dlbr will be (0x100-0x8), the baud rate is 24/8M.

If the baud rate is lower than 1.5M, then the dlbr is used for 16* divider and the dhbr is used for 1* divider. There are two parts for dhbr, the high 4-bits and low 4-bits.

For example, if you need a 1M baud rate, dlbr is (0x100-1) and dhbr is 0x44. It means the baud rate is 24/(16+4+4)M.

For your question, if you choose 2625000, then the dhbr will be (0x100-0x9), the actual baud rate should be 2666666.

4 Replies
Moderator

## Re: CYBT-333032 / how to calculate the baud rate error

Jump to solution

As you can see from the description in the datasheet, the UART baudrate is divided from 24M clock.

It can be divided by any integer from 24M.

For example, if you need a 921600 baudrate, it is 24M/26=923076 and the error is 0.16%.

New Contributor II

## Re: CYBT-333032 / how to calculate the baud rate error

Jump to solution

Hello Owen,

Please explain about DHBR / DLBR resistor.

From your attachment, I think DLBR will be used if it is not divisible by 24(48)MHz.
What kind of calculation is used to determine UART clock(24/48MHz) / DHBR / DLBR from the baud rate set by "wiced_uart_transport_cfg_t" ?

For example, How to calculate the baud rate error when 2,625,000bps is specified in "wiced_uart_transport_cfg_t"?

Thanks,
Manabu

Moderator

## Re: CYBT-333032 / how to calculate the baud rate error

Jump to solution

If the baud rate is higher than 1.5M, the dlbr is used as a direct divider.

For example, if you choose 3M, then dlbr will be (0x100-0x8), the baud rate is 24/8M.

If the baud rate is lower than 1.5M, then the dlbr is used for 16* divider and the dhbr is used for 1* divider. There are two parts for dhbr, the high 4-bits and low 4-bits.

For example, if you need a 1M baud rate, dlbr is (0x100-1) and dhbr is 0x44. It means the baud rate is 24/(16+4+4)M.

For your question, if you choose 2625000, then the dhbr will be (0x100-0x9), the actual baud rate should be 2666666.

New Contributor II

## Re: CYBT-333032 / how to calculate the baud rate error

Jump to solution

Hello Owen,

I understand that use the baud rate of 24M divided by an integer, the error is minimized.

Thank you.
Manabu