title: What does TDO on 4th bit in ICSP SendCommand header mean? (PIC32MX, ICSP 2-wire 4-phase)
body: <p>Right now I'm trying to implement the <a href="http://ww1.microchip.com/downloads/en/DeviceDoc/61145L.pdf" rel="nofollow noreferrer">flash programming specification</a> for PIC32MX. I'm working with a PIC32MX512L and a PIC32MX512H. The PIC32MX512L must eventually transfer a program to the two wires PGEC2 and PGED2 of the PIC32MX512H.</p>
  
  <p>Right now I'm trying to execute the check device operation. As specified, I'm entering the programming mode by MCLR-juggling and executing SetMode (6b011111) on the TMS clock while the TDI clock stays low. The TAP controller replies with zeroes (every TDO is low).</p>
  
  <p>After that I must execute SendCommand( MTAP_SW_MTAP ) to select the MTAP controller. The sequence to be shifted is </p>
  
  <pre><code>(header) 01 01 00 00_ | (data) 00 00 10 00 00 | (most sign. bit) 01 | (footer) 01 00 
  </code></pre>
  
  <p>The first bit of each pairs is the TDI and the second -- TMS. I write TDI on the first clock, TMS on the second clock and read TDO during the third and the fourth clock. This sequence is feeded from the left to the right. Shifted bits hold their value during each clock fall.</p>
  
  <h1>The issue</h1>
  
  <p>After shifting the first 4 pairs, the TDO line goes on the fourth pair high (on the third clock) and low at the end of that 4-phase part (on the fourth clock). I've marked this spot with an underscore in the sequence above. After that the controller ignores any further commands. On the next SendCommand( MTAP_COMMAND ), the TDO stays low and later on for XferData( MCHP_STATUS ) TDO still stays low, no matter how often I send the command.</p>
  
  <p>I've done a small screenshot from my oscilloscope. The blue line is the clock, the green one is the data. The hop on the right is what I mean.</p>
  
  <p><img src="https://i.stack.imgur.com/EWIry.png" alt="http://i.stack.imgur.com/MSGZh.png"></p>
  
  <h1>The question</h1>
  
  <p>Does anyone know what the TAP controller is trying to tell me with that TDO high on the fourth phase?</p>
  
  <p>Thank you in advance!</p>