|
From: Tim H. <th...@ga...> - 2019-07-22 16:07:41
|
On Fri, Jul 19, 2019 at 11:02 PM Paul Fertser <fer...@gm...> wrote: > > Hello Tim, > > On Fri, Jul 19, 2019 at 02:50:49PM -0700, Tim Harvey wrote: > > I have a particular board that needs to 'not' have SRST asserted > > during programming yet my JTAG debugger interface provides and > > configures SRST. > > The interface file should be specifying how to use SRST but it > shouldn't actually have "reset_config (trst_and_srst|srst_only)" > because it doesn't belong to interface config. > > > interface I'm using uses ftdi thus its the 'ftdi_layout_signal nSRST > > -oe 0x0020' in my particular adapter config that I comment out to get > > this board to work. > > This line shouldn't affect anything unless you also have reset_config > that enables SRST line. > > For ftdi-adapter ftdi_layout_init should be using values that would > tristate both trst and srst if possible (and if not, set to logical > 1). > > Please check -d3 log to see whether OpenOCD really touches the SRST > line and if yes, where the corresponding reset_config command comes > from. > > Also you can issue another reset_config command after sourcing all of > your configs. > Hi Paul, thanks for the reply! Ok, it makes sense that the interface configures what is hooked up from its point of view but not how the target needs to use those lines. The target I'm using has a ti cc1352 on it which comes up in cJTAG mode and must be put into 4-wire JTAG mode via a sequence. TI has a GIT repo for OpenOCD where they have forked unfortunately (haven't looked through their patches to see why they wouldn't just get these merged upstream): https://git.ti.com/sdo-emu/openocd. They add a post-reset handler that puts it into 4-wire JTAG mode (https://git.ti.com/sdo-emu/openocd/blobs/master/openocd/tcl/target/ti-cjtag.cfg) which is called from here: https://git.ti.com/sdo-emu/openocd/blobs/master/openocd/tcl/target/ti_cc26x0.cfg#line38. They also have a 'reset_config srst_only' defined in their target config (https://git.ti.com/sdo-emu/openocd/blobs/master/openocd/tcl/target/ti_cc26x0.cfg#line54) but this is the config that causes my trouble (Error: Invalid ACK (0) in DAP response) if I leave nSRST configured. To allow properly describing my interfaces SRST I've left in its config, and instead of removing the 'reset_config srst_only' from ti's target/ti_cc26x0.cfg I've added a 'reset_config none' in my board file (which sources ti_cc135x.cfg which sources ti_cc26x0.cfg) and now everything works. I'm not quite sure why the issue exists in the first place but at least I've worked around it in a painless way now. Thanks! Tim |