Peripheral UART specification - few questions

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

cross mob
MiTo_1583836
Level 5
Level 5
50 likes received 25 likes received 10 likes received

Hi,

Is it possible to clarify the following statement in the datasheet of the 20737x under Peripheral UART:

"Both high and low baud rates can be supported by running the UART clock at 24 MHz."

What are "high baud" and "low baud" rates in that case? I see the two statements being referenced only once in the documentation.

Also reading the code of the driver (puart.h) I see:

/// Some useful default constants used by teh driver.

enum

{

    P_UART_CLK                                 = 24000000,

    P_UART_SAMPLE_CLOCK                        = 16,

    DEFAULT_P_UART_BAUDRATE                    = 115200,

    DEFAULT_P_UART_HWFLOWCONTROLWATERMARK      = 13,     // Peer flow off waterline

    DEFAULT_P_UART_MIN_PKT_LENGTH              = 1

};

Is it possible to increase the DEFAULT_P_UART_BAUDRATE? (the P_UART_CLK is running at 24MHz).

Is this P_UART_CLK inherited from the Bluetooth baseband? why do we have such a high freqency when the baud rate seems to be limited to 115,2Kbps ?

Thanks,

0 Likes
1 Solution

The peripheral UART block can be configured to any non-traditional baud rates too (so use 1000000 if you want exactly 1M). Just use puart_setBaudrate(0,0,1500000); for 1.5M and it should work. When transmitting only, you may be able to go up to 3M (please check the datasheet for the exact numbers).

View solution in original post

5 Replies
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

The PUART supports baud rates between 9600 and 115200.

This thread provides some sample code which demonstrates how to set the baud rate: puart cannot change baud rate

0 Likes
asridharan
Employee
Employee
10 comments on KBA 5 comments on KBA First comment on KBA

DEFAULT_P_UART_BAUDRATE is the baud rate you get when you don't configure the peripheral UART and use it to TX/RX. The HW supports a baud rate of ~1.5M, use puart_setBaudrate() to change from the dafault. P_UART_CLK is the reference clock to the HW block.

Thanks arvinds this is a great piece of information.

0 Likes

Thanks Arvinds, this is helpful.  The knowledge of most folks familiar with UARTs ends at 115200bps with some superstars even pushing the envelop to 230400....   

Traditionally, the rates are 9600, 14400, 19200, 38400, 57600, 115200, 230400, 460800, 921600

The next traditional rate would be 1,843,200bps....... but this violates the ~1.5M that is claimed.

I don't see an enumeration of what data rates are supported in the code (everything defaults to 115200).   Can you enlighten us what's beyond the 921600 and how to configure for it?   (maybe the datasheet is in error and 1.8Mbps is the actual limit)

Thanks.

The peripheral UART block can be configured to any non-traditional baud rates too (so use 1000000 if you want exactly 1M). Just use puart_setBaudrate(0,0,1500000); for 1.5M and it should work. When transmitting only, you may be able to go up to 3M (please check the datasheet for the exact numbers).