hi all,
I’m trying to control jtag at a low level (every single bit of tms, tdi etc.).
I have OLIMEX ARM-USB-OCD and I’m using mpsse commands with ftdxx API.
I tried JTAG APIs but it seems inmpossible to have a low level control. I don’t understand whether my software is bugged or I can’t use the API. I’m trying to read idcode from a xilinx spartan 2. I looked into the bsdl file to know which is the instruction register length and the ‘IDCODE’ instruction code. The better I obtained, after an afternoon of hard work, is the idcode shifted sx by 1.
Anyway… now I’m trying the mpsse commands. I don’t understand many things but the big question is:
how shall I do to get idcode?
My idea is:
-
go to reset state with the command ‘clock to tms’, shifting 5 1’s. And here I got the first doubt: it is possible to shift only 5 bits instead of 7? “Documentaion” says that the command shifts bit 6 downto 0 to TMS and bit 7 is held static to TDI. But the ‘length’ parameter… what does it mean? The docs says nothing about it in the ‘clock to tms’ command.
-
go to shift-ir state with the command ‘clock to tms’ shifting 00110. Again, I wonder if it is possible to shift only 5 bits.
-
shift in the idcode instruction code (for spartan 2 is 01001). I don’t know how to do this. If I use ‘clock data bits out’ command, who controls the tms value? If I use ‘clock to tms’ command, using the last bit of the “Byte1” to control tdi, who garanties I shift only one bit and not 7 (“6 downto 0 shifted to tms”)?
-
etc… I’d be happy if I understood all the above stuff
My last question is:
is there some other documentation about this, if you can call documentation the pdf on the tfdi chip site. Is there anyone who has clear examples about using this commands and APIs (also JTAG APIs)?
Thanks in advance
NIK