CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

pic24 usb problem

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
rwalborn



Joined: 12 Dec 2011
Posts: 8
Location: USA

View user's profile Send private message Visit poster's website

pic24 usb problem
PostPosted: Mon Nov 10, 2014 12:44 pm     Reply with quote

I have run into a weird problem using the CCS HID example. Compiler CCS 5.031. I am using USB HID interface to update parameters in a speaker with DSP. I am using interrupts. Now normally , when I connect the USB cable to a Windows computer, Windows detects the device and enumerates it successful. It works on a windows 7 core dual laptop, and a windows 7 core duo desktop, and the same desktop running windows xp using VMware. However, on my faster I7 computer using a high speed usb hub , Windows gives me a error code 10 can not start. However, the device also has a firmware boot loader using Microchip HID boot loader code ( non-interrupt) and Windows has no problem detecting that. I have managed to get it to work most of the time by speeding up the main control loop which the software executes to check status of switches.

Does anyone ever experience anything this?
Ttelmah



Joined: 11 Mar 2010
Posts: 19539

View user's profile Send private message

PostPosted: Mon Nov 10, 2014 1:22 pm     Reply with quote

Always on USB, even if using the interrupt driven handler, you must actually retrieve data 'faster than it arrives', or problems will appear. The faster CPU, probably also has USB3 hardware. Though this switches down to USB2 rates, the latency on the machine will be lower, both from the faster CPU, and the more efficiently written drivers for USB3.
Lesson is to make sure that you are not delaying in the main control loop. If you need to delay for things, then use a state machine and interrupt driven clocks, not actual 'pauses'.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group