X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=firmware%2Fapps%2Fjtag%2Fjtag.c;fp=firmware%2Fapps%2Fjtag%2Fjtag.c;h=f072c494a234f7d6ff12435d0d42e2bc2d4c6279;hp=bf6f8f819f54fdf32ce8bff32459f3a4b5a9cebd;hb=2dc13be432390fe7eb428693f0f9edbc157a6402;hpb=4a40f1ea2b25e6f9fc306cb197fa3e84f40adc9f diff --git a/firmware/apps/jtag/jtag.c b/firmware/apps/jtag/jtag.c index bf6f8f8..f072c49 100644 --- a/firmware/apps/jtag/jtag.c +++ b/firmware/apps/jtag/jtag.c @@ -519,6 +519,10 @@ uint16_t jtag_trans_16(uint16_t in) //! Shift 8 bits of the IR. uint8_t jtag_ir_shift_8(uint8_t in) { + /* Huseby's code, which breaks MSP430 support. + The code is broken because either the invalid jtag state error + causes the client to give up, or because it adds an extra clock edge. + if (!in_run_test_idle()) { debugstr("Not in run-test-idle state"); @@ -528,9 +532,24 @@ uint8_t jtag_ir_shift_8(uint8_t in) // get intot the right state jtag_capture_ir(); jtag_shift_register(); - - // shift IR bits - return jtag_trans_8(in); + */ + + + + // idle + SETTMS; + jtag_tcktock(); + // select DR + jtag_tcktock(); + // select IR + CLRTMS; + jtag_tcktock(); + // capture IR + jtag_tcktock(); + //jtag_state = CAPTURE_IR; + jtag_state = SHIFT_IR; + // shift IR bits + return jtag_trans_8(in); } //! Shift 16 bits of the DR.