Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

some questions about USB-CDC and ISR

Posted 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 ISR

Posted 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 ISR

Posted 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 ISR

Posted 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 ISR

Posted 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 ISR

Posted 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


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner