Quality RTOS & Embedded Software

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


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


Careers

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

Renesas

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