embedded - Unable to receive USB packets -


i trying receive data packets through printer interfaced pic32.

i can send setup bytes , receive 8 bit data correctly, when data received through in packet greater 8 bytes, cannot receive them correctly after first 8 bytes .

additional information erroneously posted "answer" , moved here:

i bit confused , when initiating read after in token ..the first 2 bytes come 341 , trying read device_id printer class , suggest length of string sent printer .

this doing while preparing first in token.

bdt_entry *pointbdt;  // pointe bdt   pointbdt = bdt_in; (even bdt)  //   free(pep0data); pep0data=null;    if(!((pointbdt=(bdt_entry*) malloc(sizeof(bdt_entry)))==null))        {         pointbdt=bdt_in;        pep0data=(byte *) malloc(sizeof(8));  // pointer buffer      pointbdt->stat.val=0;                pointbdt->adr=converttophysicaladdress(pep0data);             pointbdt->cnt=8;     pointbdt->stat.bstall=0;     pointbdt->stat.dtsen=1;     pointbdt->stat.dts=1;     pointbdt->stat.uown=1;       u1ep0 = 0x4d;       u1addr = 0x00;       u1tok =10010000; //in       } 

then after guess when sof interrupt happens have toggle dtsen , pointbdt should point bdt_in_odd (odd bdt) . byte after 8 byte corrupt .

i trying print values through hyperterminal on pc.


i bit confused , when initiating read after in token ..the first 2 bytes come 341 , trying read device_id printer class , suggest length of string sent printer .

this doing while preparing first in token.

bdt_entry *pointbdt;  // pointe bdt   pointbdt = bdt_in; (even bdt)  //   free(pep0data); pep0data=null;    if(!((pointbdt=(bdt_entry*) malloc(sizeof(bdt_entry)))==null))        {         pointbdt=bdt_in;        pep0data=(byte *) malloc(sizeof(8));  // pointer buffer      pointbdt->stat.val=0;                pointbdt->adr=converttophysicaladdress(pep0data);             pointbdt->cnt=8;     pointbdt->stat.bstall=0;     pointbdt->stat.dtsen=1;     pointbdt->stat.dts=1;     pointbdt->stat.uown=1;       u1ep0 = 0x4d;       u1addr = 0x00;       u1tok =10010000; //in       } 

then after guess when sof interrupt happens have toggle dtsen , pointbdt should point bdt_in_odd (odd bdt) . byte after 8 byte corrupt .

i trying print values through hyperterminal on pc.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -