cancel
Showing results for 
Search instead for 
Did you mean: 

Max data speed into STM32F4 Discovery via the STLink/V2

dannym
Associate II
Posted on June 27, 2012 at 01:07

I was looking to use the STM32F4 Discovery board as an output device which requires a significant bandwidth from the supporting PC.  I don't have specifics nailed down on this task, 115.2Kbaud might be sufficient but ''more would be better''.

I see the STLink offers some 2-way communication for ICD, but I don't know much about it.

Isn't the STLink just a virtual com port?  Can we run it at other speeds?  Or is it very limited for data transfer because it needs to retain the programming and debug capability?

Would it just make more sense to use the second USB port, configured as a generic HID and not a Host?  Again, what kind of bitrate could I expect to see?
5 REPLIES 5
Posted on June 27, 2012 at 02:17

Isn't the STLink just a virtual com port?

The last one I looked at was a Mass Storage Controller with a couple of overloaded SCSI commands.

The full speed USB is around 12 Mbps. The serial ports are easily capable of 460800 baud. Try hooking up a USB-to-CMOS Serial adapter (FTDI, SiLabs) to USART3 and give 921600 a spin.

The ST-Link connection on the Discovery board doesn't really provide much in the way of usable connectivity to the STM32F4 chip.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
dannym
Associate II
Posted on June 27, 2012 at 19:45

Wow does an FTDI/Silabs bridge really go up to nearly 1Mbit/sec?

There is a possible latency issue here, though.  I should have mentioned that.  The bridge chip's latency is a question mark, and it seems unnecessary, since there's that second (south) USB connection on the board which should function as a USB peripheral directly.  I saw a Silabs doc for the CP210x:

https://www.silabs.com/Support Documents/TechnicalDocs/an205.pdf

The 1msec timeout is listed, but that's not a latency.  That's saying if you send 10 bytes and DON'T fill the buffer but just pause with no data, it'll wait 1ms before sending the partial buffer.  That doesn't tell me how big the tx/rx buffers are, nor the transit delay.

The south USB port on the STM32F4 Discovery board, that is ''really fast'', correct?

Edit: Hmmm....

http://blog.gimx.fr/?p=102

Says with the Silabs CP2102 bridge on Linux he got 6.7ms latency as worst-case, and 5ms average.  That's not terrible.

Posted on June 27, 2012 at 21:04

The CP2101 is rated up to 921.6Kbps, with Rx/Tx buffers of 512 bytes, according to the data sheet.

I've used a number of USB adapters at 460800 to program micros in production, the one on my desk has a Prolific chip. You want to use CMOS level connectivity, as RS232 level converters filter at ~1Mbps.

The STM32F4-Discovery does not have an external PHY, so it doesn't do 480 Mbps, but 12 Mbps.

Reading from an SDHC card based Mass Storage Controller I'm seeing a read >800KBps (bytes not bits) on an STM32F2

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
dannym
Associate II
Posted on June 27, 2012 at 21:39

Which part is limited to 12Mbps?  The south USB?

Posted on June 27, 2012 at 23:12

Which part is limited to 12Mbps?  The south USB?

Unless I completely lost the plot here, CN5 is a FS (Full Speed) 12 Mbps connection.

CN1 isn't connected to the STM32F407VGT6 at all.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..