I'm finding some JTAG documentation a bit lacking in examples of what I call "typical sequences." My goal is to wiggle a GPIO pin of my device using the JTAG interface. Using the BSDL file for my specific device, I have identified the correct CELL index in the boundary scan register for my pin-of-interest's output3 cell (let's call it index j), I have identified the "output disable" control CELL index for the same pin-of-interest (let's call this index k), and I have identified the "disable" bit polarity required to enable/disable the GPIO output driver (assume a logic '1' puts the pin into high impedance). I have identified the total length of the BOUNDARY_REGISTER (let's call it length N), and identified every single "safe" default bit polarities for every single CELL (let's assume all safe values are a logic '1').
Question Number 1: To drive the output high, would this be the basic sequence of JTAG flow? Step 1) Send the "SAMPLE/PRELOAD" command to the Instruction Register (IR) ("sending" implies walking through all the JTAG TAP controller states and ending back at the RUN/IDLE state). Step 2) Shift N bits to the Data Register (DR), with all bits being the "safe" logic-1 except bit number k, since a low in this bit will enable the output for the pin. Step 3) Send the "EXTEST" command to the Instruction Register (IR), the output pin will update upon completing the Update-IR state. To then change the output to a low state, I would repeat steps 1, 2, and 3, except I will now also set bit number j low in the DR as this sets the output low.
Question Number 2: When sending the N bits to the DR, is it sent LSb first (cell index 0 is sent first), or MSb first (cell index N-1 is sent first)? Or is this manufacturer specific?