Cypress技术论坛
直播中

王翰音

8年用户 288经验值
私信 关注
[问答]

FX2LP固件ReMurrATE具有批量输出端点

你好,
我在FX2LP SLaveFIFO代码中定义了端点2,我在DSCR.A51文件中添加了描述符如下。
FullSpeedConfigDscr:
端点描述符
描述符长度
描述符类型
端点数和方向
端点类型
最大分组大小(LSB)
Max packect尺寸(MSB)
DB 0 H
FullSpeedConfigDscrEnd:
而且
HighSpeedConfigDscr:
端点描述符
描述符长度
描述符类型
端点数和方向
端点类型
最大分组大小(LSB)
Max packect尺寸(MSB)
DB 0 H
HighSpeedConfigDscrEnd:
并在下面的.Case.C文件中进行更改。
tdIn()
{
EP2CFG=0xE2;//端点2;
同步延迟;
}
我已经在大容量中配置了端点,但是固件ReMurrATE具有批量输出端点(0x02)。
原因何在?我错过什么了吗?让我知道。
谢谢您。

以上来自于百度翻译


     以下为原文
  Hello,
I have defined endpoint 2 in the fx2lp slavefifo code.I added descriptors in dscr.a51 file as below.

FullSpeedConfigDscr:
;; Endpoint Descriptor
      db   DSCR_ENDPNT_LEN      ;; Descriptor length
      db   DSCR_ENDPNT         ;; Descriptor type
      db   02H               ;; Endpoint number, and direction
      db   ET_BULK            ;; Endpoint type
      db   40H               ;; Maximun packet size (LSB)
      db   00H               ;; Max packect size (MSB)
      db   00H   

FullSpeedConfigDscrEnd:

and also
HighSpeedConfigDscr:
;; Endpoint Descriptor
      db   DSCR_ENDPNT_LEN      ;; Descriptor length
      db   DSCR_ENDPNT         ;; Descriptor type
      db   02H               ;; Endpoint number, and direction
      db   ET_BULK            ;; Endpoint type
      db   40H               ;; Maximun packet size (LSB)
      db   00H               ;; Max packect size (MSB)
      db   00H   
HighSpeedConfigDscrEnd:

and made changes in the slave.c file as below.
TD_Init()
{
EP2CFG = 0xE2; //endpoint2,IN diection
  SYNCDELAY;
}

I have configured endpoint for IN bulk,But firmware Renumerates with bulk out endpoint(0x02).
what whould be the reason?did i miss anything?let me know.

thank you.

回帖(10)

杜美娜

2018-9-21 16:06:51
你好,Geethanjali,
修改DSCR.A51文件以指示端点是IN端点。
FullSpeedConfigDscr:
端点描述符
描述符长度
描述符类型
端点数和方向
端点类型
最大分组大小(LSB)
Max packect尺寸(MSB)
DB 0 H
FullSpeedConfigDscrEnd:
而且
HighSpeedConfigDscr:
端点描述符
描述符长度
描述符类型
端点数和方向
端点类型
最大分组大小(LSB)
Max packect尺寸(MSB)
DB 0 H
HighSpeedConfigDscrEnd:
最好的问候,
斯里纳斯

以上来自于百度翻译


     以下为原文
  Hello Geethanjali,
 
Modify the dscr.a51 file to indicate that the endpoint is an IN endpoint.
 
FullSpeedConfigDscr:

;; Endpoint Descriptor

      db  DSCR_ENDPNT_LEN      ;; Descriptor length

      db  DSCR_ENDPNT        ;; Descriptor type

      db  82H              ;; Endpoint number, and direction

      db  ET_BULK            ;; Endpoint type

      db  40H              ;; Maximun packet size (LSB)

      db  00H              ;; Max packect size (MSB)

      db  00H  

 

FullSpeedConfigDscrEnd:

 

and also

HighSpeedConfigDscr:

;; Endpoint Descriptor

      db  DSCR_ENDPNT_LEN      ;; Descriptor length

      db  DSCR_ENDPNT        ;; Descriptor type

      db  82H              ;; Endpoint number, and direction

      db  ET_BULK            ;; Endpoint type

      db  40H              ;; Maximun packet size (LSB)

      db  00H              ;; Max packect size (MSB)

      db  00H  

HighSpeedConfigDscrEnd:

 

 

Best regards,

Srinath S
举报

王翰音

2018-9-21 16:21:55
引用: wangcong12138 发表于 2018-9-21 17:52
你好,Geethanjali,
修改DSCR.A51文件以指示端点是IN端点。
FullSpeedConfigDscr:

你好,先生,
它运行良好。
我有3个I2C设备连接到FX2LP。我有bulikin端点修饰FX2LP SLAVEFIFO的固件。
我定义的端点二缓冲提交数据到u***.but如果我点击转移按钮,有时会发生装置值,与器2 values.please几次纠正我如果在下面的代码片断有什么错。
空隙TDyPoR(空隙)
{
EZUBSWRIGII2C(I2CI DEVICE1,0X01,RIG01);
EZUBSYRADI2C((I2CI DEVICE 1,0x02,EP2FIFOOBUF);
EP2BCH=0x00;
同步延迟;
EP2BCl=0x02;
同步延迟;
EZUBSWRIGII2C(I2CI DEVICE2,0x02,ReG02);
EZUBSYRADI2C((I2CI DEVICE2,0x02,EP2FIFOOBUF);
//EP2BCH=0x00;
//同步延迟;
//EP2BCL=0x02;
//同步延迟;
EZUBSWRIGII2C(I2CI DEVICES3,0x02,ReG03);
EZUBSYRADI2C((I2CI DEVICE 3,0x02,EP2FIFOOBUF);
//EP2BCH=0x00;
//同步延迟;
//EP2BCL=0x02;
//同步延迟;
}

以上来自于百度翻译


     以下为原文
  Hello sir,
its working fine.
I have three i2c devices connected to fx2lp.I have modified fx2lp slavefifo firmware with BULIKIN endpoint 2.
I defined endpoint 2  buffer to commit the data into the USB.but if i click transfer in button,some times device1 values will come,some times with device2 values.please correct me if anything wrong in the below code snippet.
void TD_Poll( void )
{
        EZUSB_WriteI2C(i2c_device1, 0x01, REG01);
  EZUSB_ReadI2C((i2c_device1, 0x02, EP2FIFOBUF);
   
        EP2BCH=0x00;
     SYNCDELAY;
     EP2BCL=0x02;
     SYNCDELAY;
 
EZUSB_WriteI2C(i2c_device2, 0x02, REG02);
  EZUSB_ReadI2C((i2c_device2, 0x02, EP2FIFOBUF);
   
       // EP2BCH=0x00;
    //SYNCDELAY;
     ///EP2BCL=0x02;
     //SYNCDELAY;
 
EZUSB_WriteI2C(i2c_device3, 0x02, REG03);
  EZUSB_ReadI2C((i2c_device3, 0x02, EP2FIFOBUF);
   
       // EP2BCH=0x00;
    //SYNCDELAY;
     ///EP2BCL=0x02;
     //SYNCDELAY;
 
}
举报

杜美娜

2018-9-21 16:37:15
引用: 不cdvdhgdh 发表于 2018-9-21 18:07
你好,先生,
它运行良好。
我有3个I2C设备连接到FX2LP。我有bulikin端点修饰FX2LP SLAVEFIFO的固件。

你好,Geethanjali,
请修改以下代码。
空隙TDyPoR(空隙)
{
EZUBSWRIGII2C(I2CI DEVICE1,0X01,RIG01);
EZUBSYRADI2C((I2CI DEVICE 1,0x02,和EP2FIFOOBUF〔0〕);
EZUBSWRIGII2C(I2CI DEVICE2,0x01,ReG02);
EZUBSYRADI2C((I2CI DEVICE2,0x02,和EP2FIFOOBUF〔2〕);
EZUBSWRIGII2C(I2CI DEVICES3,0x01,ReG03);
EZUBSYRADI2C((I2CI DEVICE 3,0x02,和EP2FIFOOBUF〔4〕);
EP2BCH=0x00;
同步延迟;
EP2BCL=0x06;
同步延迟;
}
前两个字节将是从设备1接收的数据,接下来的两个字节将是从设备2接收的数据,最后两个字节将是从设备3接收的数据。
请告知,如果这很好。
最好的问候,
斯里纳斯

以上来自于百度翻译


     以下为原文
  Hello Geethanjali,
 
Please modify the code as follows.
 
void TD_Poll( void )

{

        EZUSB_WriteI2C(i2c_device1, 0x01, REG01);

        EZUSB_ReadI2C((i2c_device1, 0x02, &EP2FIFOBUF[0]);

   

        EZUSB_WriteI2C(i2c_device2, 0x01, REG02);

        EZUSB_ReadI2C((i2c_device2, 0x02, &EP2FIFOBUF[2]);

   

        EZUSB_WriteI2C(i2c_device3, 0x01, REG03);

        EZUSB_ReadI2C((i2c_device3, 0x02, &EP2FIFOBUF[4]);

   

       EP2BCH=0x00;

       SYNCDELAY;

       EP2BCL=0x06;

       SYNCDELAY;

}    

 

The first two bytes would be the data received from device 1, next two bytes would be data received from device 2 and the last two bytes would be the data received from device 3.

 

Please let know if this works fine.

 

Best regards,

Srinath S
举报

王翰音

2018-9-21 16:47:05
引用: wangcong12138 发表于 2018-9-21 18:22
你好,Geethanjali,
请修改以下代码。
空隙TDyPoR(空隙)

你好,克里斯纳特,
它运行良好。
谢谢您。
吉萨

以上来自于百度翻译


     以下为原文
  Hello shrinath,
its working fine.
thank you.
geetha.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分