FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [March 2010 Threads] 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
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|