Altera_Forum
Honored Contributor
17 years agoProblem when doing a bulk erase using JTAG
Hello,
I am trying to bulk erase a EPM7512AETC144-10 using a 68HC09 microcontroller connected to the JTAG pins of the MAX7000. According to the SVF file, a bulk erase requires the following instructions: !BULK ERASE ! SIR 10 TDI (00A); RUNTEST 1000 TCK; ! So I implemented a function in C to match theses instructions: int j=0; short int IRData[10]={0,1,0,1,0,0,0,0,0,0}; // 1st 10 bits of 0x00A (least significant bits first) ///-----------Disable Interrupt------ # ifdef __HIWARE__ asm TPA; asm PSHA; asm SEI; # else # pragma asm TPA PSHA SEI # pragma endasm # endif PTD_PTD0 = 0; //TMS=0 for (j=0;j<100;j++)clock_Cycle(); //Run test idle for 1ms at least PTD_PTD0 = 1; //TMS=1 clock_Cycle(); //Select DR Scan clock_Cycle(); //Select IR Scan PTD_PTD0 = 0; //TMS=0 clock_Cycle(); //Capture IR Scan clock_Cycle(); //shift IR Scan for (j=0;j<10;j++) { PTD_PTD2 = IRData[j]; //Shifting data bits clock_Cycle(); } PTD_PTD0 = 1; //TMS=1 clock_Cycle(); //EXIT IR clock_Cycle(); //UPDATE IR PTD_PTD0 = 0; //TMS=0 clock_Cycle(); //run test idle ///-----------Enable Interrupts------ # ifdef __HIWARE__ asm PULA; asm TAP; # else # pragma asm PULA TAP # pragma endasm # endif break; However, when this function is called, the MAX7000 doesn't seem to be erased and is even still running. Does anybody see something wrong with this function? Or are there some instructions to perform before theses? I checked the waveforms for TMS and TDI and everything seems to be ok (See the attachment). Thanks , Cyril