cancel
Showing results for 
Search instead for 
Did you mean: 

Nucleo 32 - Unable to reach high baud rates

Florian Knorr
Associate
Posted on May 27, 2018 at 03:21

Hello,

i am using a Nucleo 32 board with STM32L432KC chipset. I need to transfer data from a mems microphone over USB to the pc continuously. To do this i need a baud rate with at least 1.5Mbaud. The MCU is supporting baud rates up to 10Mbit, so it should be possible. On the pc side i am measuring the data rate. E. g. at 9200 Baud i get 920 Bytes per second (approx.) and this is true for higher baud rate till to some point where the number of bytes per sec. i receive is not increasing anymore.

42700 Bytes / sec. is the maximum i can reach. Why?

I used different cables, different USB ports, different Operating Systems and different software to measure the speed. Same result every time.

To communicate with the PCi have go talk with the onboard debugger chip that is connect via USB. I don'tknow what this chip is doingduring communication and if it is the bottleneck.

Code is very simple:

uint8_t* text = (uint8_t*)'012345678\n'; //This can be much bigger
while (1)
 {
 HAL_UART_Transmit(&huart2, text, strlen((char*)text), 0xffff);
}�?�?�?�?�?

Does anyone know what i am doing wrong?

Can someone maybe provide an example that is working with higher transfer rates?

Do i have to build my on circuit to get rid of path over the debugger chip?

1 ACCEPTED SOLUTION

Accepted Solutions
Florian Knorr
Associate
Posted on May 27, 2018 at 04:07

I made a big mistake by not upgrading the firmware on every Nucleo 32 i have. That seem so solve the problem and i can reach data rates up to 200 KB/s (2MBaud).

View solution in original post

2 REPLIES 2
Posted on May 27, 2018 at 03:52

I'm presuming you are talking end-to-end transport over the ST-LINK VCP.

Don't currently have the L432KC to hand, but seem to recall it going faster than that over the VCP, might be Tuesday before I can double check.

The L4 has prescaler settings for USARTs

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Florian Knorr
Associate
Posted on May 27, 2018 at 04:07

I made a big mistake by not upgrading the firmware on every Nucleo 32 i have. That seem so solve the problem and i can reach data rates up to 200 KB/s (2MBaud).