- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello,
I found that register EP2AUTOINLENH\L is always kept as default value when I try to modify it. I tried to write 0x01,0x03,0x04 into EP2AUTOINLENH\L separately.,but It always present EP2AUTOINLENH= 2,EP2AUTOINLENL = 0 when I read them;why could this happen? I need some help,sorry for my pool english,welcome to ask me when my point is not expressed clearly ,here is my TD_init code:
void TD_Init(void) // Called once at startup
{
CPUCS = 0x0a;//24Mclk
SYNCDELAY;
REVCTL = 0x03;
SYNCDELAY;
FX2InitI2C();
PORTACFG = 0x01;//P00 set to int0 mode
OEA = 0x00; //
IOA = 0xff; //
PORTECFG = 0x00;//all set to GPIO definition
OEE = 0x00; //all set to input...
IOE = 0xff; //output set to 0 .input set to 1
SYNCDELAY;
PORTCCFG = 0x00;//all set to GPIO definition
OEC = ~0x20; //PC 8 pin all set to output
IOC = ~0x01; //PC0 reset sensor ... now set to 0:reset state... //20130729 added
SYNCDELAY;
EP1INCFG = 0xb0;
SYNCDELAY;
PINFLAGSAB = 0xcc;
SYNCDELAY;
PINFLAGSCD = 0xcc;
SYNCDELAY;
FIFOPINPOLAR = 0x3c; //0x3c for ov or hynix
SYNCDELAY;
WAKEUPCS = 0x04; //!!! should like this.others can't work when power on..
SYNCDELAY;
IFCONFIG = 0x43;
SYNCDELAY;
EP2CFG = 0xe8;
SYNCDELAY;
EP4CFG = 0;
SYNCDELAY;
EP6CFG = 0;
SYNCDELAY;
EP8CFG = 0;
SYNCDELAY;
EP2AUTOINLENH = 0x01 //0x03,0x04
SYNCDELAY; //
EP2AUTOINLENL = 0x00;
SYNCDELAY;
EP2FIFOCFG = 0x0c; //8bit autoin
SYNCDELAY;
FIFORESET = 0x80;
SYNCDELAY;
FIFORESET = 0x02;
SYNCDELAY;
// FIFORESET = 0x06;
// SYNCDELAY;
FIFORESET = 0x00;
SYNCDELAY;
// EP2BCH = 4;
// SYNCDELAY;
// EP2BCL = 0;
// SYNCDELAY;
INPKTEND = 0x82; //“arming” the IN transfer
SYNCDELAY;
INPKTEND = 0x82;
SYNCDELAY;
INPKTEND = 0x82; //“arming” the IN transfer
SYNCDELAY;
INPKTEND = 0x82;
SYNCDELAY;
// enable dual autopointer(s)
AUTOPTRSETUP |= 0x01;
// _alpum_init();
SerialPort_Init(BD_115200);
EX0 = 0;//disable interrupt..
IT0 = 1;//edge effective interrupt.
IE0 = 0;
m_WorkState = 0;
m_bIsMe = 0;
m_CheckNum = 0;
m_bNoStop = 0;
m_SlaveID = SENSOR_ID;
m_I2CData[0] = 0;
m_I2CData[1] = 0;
EZUSB_Delay(20); //20130729 added
P20 = 1; //20130729 added
Rwuen = TRUE; // Enable remote wakeup
dbg_str("EP2CFG=");
dbg_int(EP2CFG);
dbg_str(",EP2AUTOINLENH=");
dbg_int(EP2AUTOINLENH);
dbg_str(",EP2AUTOINLENL=");
dbg_int(EP2AUTOINLENL);
dbg_str(",REVCTL=");
dbg_int(REVCTL);
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Check in DR_SetConfiguration. It might be getting overwritten there with the default value.
Regards,
Gayathri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Check in DR_SetConfiguration. It might be getting overwritten there with the default value.
Regards,
Gayathri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
Gayathri,thanks for your answer. Maybe I clicked the "verified answer" for mistake ,actually I checked the code you referred to,and It was EP2AUTOINLENH = 0x04,EP2AUTOINLENL = 0x00; So its not the reason. I also tried to mask them, but the result is same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
referring to the code in EZ-USB_TRM.PDF, I modified the code like this:
FIFORESET = 0x80;
SYNCDELAY;
FIFORESET = 0x82;
SYNCDELAY;
FIFORESET = 0x00;
SYNCDELAY;
but the result is same, I can not modify EP2AUTOINLENH\L value all the same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please attach your code here. We can take a look at it.
Regards,
Gayathri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
thanks,I attached the two key files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have modified your video.c file to reflect AUTOINLEN = 0x0100 (256bytes). Please find attached files. can you please check with this and see if still reflects 0x0200?
I think, for Bulk EPs, you cannot commit mroe than 512 as maximum packet size as per spec is 512. So, even if you choose 1024 Quad buffered configuration, you can commit only in terms of 512 (max). Thus in effective the buffer will behave as if it is in conf: 512 Quad buffered.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please find attached
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
thanks for your reply,but sorry I dont know how to find attached files,I cannot see any files you attached on this webpage,could you please attach files below the context you reply, like what I did, or paste the address,thanks again.
regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please find attached.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Forgot that we cannot attach zip files from Chrome... It worked from Mozilla..
Regards