fx2lp in vendor commands

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

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

Hello,

In AN61345 app note,usb class is in vendor commands,but in fx2lp slavefifo configuration example,they have not defined any vendor commands.simply streaming the data from gpif to usb.

how can i defined vendor commads in this example and i am using image sensor instead of fpga.

let me know.

regards,

geetha.

0 Likes
1 Solution

Hello Geetha,

We've locked the thread so that we can keep a track of the same query in one place. If you have further queries that we need to check on that thread, we can unlock it.

Please let me know what error occurs for you? You can check with the following code which will skip one packet on sending the vendor command-

BOOL DR_VendorCmnd( void )

{

  switch(SETUPDAT[1])

  {

  case no_data_control:

  EP6FIFOCFG=0x00;

  EP6BCH=0x00;

  EP6BCL=0x00;

  break;

  }

  return(FALSE);

}

Best Regards,

Sananya

View solution in original post

0 Likes
4 Replies
Sananya_14
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello Geetha,

The vendor commands are used over vendor class interface and may or may not be used when the vendor device class is defined in the descriptor as in the mentioned App Note example. If you are using this example, you can directly add vendor commands in the slave.c file. Please refer to the Application Note for firmware implementing the same.

Best Regards,

Sananya

0 Likes

Hello sananya,

why this thread is locked https://community.cypress.com/message/170027?et=watches.email.thread#170027

can you send me the code snippet.

BOOL DR_VendorCmnd( void )

{

  switch(SETUPDAT[1])

  {

  case Data_control:

  break;

  case no_data_control:

EP6FIFOCFG=0x00;

  break;

  }

  return(FALSE);

}

the above code is not working for me.

regards,

geetha.

0 Likes

Hello Geetha,

We've locked the thread so that we can keep a track of the same query in one place. If you have further queries that we need to check on that thread, we can unlock it.

Please let me know what error occurs for you? You can check with the following code which will skip one packet on sending the vendor command-

BOOL DR_VendorCmnd( void )

{

  switch(SETUPDAT[1])

  {

  case no_data_control:

  EP6FIFOCFG=0x00;

  EP6BCH=0x00;

  EP6BCL=0x00;

  break;

  }

  return(FALSE);

}

Best Regards,

Sananya

0 Likes

Please also ensure that the "Bytes to Transfer" field in Control Center is set to 0 before sending the vendor command.

Best Regards,

Sananya