Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




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 ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists