/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / STM32F103xx performance enough for this application?

Username:     
Password:     
             

Forum

# 1   2010-01-24 21:30:52 STM32F103xx performance enough for this application?

Bernd06
New member
Registered: 2010-01-24
Posts: 2

STM32F103xx performance enough for this application?

Hi

is it possible with this processor family to transmit 4x 64Bytes (4 different endpoints) within every 1ms?

The application includes one SPI touch controller Ad7843, one encoder wheel and three buttons - alle these user inputs should be updated via the usb every 1ms. So that the host system running at a atom processor is able to provide the next steps if for example a user has pressed a button or touched the screen...

Is this possible with such an controller, or do I have to use an ARM9 controller???

Thank you in advance for every information about this topic

best regards
Bernd

Offline

 

# 2   2010-01-25 07:45:37 STM32F103xx performance enough for this application?

yrt
Administrator
From: Grenoble-France
Registered: 2008-06-11
Posts: 520
Website

Re: STM32F103xx performance enough for this application?

Hi,

The STM32 comes with a 12 Mb/s full speed USB peripheral, but by experience, it's difficult to overrun about 250 Kb/s, with small packets on several endpoints.
USB is optimized for unidirectional large data packets.
To reach the best performance it is recommand to merge data into the same packet, so into the same endpoint, and to limit switches between input and output requests.
The performance also depends on PC platform and even on PC USB port, that can be very different between two ports on the same PC.

Yves

Offline

 

# 3   2010-01-25 09:38:49 STM32F103xx performance enough for this application?

Bernd06
New member
Registered: 2010-01-24
Posts: 2

Re: STM32F103xx performance enough for this application?

thanks for this hint! It`s the first time, working with usb.

If I use only one endpoint (out) as HID interface to transmit (touch controller coordinates, encoder, buttons pressed or not information) to the computer (64Byte/s) and one endpoint (in) to transmit not frequently information to the SPI TLC led device, the STM32 should be fast enough to proceed this?
Buttons and encoder are directly connected to one or more GPIOs (so the calculation for a new event will be very fast) and the two spi devices are maybe working with DMA.

>The performance also depends on PC platform and even on PC USB port
Do you think that a normal computer is able to process usb request every 1ms? I mean the normal usb mouse will be also transmit his / her new coordinates every 1ms intervall.

best regards
Bernd

Offline

 

# 4   2010-01-27 13:42:58 STM32F103xx performance enough for this application?

VincentC
Administrator
Registered: 2007-11-08
Posts: 149

Re: STM32F103xx performance enough for this application?

Hi,

The thing to remember with USB is that every packet requires a quite large overhead time that can be as large as one ms. So when we make pre-implementation calculations, we count the number of packets and we ignore the size of the packets, except for very large packets. (over 1Kbytes)

In your case, sending one packet of 64 bytes every second while receiving one packet of 64 bytes every second should not be a problem. However, if the transfers are 64 packets of one byte instead of one packet of 64 bytes, then you might start seeing problems on some systems.

You must also keep in mind that the bandwidth on the USB bus must be shared with other USB devices and the host PC CPU time must be shared with other software. "A normal computer" does not mean much in this context. If the computer only has one root USB with a HUB, then a simple mouse could indeed prevent you to achieve 1 packet/ms on the STM32.
If the computer has several root USBs then it might be possible... or not, depending on many other parameters. (hardware, software and firmware) There is no way to guarantee it. And this is due to the USB protocol, not specific to STM32.

I hope it helps.

Best Regards,

Vincent

Offline

 

# 5   2010-03-23 17:39:04 STM32F103xx performance enough for this application?

perz
New member
Registered: 2008-03-04
Posts: 6

Re: STM32F103xx performance enough for this application?

To me it seems like an overkill, but thats maybe because I saw your application as an man-computerinterface! If it is that your eye might see 60 Hz as a steady picture and you can not react faster than 5 millisecond!  So if this system is for one person he will push a button OR turn the wheel within more time than 5 ms! So why send data with no information ?
With a readout of  2 millisecond and a sending  only changes you will have plenty of time. And  software on the other side knows that data is something to react upon!
God Luck Per

Offline

 

# 6   2010-03-25 02:49:01 STM32F103xx performance enough for this application?

Teddy
New member
Registered: 2010-03-23
Posts: 1

Re: STM32F103xx performance enough for this application?

I am reading 16 bytes every 50us from an STM8L as slave  via SPI1 ( using SRM32F103R8),at 4.5Mb/s, this comes down to 320 bytes in 1000us.It's doable but ..no CRC for fast small packets,  CRC is still a problem on both devices at fast speed.

Offline

 

Board footer