Quality RTOS & Embedded Software

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


FreeRTOS USB problems

Posted by Mateusz Plocinski on June 15, 2007
I'm trying to build my application based on lwIP_demo_rowley_SAM7, but I use AT91SAM7S mikrocontroller without network, so I've cut out the TCP/IP stack.
I've decided to use this FreeRTOS example code mainly because of working USB implementation.

Everything works quite ok when I send data from PC to uC in virtual com port mode, but when I try to receive data back, the transmission hangs after random time (sometimes after few bytes, sometimes after few kilobytes, sometimes more). Sending still works ok, but receiving hangs.
It looks like BULK IN endpoint fifo in microcontroller is not being fried, and I think that it is the problem on the PC side, probably with usbser.sys driver. Microcontroller hardware still works, and program is being executed but
TXPKTRDY flag isnt being cleared by the hardware (so probably the data hasn't been acknowledged by PC).

These problems exist while working with my application written with Borland Builder 6 on PC side.
Another problem for example is that widely used "Bray's Terminal" doesnt work with virtual COM port based on this microcontroller software. It hangs after trying to send some bytes and I have to kill it.
Why dont these problems exist when using for example FTDI chips with their dedicated PC side driver?

I know that this is not exactly the right forum for asking about USB implementation but maybe this is caused by exactly this USB implementation from FreeRTOS.

Have anyone encountered the similiar problems while sending and receiving data? The same software, with some changes, worked great when used in true USB mode (with LibUSB on PC side). But now I have to use it in virtual COM port mode. Maybe usbser.sys driver from WinXP is the problem? How can I solve this?

Please help
Mateusz Plocinski

RE: FreeRTOS USB problems

Posted by Dave on June 15, 2007
I have read that the implementation in the FreeRTOS download is not 100% standards compliant as the equipment required to make it such is too costly. Maybe this is the problem? Apparently it works ok on Windows but not Linux.

RE: FreeRTOS USB problems

Posted by Mateusz Plocinski on June 15, 2007
Hmmm, I think that I dont understand. Do you mean that implementation is not compliant because it would takie too much time to write it that way or what? What equipment are you talking about?.
I think that I have to try other implementations of USB for sam7s but I'm still trying to avoid that. I would have to rewrite my whole application to work without OS. ;/

Nobody tried to use USB + FreeRTOS with sam7s microcontroller? Or maybe only I have such strange problems?

[ 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.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

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.


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


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