救命,JTAG控制某个Pin的问题
各位大侠好,我是第一次弄这个JTAG的东西,现在有个问题,请教各位。我现在要控制px166芯片上的每一个JTAG口,
具体的bsdl如下:
attribute BOUNDARY_LENGTH of aspen_a0_bga: entity is 252;
attribute BOUNDARY_REGISTER of aspen_a0_bga : entity is
-- num cell port functionsafe
" 0( bc_7, EXT_WAKEUP , bidir , X , 1, 0 , Z )," &
" 1( bc_2, * , control , 0 )," &
.
.
.
.
" 250( bc_7, GPIO_37 , bidir , X , 251, 0 , Z )," &
" 251( bc_2, * , control , 0 )" ;
现在的问题是:
能够控制除了最后一个pin外的任何一个pin.
具体的代码如下: for (int j=0;j<252;j++)
{
if ((j==191)||(j==251))
{
m_TagCommandTest.pin = 1;
}
elseif((j==190)||(j==250))
{
if(itimes %2 == 1)
{
m_TagCommandTest.pin = 0;
}
else if(itimes %2 == 0)
{
m_TagCommandTest.pin = 1;
}
}
else
{
m_TagCommandTest.pin = 0;
}
}
m_TagCommandTest.putp(1,0,IP); //Run-Test/Idle
m_TagCommandTest.putp(1,0,IP); //Run-Test/Idle
m_TagCommandTest.putp(1,0,IP); //Run-Test/Idle
m_TagCommandTest.putp(1,0,IP); //Run-Test/Idle
m_TagCommandTest.putp(1,1,IP); //select DR scan
m_TagCommandTest.putp(1,0,IP); //capture DR
m_TagCommandTest.putp(0,0,IP); //shift IR ---> (Rami: should be DR?)
int out_dat;
for(int i = 1; i < 252; i++)// shift write data in to JTAG port and read data out
{
out_dat =putp( pin,0,IP);
}
itimes ++;
putp(0,1,IP); //Exit1-DR
putp(1,1,IP); //Update-DR
putp(1,0,IP); //Run-Test/Idle
putp(1,0,IP); //Run-Test/Idle
putp(1,0,IP); //Run-Test/Idle
//extest();
IR_Command( IR_Extest);
还有 for(int i = 1; i < 252; i++) 这一行为什么从1开始
我快要被弄死了。拜托各位了,谢谢! 有个 out_dat =putp( pin,0,IP);i-1啊,所以必须从1开始。如果需要JTAG,我们提供专业解决方案:http://www.zhefar.com/services-ee.htm#JTAG-EDA-MIS_JTAG 没必要自己搞了,不同器件、不同需求甚至还要二次开发,加上效率、UI易用性,强烈推荐 杭州哲发,我们用过他们的BSTest和yaJFP,确实很好用,并且比老外的性价比高很多。国内最专业做JTAG的公司。http://www.zhefar.com
页:
[1]