(OpenOCD 0.6.1)
So I’m stacking the deck against myself and trying to do a boundary scan on an Atmega32u4 using a Bus Pirate and OCD with almost zero training or education. Surprisingly, this almost works!
But I have two questions:
First, did I get a bad BSDL file from Atmel? The “Atmega32.bsd” file says “INSTRUCTION_LENGTH of ATmega32: entity is 4” and IDCODE_REGISTER seems to evaluate to “0x5950203f”, but OpenOCD’s scan_chain command says
0 avr32.cpu Y 0x4958703f 0x4958703f 5 0x01 0x01
(note that I modified avr32.cfg to use the 0x4958703f ID so as not to vomit when that was scanned, and 0x4958703f is indeed what I get if I try to scan the right IDCode into the IR; the “5 0x01 0x01” is probably just from the original avr32.cfg; should I change those?)
Second, is there any way to get more of the TDO on an error message? Right now I have a somewhat random SVF file:
! Begin Test Program
! Disable Test Reset line
TRST OFF;
! Enter test-logic-reset
STATE RESET;
ENDIR IDLE;
! Scan the ID opcode into the IR
SIR 4 TDI (1) SMASK(f);
SDR 32 TDI (0) TDO (4958703f) mask(ffffffff);
ENDDR IDLE;
! Scan the EXTEST opcode into the IR
SIR 4 TDI (0) SMASK(f);
SDR 141 TDI (100100440230000000000000000000000008) TDO (10010044023000000000000000000000000A) MASK (0000000000000000000000F0FFFFFFFFFFFF);
! End test program
When I try to run this, OpenOCD says
Time used: 0m0s9ms
svf file programmed successfully for 8 commands
O…kay, but if I change that mask to (0000000000000000000000FFFFFFFFFFFFFF) (plugging up that “0” in the F’s), I get
tdo check error at line 14
read = 0xA, want = 0xA, mask = 0xFFFFFFFF
Time used: 0m0s10ms
svf file programmed failed
in procedure 'svf'
But seeing as I’m learning and have no idea what I’m doing, it’d be very educational to see the whole 141 bits of TDO, because from the looks of it, well, 0xA == 0xA, so what’s the problem?
(for the record, the TDI and TDO I’m attempting are mostly random from the results of trying to make a “safe” vector from parsing the BSDL file… there’s a lot of good-natured flailing going on. I’m mostly trying to detect solder bridges on a single chip using automated testing rather than a microscope, which is overkill, but I’m learning a new skill here with very little beginner-level documentation)