- u16 iRes=0xffc0;
- u8 i,k;
- uint u;
- nErr_Flag0=0;
- nErr_Flag1=0;
- nErr_Flag2=0;
- nErr_Flag3=0;
- nErr_Flag4=0;
- nErr_Flag5=0;
- nErr_Flag6=0;
- nErr_Flag7=0;
- nErr_Flag8=0;
- nErr_Flag9=0;
- GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All&0x03FF;
- GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
- GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;\
- GPIO_Init(GPIOE, &GPIO_InitStructure);
- NDATAINALLSetIn;
- DATAINALLSetIn;
- GPIO_InitStructure.GPIO_Pin =GPIO_Pin_All&0x3FF0;\
- GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;\
- GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;\
- GPIO_Init(GPIOC, &GPIO_InitStructure);
- if(wafermode==1)
- {
- delay_ms(350);
- // delay_ms(1000);
- // delay_ms(1000);
- iRes&=f_B200_Chk_Bat();
- f_CE7300_ChkERR(iRes,15);
-
- // TCE7300DATAALLSetOut;
- // TCE7300CLK_ALLHIGH;
- for(i=0;i<10;i++)
- {
- TCE7300PWR_ALLSetOut;
- TCE7300PWR_ALLOFF;
- debugen=0;
- bisten=0;
- delay_ms(8);
- iRes&=BIST_read_nvr2_array(readnvr2,i);
- iRes&=BIST_read_nvr1_array(readnvr1,i);//1춨¶á
- f_CE7300_ChkERR(iRes,2);
- if(readnvr1[256]==0xAA)//¼ì2aCOB±êÖ¾
- {
- }
- else
- {
- iRes&=0xffc0^(0x8000>>i);
- f_CE7300_ChkERR(iRes,3);
- }
- }
- DATAIN_LOW;
- TCE7300PWR_ALLOFF;
- debugen=0;
- bisten=0;
- delay_ms(5);
- ALLBist_mode_en();
- iRes&=BIST_allmain_erase(); //
- f_CE7300_ChkERR(iRes,6); //
- pzsector0();
- iRes&=BIST_prgm_allmain_verify(temp,0x0,512); //write Sector0
- f_CE7300_ChkERR(iRes,7);
- iRes&=BIST_prgm_allmain_verify((u8 *)&writebuf[4],0x200,512); //write Sector1
- f_CE7300_ChkERR(iRes,8);
- // iRes&=BIST_prgm_allmain_verify((u8 *)writesector3,0x600,10);
- // f_CE7300_ChkERR(iRes,7);
- for(i=4;i<24;i++)
- {
- iRes&=BIST_prgm_allmain_verify((u8 *)writesector4t24,(0x200*i+0x50),1);// write sector4¡¤sector24
- f_CE7300_ChkERR(iRes,9);
- }
- TCE7300PWR_ALLOFF;
- debugen=0;
- bisten=1;
- delay_ms(6);
- Debug_sram_test();
- iRes&=f_Brother_NorRd2();//2015.04.14
- f_CE7300_ChkERR(iRes,10);
復制代碼
|