FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [December 2005 Threads] some questions about USB-CDC and ISRPosted by Nobody/Anonymous on December 6, 2005 Dear Sirs,
I adapted the USB-CDC demo for AT91SAM7A3, taken from the lwIP_Demo_Rowley_ARM7, it works but then I modified the vUSBCDCTask function to implement a simple Echo for that I at the end of the for(;;) block:
while( xQueueReceive( xRxCDC, &ucByte, usbNO_BLOCK ) ){ xQueueSend( xTxCDC, &ucByte, usbNO_BLOCK ); }
Then I test the throughput but It is really slow (about 300 @ 115200baud nominal). I would like to know how to improve the responsiveness. Should I do everything in the ISR function? Or should I wake up a task from the ISR? And then, howto to make a task waits the receipt of data (from ISR)? I put xQueueReceive (....) with some delay (e.g. usbSHORT_DELAY), but in this case the task is polling the queue....
Thank you for your help
RE: some questions about USB-CDC and ISRPosted by Nobody/Anonymous on December 7, 2005 Try searching the forum for "circular buffer". You should find some helpful discussion.
RE: some questions about USB-CDC and ISRPosted by Nobody/Anonymous on December 7, 2005 Dear sir,
thank you for your answer. I had a look at the old messages, but I couldn't find any new ideas. I followed the R.Barry instruction I had: - an ISR routine collecting data from the hardware and then it puts them in a Queue; - a task replying with a simple echo. But the throughput is near 300baud (or less..)..note that if I repeat more times an incoming character (eg. 2 times) I double the speed..4 times speedx4 etc..
I wonder if the bottleneck would be on the pc side...
I try to put everything in the ISR routine
RE: some questions about USB-CDC and ISRPosted by Nobody/Anonymous on December 7, 2005 Sorry but the last part of the message is:
.... I try to put everything in the ISR routine but I didn't have any improvement
Thanks for your help
RE: some questions about USB-CDC and ISRPosted by Nobody/Anonymous on December 8, 2005 Have you checked that your ISR time doesn't exceed your timer tick?
RE: some questions about USB-CDC and ISRPosted by Nobody/Anonymous on December 8, 2005 No, I haven't. How can I do that?
I have one more question, can happen a task switch while ISR is executing? I put the 'echo' in the ISR, which is a smal amount of code: get data from usb IN buffer and put it in the OUT buffer.
thank for your help
M
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|