On Sat, Jan 22, 2011 at 2:03 PM, simon qian <simonqian.open...@gmail.com> wrote:
> According to the feedback of my patch for SWD. I was busy fixing these
> feedback these days.
> I found that dap_to_jtag is not called. So it will be problem to operate
> JTAG after operating SWD.
> In my opinion, dap_to_jtag should be not be called in jtag_init,
> because dap_to_jtag is defined ONLY in adiv5 specification.
> But if I call dap_to_jtag in arm_adi_v5.c or adi_v5_jtag.c, it will fail
> because jtag_id is read before calling dap_to_jtag.
> So I think the initialization sequence should be from upper layer to lower
> layer, which means initialize adiv5 and then initialize jtag.

Hello Simon! As stated on the ARM Infocenter [1]:
-one mode of operation should be selected after target power up, and
this mode should not be changed
-jtag is the default working mode after power-up
-swd-to-jtag and jtag-to-swd should not impact device after power up,
because sequences are designed not to interfere with dap-specific
operations

Therefore I think we should test how select-jtag works on targets
other than ARM. According to the documentation it should be
transparent and ensure target is in JTAG mode. If there are no
problems with non-ARM targets having this sequence applied at
initialization, we should put this into jtag_init procedure..?  On the
other hand even ARM states that target should not be switched between
SWD and JTAG modes multiple times with no powerdown/powerup... but if
we have more than one target on the line, one is JTAG and one is SWD,
then we could ensure working state for them.

Best regards,
Tomek


[1] 
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0316d/Chdhfbhc.html
-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to