2018-05-26 06:21 PM
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?
Solved! Go to Solution.
2018-05-26 07:07 PM
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).
2018-05-26 06:52 PM
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
2018-05-26 07:07 PM
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).