On Feb 18, 2009, at 5:05 AM, Holger Schurig wrote:

Hi !

Right now I'm trying to access the memory and CPU SoC registers
via JTAG. My documentation says this for memory access:

1. Select the DR Scan path
2. Scan in the 34-bit address of the data to access, and a
direction bit (1=read, 0=write).
3. Go to Update-DR and re-enter Select-DR Scan
4. For a read operation, scan out the contents of the addressed
area. For a write opera-
  tion, scan in the new contents of the area.
5. Return to Run-Test/Idle


I guess step 5 would be the first:

jtag_add_end_state(TAP_IDLE);


Then I need to transfer the JTAG opcode (0x11). I noticed that
almost all processors define some variant XXXX_set_instr()
function. I'll do the same, but eventually provide a patch that
get's rid of all this similar functions and add this as a helper
to jtag.c/jtag.h. So I'd do:

jtag_set_instr(tap, 0x11);


I'm not sure that putting such a function in the jtag code is appropriate. JTAG really only specifies IR and DR scans. Nearly everything built on top of them is target specific.

Now, I need to push 34 bits down, I'd populate a scan_field_t
according and call jtag_add_dr_scan(tap, field, XXX).

Should I simply use "TAP_DRUPDATE", as the doc said "Go to
Update-DR" ??  And how do I then go to "Select-DR Scan" again?
Does this happen implicitly when I add another field with
jtag_add_dr_scan() ?

A DR scan will go down the full DR scan portion of the state machine. If you add 2 back to back DR scans, I expect it will do what you need.


_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

--
Rick Altherr
[email protected]

"He said he hadn't had a byte in three days. I had a short, so I split it with him."
 -- Unsigned



Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to