This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F5529 USB CDC Speed

Other Parts Discussed in Thread: MSP430F5529

 

Hi,

I am trying out example C2 & C6 from MSP430 USB Developers Package Version 3.10.00 on MSP430F5529..

I manage to get more than 500KB/s for C6 but only around 200KB/s for C2. Why is it slower for C2 (receiving)? How can I make it faster? I am using Tera Term Pro "Send file". Is it related? Any other apps I can use to try out C2?

When I try to combine C2 and C6 (insert USBCDC_receiveData(1k) right before cdcSendDataInBackground()), trying to send and receive data at the same time, I find that the receiving end is a lot slower.

I tried to add __delay_cycle() in between USBCDC_receiveData() and cdcSendDataInBackground(), to give more time for receiving data. I find that the sending speed reduce by a lot with small increase on receiving speed.

What is the best way to send and receive data at maximum rate?

Is the DMA shared between send and receive if I combine C2 and C6 this way? Will this affect the speed?

 

Thanks,

Mun Soon

 

  • I don't know these examples, but maybe it just comes down to simple math:

    200k/s means the MSP has to provide 200k data per second. On 25MHz, this is 125 clock cycles per byte. On the default frequency of 1MHz, only 5 clock cycles.
    Depending on how the code was written, maybe the MSP is simply not fast enough to asemble and send more data.
    Since the USB hardware cannot send anything while the MSP is still busy preparing each transmision, this has an impact on the speed to. In receiving direction, the USB hardware will be able to already receive the next while the MSP is still processing the last package.

    You have similar problems with all kinds of transfers (including UART or SPI) when the transfer speed comes close to one peers maximum processing power while the bus speed could be higher.

    Maybe the sending code can be wrritten for interleaved work adn so increase throughput, but I doubt the MSP will then be able to 'produce' any usable data at the same pace. Or do something useful with the 600k it 'can' receive.

    benchmarcks are only of limited use for real world applications. :)

  • Thanks a lot for the quick response. And sorry the the confusion. The direction that I refer to is following the example, which refer the MSP (I should have refer the host). So, the issue I have now is the MSP can send 500KB/s but only receive 200KB/s.

    Btw, it is running at 25MHz.

  • Hi,

    Have you ruled out the possibility that it is TeraTerm causing the holdup? especially considering the direction that you are seeing the data being slow in is from the PC to the MSP. In my experience TeraTerm has a limit you reach at some point on how fast it will push out data, and 200kB/s sounds close to that. To get faster than that you might have to write your own PC side application, or at least find a different one.

    Regards,

    Katie

**Attention** This is a public forum