Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

USB low-full-high speed peripherals Forum Discussions

gean_3054931
Level 5
Level 5
10 likes given 5 likes given First like received

Hello,

I have implemented vendor command in order to control the data from the fx2lp to usb.

I have interfaced image sensor with fx2lp in slavefifo configuration.please find the below code.

#define Data_control    0xb2

#define no_data_control     0xb3

BOOL DR_VendorCmnd( void )

{

  switch(SETUPDAT[1])

  {

  case Data_control:

  break;

  case no_data_control:

  break;

  }

  return(FALSE);

}

So,depending on vendor command recieved by the host,fx2lp needs to control the data flow.

if data_control command recieved,i have to send data from fx2lp to usb.

if no_data_control command recieved,i dont want to send data from fx2lp to usb.is there any logic to implements this?

regards,

geetha.

0 Likes
1 Solution
Sananya_14
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello Geetha,

Based on my understanding, you can initialize the FIFO in Auto mode in TD_Init() and switch to manual mode in the no_data_control command and skip the packets based on your requirement. Please follow up onfx2lp in vendor commands.

Best Regards,

Sananya

View solution in original post

1 Reply
Sananya_14
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello Geetha,

Based on my understanding, you can initialize the FIFO in Auto mode in TD_Init() and switch to manual mode in the no_data_control command and skip the packets based on your requirement. Please follow up onfx2lp in vendor commands.

Best Regards,

Sananya