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

PIC32 porting, Microchip USB stack, demo?

Posted by Piero B on March 23, 2010
Hi

i need a freeRTOS demo for pic32, that includes the microchip USB stack.
I'm interested to understand how i can integrate stsck in my application, using USB stack irq (i need an fully event driven system)

I need examples for both modes, DEVICE and HOST - i means virtual com device ans mass storage host

Thank in advance to all.

Bye
Piero

RE: PIC32 porting, Microchip USB stack, demo?

Posted by Dave on March 23, 2010
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en544728

RE: PIC32 porting, Microchip USB stack, demo?

Posted by Piero B on March 23, 2010
Dave
i know this documents, and i already integrated code inside freertos. But Microchip USB is not an easy code, and i will prefer to start from a ready-to-use example. Now i have only examples (from microchip) that works without FREERTOS.

My question is only if someonr in the forum already did some similar works.

Anyway, thanks for your quick feedback

Bye
Piero

RE: PIC32 porting, Microchip USB stack, demo?

Posted by Piero B on March 26, 2010
Up this discussion.

No other answers? please i need help!
Thanks

RE: PIC32 porting, Microchip USB stack, demo?

Posted by woops_ on March 26, 2010
A long application note with example code is not enough? What are you expecting?

RE: PIC32 porting, Microchip USB stack, demo?

Posted by Piero B on March 26, 2010
Hi
In the app note above, there isn't anything related to USB.
I'm asking if someone is already worked with USB stack with FREERTOS.

Piero

RE: PIC32 porting, Microchip USB stack, demo?

Posted by Peter on March 26, 2010
Hi Piero,
the USB Stack only uses one interrupt (if you use host mode only - like for USB sticks). You need to wrap this ISR in the style FreeRTOS needs it (there is a good example in the FreeRTOS package included). Next step is that you call once USBInitialize(0) when FreeRTOS is already running. After that you just need to call USBTasks() periodicly every 1..10ms (as you like). If you use a filesystem like FatFS from Chan there is a ready semaphore handling included - so you don't need to worry about access rules from different tasks because FatFS will handle that.
If you use the MSD_SCSI functions for reading/writing a sector, think about this:
These functions normally block the statemachine processing (as the USB stack from Microchip is being designed). But these functions need a handling of the USBTasks() - so Microchip decided, to make the handling quite easy - to include the calling of USBTasks() in the blocking functions. And here you need to remove the call to USBTasks() because in your main-task USBTasks() will be already the called periodicly.

Hope that helps a little.
Regards,
Peter


[ 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