I managed to build UrJTAG (with Python3 binding turned ON) to run on a Raspberry Pi2.
After compiling, the executable launch by"sudo JTAG" launched and detected the device correctly
The device has this in the BSDL (I am only pasting the 2 pins where I am working on)
bit 185 I 1 PB00_10
bit 184 O 1 PB00_10 183 0 Z
bit 183 C 0 *
bit 137 I 1 PB01_08
bit 136 O 1 PB01_08 135 0 Z
bit 135 C 0 *
jtag> INSTRUCTION EXTEST
jtag> SHIFT IR
jtag> set signal PB00_10 out 1 // Confirmed Bit Set OK
jtag> SHIFT DR
jtag> set signal PB00_10 out 0 // Confirmed Bit Set OK
jtag> SHIFT DR
jtag> SHIFT DR
jtag> get signal PB01_08 // Confirmed bit read OK
jtag> SHIFT DR
jtag> get signal PB01_08 //Readback OK
So all looks fine.
I attempted to do the same sequence in Python3. I was able to get the ID code correct
Up to here everything looks OK. No error message and the DeviceID was detected correctly.
Next I tried to send a bit out to PB00_10 (index 184) read a bit back from PB01_08 (index 137)
urc.set_instruction("EXTEST")
urc.shift_ir()
# try to set the corresponding pin to 1
urc.set_dr_out(1, 184)
urc.shift_dr()
# try to set the register bit to 0
urc.set_dr_out(0, 184)
urc.shift_dr()
# try to readback the pin state into the register
urc.shift_dr()
drval = urc.get_dr_in()
Neither of the instruction set or get instructions are doing what I need it to do.
Appreciate if anyone could advise path to move forward.
Thanks
Last edit: Smartcat 2017-04-12
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think you've got in and out reversed: to set output pins or control bits, use set_dr_in() to set values that will get scanned in to the chain of chips on TDI.
To fetch status captured from pins or internal state and then scanned out of the chip on TDO, use get_dr_out(). These are the directions used inside the urjtag code, and are necessarily backwards from the way you think of pins controlled or observed with the boundary scan register.
get_dr_in() is useful mainly to see what other python code has set.
set_dr_out() isn't very useful.
the examples in doc/urjtag-python.txt could probably be improved.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi SMARTCART,
I will be glad if you send the files project with instractions,
can you explain in details how you create the project ?
in hardware what you connects and how?
in software which lib you install?
can i test bus data etc,,,
thank you
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I managed to build UrJTAG (with Python3 binding turned ON) to run on a Raspberry Pi2.
After compiling, the executable launch by"sudo JTAG" launched and detected the device correctly
The device has this in the BSDL (I am only pasting the 2 pins where I am working on)
So all looks fine.
I attempted to do the same sequence in Python3. I was able to get the ID code correct
Up to here everything looks OK. No error message and the DeviceID was detected correctly.
Next I tried to
send a bit out to PB00_10 (index 184)
read a bit back from PB01_08 (index 137)
Neither of the instruction set or get instructions are doing what I need it to do.
Appreciate if anyone could advise path to move forward.
Thanks
Last edit: Smartcat 2017-04-12
I think you've got in and out reversed: to set output pins or control bits, use set_dr_in() to set values that will get scanned in to the chain of chips on TDI.
To fetch status captured from pins or internal state and then scanned out of the chip on TDO, use get_dr_out(). These are the directions used inside the urjtag code, and are necessarily backwards from the way you think of pins controlled or observed with the boundary scan register.
get_dr_in() is useful mainly to see what other python code has set.
set_dr_out() isn't very useful.
the examples in doc/urjtag-python.txt could probably be improved.
Hi SMARTCART,
I will be glad if you send the files project with instractions,
can you explain in details how you create the project ?
in hardware what you connects and how?
in software which lib you install?
can i test bus data etc,,,
thank you