puart cannot change baud rate

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

cross mob
Anonymous
Not applicable

Hi,

   I have just started using this product and I have a question, I am using version 2.1.0 of the SDK

I am trying to set the baud rate of the puart to 19200,  I have tried the following

const BLE_PROFILE_PUART_CFG hello_sensor_puart_cfg =

{

    /*.baudrate  =*/ 19200,  //115200,

   /*.txpin  =*/ GPIO_PIN_UART_TX,

  /*.rxpin  =*/ GPIO_PIN_UART_RX,

};

Does not work, baud rate is set to the default  of 115200

Tried

puart_cfg->baudrate = 9600;

puart_selectUartPads(puart_cfg->rxpin, puart_cfg->txpin, 0x00, 0x00);

puart_init();

Does not work, baud rate is set to the default of 115200.

The puart is operational as I can send and received characters without any errors but only at 115200.

Any help would be greatly appreciated.

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

Have you tried:

puart_init();

puart_setBaudrate(0,0,19200);

View solution in original post

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

The BCM2073x includes two sets of APIs that are available for the application: the low-level driver API and the high-level profile API.

I know that there is a code snippet within the HW USer's Manual that shows how to initialize the peripheral UART using the low-level driver API available in the WICED SDK: WICED Smart™ Hardware Interfaces

You might also want to take a look at the code snippet here that one of our developers provided to another user: Re: Long Data from UART

This includes some other functionalit you may/may not require, but it works and shows the PUART operating at 9600, which is the lowest rate available for the PUART.


Once you have this code working, you can adjust the rate up to 19200 and see if you run into any issues.

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

Have you tried:

puart_init();

puart_setBaudrate(0,0,19200);

Anonymous
Not applicable

Thanks to all who replied.....the solution now works.