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

USB problem when packet length is multiple of TX buffer size

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







USB problem when packet length is multiple of TX buffer size
PostPosted: Wed Apr 22, 2009 10:12 am     Reply with quote

Hello, I'm using a PIC1865J50 to transmit packets via USB to a computer. On the computer side I'm using a C++ program using Microchip's mpusbapi. My program is a variation of Microchip's "Example 02 - Run-Time Linking".

My problem is this, when the computer receives a packet that is a multiple of the tx buffer size the program is ok the first time around, but subsequent attempts to receive cause an error. My TX buffer is 64bytes, so a receive size of 511 works fine as does 513, but 512 fails.

I got the latest USB driver files from CCS and in USB.c it appears they correctly send a 0-length packet if the previous one was full. I'm guessing Microchip's MPUSBRead() function isn't properly handling this.

Anyone see this problem before?
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