Cypress技术论坛
直播中

樊忠甫

7年用户 217经验值
私信 关注
[问答]

reg端点fifo中的手动模式

你好,
我想知道当我们使用手动模式,旗杆和C不工作,是吗?我写了一个测试序列从我的主人,这是一个PLD到奴隶FIFO(微控制器CY7C68013A)。我可以看到端点缓冲区中的测试数据,但是标记和字节计数总是空的!有人以前见过这个吗?
提前感谢

以上来自于百度翻译


     以下为原文
   Hi there,
    I wanted to know when we use manual mode, the flagb&c dont work is it?  I am writing a test sequence from my master which is a PLD to the slave fifo (microcontroller cy7c68013a). I can see the test data in the endpoint buffer (of the slave) but the flags and byte counts always read empty! Has anyone come across this before?
     
    Thanks in advance

回帖(6)

张婷婷

2019-4-16 15:53:17
你好,
是的,所有的旗帜都会在手动模式下工作。通过TRM的92.4FIFO旗标引脚(FLAG,FLAB,FLAC,FLAGD)部分,并仔细检查您的标志配置。

以上来自于百度翻译


     以下为原文
  Hi,
                                                  
                    Yes, all flags will work in manual mode. Go through 9.2.4 FIFO Flag Pins (FLAGA, FLAGB, FLAGC, FLAGD) section of TRM and double check your flag configuration.
举报

樊忠甫

2019-4-16 16:02:09
谢谢你的回复。PF和空标志跳闸,但不是全标志。但这不是我现在关心的问题。什么是额外的寄存器,需要设置手动模式工作?我将EpXCONTICOS、IFCONFIG、EXXFIFOFFG、RVCTL、EPXFIFOFFH和AML、IpPKToad、FiPosits全部设置为适当的值。我想要看到的是我在端点缓冲区中生成并发送到端点FIFO的序列。不能想象任何可能出错的事情,因为所有的时间都是正确的。

以上来自于百度翻译


     以下为原文
   Thanks for the reply. The PF and empty flag trips but not the full flag. But thats not my concern now. What would be additional registers that needed to be set up for manual mode to work? I hve the epxconfigs, ifconfig,epxfifocfg,revctl, epxfifopfh&l,inpktend, fiforesets all set to appropriate values.  All i wanted is to see the sequence that i generated and sent to endpoint fifos in endpoint buffers. Cant think of anythng that could possibly go wrong because all the timings are right.
举报

傅姁妮

2019-4-16 16:20:03
嗨,Poorni,
您可以使用下面的示例代码作为参考,在从属、手动模式下配置FX2LP:
虚空(虚空)
{//在启动时调用一次
CPUCs=0x12;//CkkSPD[1:0]=10,对于48 MHz操作,输出输出
IFCONFIG= 0xCF;//用于异步?同步吗?
EP2CFG= 0xA2;//EP2OUT,散装,大小为512,2X缓冲
同步延迟;
EP6CFG= 0xE2;//EP6IN,散装,大小512,2x缓冲
同步延迟;
EP4CFG= 0x00;//EP4无效
同步延迟;
EP8CFG= 0x00;//EP8无效
同步延迟;
FiPosit=0x80;/ /设置NACALL位到NACK主机的所有传输
同步延迟;
FiPosit=0x02;//复位EP2 FIFO
同步延迟;
FEPOSET=0x06;//复位EP6 FIFO
同步延迟;
FiPosit=0x04;//复位EP6 FIFO
同步延迟;
FEPOSET=0x08;//复位EP6 FIFO
同步延迟;
FiPosit=0x00;//清除NACKALL位恢复正常操作
同步延迟;
EP2FIFOFFG=0x00;//手动模式,8位模式
同步延迟;
EP6FIFOCFG=0x00;//手动模式,8位模式。
同步延迟;
OutpkTurnices=0x82.;/ /将EP2端点解除两次,因为它是双缓冲的。
同步延迟;
OutpkTurn= 0x82.
同步延迟;
同步延迟;
pFrAgAsAb=0xE0;// FLAGA -索引,FLAB-EP6FF
同步延迟;
pFrAgCSCD= 0x08;//FLAC-EP2EF,FLAGD -索引
同步延迟;
}
当做,
加亚特里

以上来自于百度翻译


     以下为原文
   Hi Poorni,
     
    You can use the below sample code as reference, that configures FX2LP in Slave, Manual Mode:
     
    void TD_Init( void )
    { // Called once at startup
     
      CPUCS = 0x12; // CLKSPD[1:0]=10, for 48MHz operation, output CLKOUT
     
      IFCONFIG = 0xCF; // for async? for sync?
      EP2CFG = 0xA2;     // EP2OUT, bulk, size 512, 2x buffered
      SYNCDELAY;           
      EP6CFG = 0xE2;     // EP6IN, bulk, size 512, 2x buffered
      SYNCDELAY;
      EP4CFG = 0x00;     // EP4 not valid
      SYNCDELAY;               
      EP8CFG = 0x00;     // EP8 not valid
      SYNCDELAY;
        
      FIFORESET = 0x80;  // set NAKALL bit to NAK all transfers from host
      SYNCDELAY;
      FIFORESET = 0x02;  // reset EP2 FIFO
      SYNCDELAY;
      FIFORESET = 0x06;  // reset EP6 FIFO
      SYNCDELAY;
      FIFORESET = 0x04;  // reset EP6 FIFO
      SYNCDELAY;
      FIFORESET = 0x08;  // reset EP6 FIFO
      SYNCDELAY;
      FIFORESET = 0x00;  // clear NAKALL bit to resume normal operation
      SYNCDELAY;
     
      EP2FIFOCFG = 0x00; //manual mode, 8 bit mode
      SYNCDELAY;
      EP6FIFOCFG = 0x00; //manual mode, 8 bit mode.
      SYNCDELAY; 
      
      OUTPKTEND =0x82;   //arming the EP2 OUT endpoint twice, as it's double buffered.
      SYNCDELAY;
      OUTPKTEND = 0x82;
      SYNCDELAY; 
     
      SYNCDELAY;
      PINFLAGSAB = 0xE0; // FLAGA - indexed, FLAGB - EP6FF
      SYNCDELAY;
      PINFLAGSCD = 0x08; // FLAGC - EP2EF, FLAGD - indexed
      SYNCDELAY; 
     
    }
     
    Regards,
    Gayathri
举报

樊忠甫

2019-4-16 16:38:46
谢谢GayaTraci…这是有用的…我只在方向上使用NO。如果我必须跳过一个包到底发生了什么?说我有连续的数据流…把跳过位放在一个,我应该跳过512字节(在我的情况下)的数据正确吗?查看端点缓冲区的剩余数据吗?

以上来自于百度翻译


     以下为原文
   Thanks Gayathri..That was helpful...I am using only IN direction for no. If I have to skip a packet what really happens?  Say I have data flow continously.. Putting the skip bit to one I should skip 512 bytes (in my case) of the data right? and see the remaining data on the endpoint buffer?
举报

更多回帖

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