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

Atmel USB Framework

Posted by Liam Staskawicz on November 19, 2008
I'm trying to port the Atmel USB Framework v1.4 (http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4092) to my FreeRTOS based system. I'm on a SAM7X256 in a GCC-based environment (GNUARM and CrossWorks). I'm interested in doing this since the USB framework is event driven, and offers a flexible way to support the included USB profiles (hid, cdc, mass storage, etc.).

I've started with the CDC example in the most current software pack for the AT91SAM7X-EK, v1.4. The example builds just fine and it connects to my desktop as a CDC device successfully. But the framework code unfortunately includes a bunch of tracing and pio code that I don't want, but nothing that affects the operation of the USB system as far as I can tell, so I've been snipping that stuff out.

In my codebase, I've wrapped the single USB ISR in FreeRTOS style with a naked wrapper, and it seems to get called successfully a couple times on init of the USB system, but the USB system never configures itself successfully.

One odd thing I've noticed in the CDC example is that if I disable the DBGU tracing that's enabled just before USB init, then things don't work either. Enabling the DBGU in my codebase does not help (that was just some of my paranoia trying that out).

Anybody played with this? Any thoughts? Thanks!

RE: Atmel USB Framework

Posted by MEdwards on November 20, 2008
The debug statements in the Atmel code seem to completely change how the structures are accessed. Never figured it out. Are you trying to port AVR32 code to an ARM7? Are the peripherals compatible?

RE: Atmel USB Framework

Posted by Liam Staskawicz on November 22, 2008
I actually did end up getting this sorted out. As mentioned, I removed all instances of tracing or LED blinking or whatever other weirdnesses they slipped into the USB framework code, and none of that seemed to have any real impact on the actual USB operation. It was the Atmel software pack for the SAM7X256 so I didn't think there should be peripheral compatibility issues (as in a AVR32 to ARM7 port).

Turns out the thing I had been missing was that some of the hardware init stuff was in the example code's startup code, whereas in the previous USB implementation, it had been in the USB init code and I had just overlooked it as I was shuffling everything around. Once I got that working, the USB CDC interface comes up like a champ and reads and writes as expected. You can browse my altered version at http://dev.makingthings.com/browser/firmware/branches/cpp/core/usb.


[ 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