Increase BT UART speed

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

cross mob
Anonymous
Not applicable

Hi mdl

I'm using a BCM43341 WiFi/BT combo chip and have tried to increase the BT UART speed from 115200 without success.

I have tried the alternative bt_firmware_download in libraries/drivers/bluetooth/mfg_test/internal/firmware/bt_firmware.c

It calls a function called bt_host_update_baudrate that sends a HCI command to the controller, but after changing the baudrate, I'm never able to re-establish communication.

Is that code supposed to work?

We're still on 3.7. Have recently heard that our chip should be supported in 5.2 so we'll try that when we get our heads above water.

Cheers,

Magnus

0 Likes
4 Replies
AnjanaM_61
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 5 questions asked

Hi Magnus,

Can you please confirm after sending the update baudrate command, are you reconfiguring your uart with the updated baudrate?

Did you tested in the latest SDK version?

Thanks,

Anjana

0 Likes

I don't get your point.

The uart baudrate reconfigration is done in bt_host_update_baudrate().

However, if you look at bt_firmware_download() you will notice bt_host_update_baudrate() will only be called if wiced_bt_config.featured_baud_rate == BAUDRATE_3MBPS.

Why having that checking? Does that mean it won't work with other baudrate?

0 Likes
user_108962310
Level 4
Level 4
10 likes received 10 likes given 5 likes given

I found this post when I was trying to bring up the bt_mfg_test project on a 4343W radio in SDK 5.1, so I'll add my fix for anyone else searching:

It looks like there are two separate implementations of bt_firmware_download, one in libraries/protocls/wiced_hci/bt_firmware.c and a separate one in libraries/drivers/bluetooth/mfg_test/internal/firmware/bt_firmware.c .

The one in the drivers/bluetooth/mfg_test/internal/firmware path appears to be the one being built when building bt_mfg_test.
In that implementation, there is clearly the code:

/* TODO : Eventually we will be using the patchram_download_baudrate variable from the platform file. */

/* update BT and host to switch to 3mbps */

if ( bt_host_update_baudrate( BAUDRATE_3MPBS ) == WICED_BT_SUCCESS )

{

     fast_download = WICED_TRUE;

}

In my case, commenting out that code made the bt_mfg_test work correctly.
This makes sense, as if the BT HCI UART is being put into 3MBPS mode, but the application expects it to be at 115200 and it is not set back, then the communication would appear dead.

I came across this bug by hitting a failure to download the BT HCI firmware bt_mfgtest_start.

0 Likes

Andrew Pullin wrote:

/* TODO : Eventually we will be using the patchram_download_baudrate variable from the platform file. */

/* update BT and host to switch to 3mbps */

if ( bt_host_update_baudrate( BAUDRATE_3MPBS ) == WICED_BT_SUCCESS )

{

     fast_download = WICED_TRUE;

}

In my case, commenting out that code made the bt_mfg_test work correctly.

Above code only has impact on the case if the baudrate is BAUDRATE_3MPBS.

However, comment out that code actually means it did not change the baudrate at all.

i.e. As the original reported issue: not able to increase BT URART speed.

0 Likes