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

USB issue on Atmel AT91SAM7X-EK boards

Posted by Dave Harper on July 2, 2009
I just stumbled across a problem using the FreeRTOS USB task (from the lwIP_Demo_Rowley_ARM7 demo) on the AT91SAM7X-EK board and thought I would share it with anyone else in a similar situation.

I have been using this board to get familiar with FreeRTOS, lwIP and a number of other things before I design a custom board for my final application. I had previously completed an Eclipse project that had an AT45DB642D task (this is the dataflash on the AT91SAM7X-EK board). The task performed a series of tests on the dataflash and displayed the results on a web browser using lwIP. The next step in the roadmap was to add USB as this will be a great way to initially configure my custom board. Using the above demo as a guide, I added the USB to my new project but it didn't work. I finally tracked the problem down to the USB-CDC.c code which manipulates PA16. The comments in the code indicated that this controlled the USB pullup resistor, but looking at the schematics for the AT91SAM7X-EK showed that PA16 was used for SPI0_MISO which is connected to the dataflash device. It appears that the AT91SAM7X-EK doesn't have the ability to control the pullup resistor as this is an integral part of the STMicroelectronics USBUF02W6 part. I commented out all of the PA16 related lines in the code and everything started working. Wondering how this could have happened, I decided to take a look at the Atmel AT91SAM7S-EK schematics (the version of the board WITHOUT Ethernet). Sure enough, this board doesn't have dataflash but it does have the ability to control the USB pullup with - you guessed it - PA16.

The latest versions of board.h from the Atmel at91lib distribution check for a #define of the chip type to pull in the appropriate *.h chip definition file. This definition could also be used within the USB-CDC.c code to either enable or ignore the use of PA16.

Regards,
Dave

RE: USB issue on Atmel AT91SAM7X-EK boards

Posted by Richard on July 3, 2009
Thanks for the feedback. You are right of course, the 'x' board is a bit of a pain when developing USB because of its inability to turn in on an off. Note that the drivers in the demo are just that, a demo, and not intended to be a fully compliant example.

Regards.


[ 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