这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » MCU » lm3s 测试sdram的代码

共1条 1/1 1 跳转至

lm3s 测试sdram的代码

工程师
2014-09-29 20:12:40     打赏

//这是测试sdram的代码
  static volatile unsigned short *g_pusEPISdram[1];
  g_pusEPISdram[0] = (unsigned short *)0x60000000;
  g_pusEPISdram[0][0]=0x1234;
  g_pusEPISdram[0][1]=0x5678;
  unsigned short int Temp45=0,Temp46=0;
  for(unsigned long k=0;k<0x3fffff;k++)
  {
    g_pusEPISdram[0][k]=0x1234;
    Temp46=g_pusEPISdram[0][k];
    if(Temp46!=0x1234)
    {
      Temp45=Temp46;
    }
    Temp46=0;
  }


 


for(unsigned int j=0;j<NETFIFOLENGTH;j++)
      {unsigned char tt=0,tt1;
  memset((unsigned char *)(GetFiFoOfNet[0].GetEthArrary[j]),j,MAX_RX_PACKET);
                //test
                memcpy(TempRx_ETH_PacketA,GetFiFoOfNet[0].GetEthArrary[j],MAX_RX_PACKET);
                for(unsigned long k=0;k<MAX_RX_PACKET;k++)
                {
                  tt=GetFiFoOfNet[0].GetEthArrary[j][k];
                  if(tt!=j)
                  {
                    tt1=0;
                  }
                }
                memset(GetFiFoOfNet[1].GetEthArrary[j],j,MAX_RX_PACKET);
                //test
                memcpy(TempRx_ETH_PacketA,GetFiFoOfNet[0].GetEthArrary[j],MAX_RX_PACKET);
                for(unsigned long k=0;k<MAX_RX_PACKET;k++)
                {
                  tt=GetFiFoOfNet[1].GetEthArrary[j][k];
                  if(tt!=j)
                  {
                    tt1=0;
                  }
                }
                memset(TempRx_ETH_PacketA,254,MAX_RX_PACKET);
                memcpy((unsigned char *)(GetFiFoOfNet[0].GetEthArrary[j]),TempRx_ETH_PacketA,MAX_RX_PACKET);
                memcpy((unsigned char *)(GetFiFoOfNet[1].GetEthArrary[j]),TempRx_ETH_PacketA,MAX_RX_PACKET);
                for(unsigned long k=0;k<MAX_RX_PACKET;k++)
                {
                  tt=0;
                  tt=GetFiFoOfNet[0].GetEthArrary[j][k];
                  if(tt!=254)
                  {
                    tt1=0;
                  }
                  tt=0;
                  tt=GetFiFoOfNet[1].GetEthArrary[j][k];
                  if(tt!=254)
                  {
                    tt1=0;
                  }
                }
      }


共1条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]