Commit 1c28cbab authored by oharboe's avatar oharboe
Browse files

Some devices such as AVR will return 0xffffffff instead of the TDI

data at the end of the chain. Added kludge to handle this. 

git-svn-id: svn://svn.berlios.de/openocd/trunk@1537 b42882b7-edfa-0310-969c-e2dbd0fdcd60
parent b0d04ab6
......@@ -1531,7 +1531,9 @@ int jtag_examine_chain(void)
u32 part;
u32 version;
if (idcode == 0x000000FF)
/* some devices, such as AVR will output all 1's instead of TDI
input value at end of chain. */
if ((idcode == 0x000000FF)||(idcode == 0xFFFFFFFF))
{
int unexpected=0;
/* End of chain (invalid manufacturer ID)
......@@ -1548,7 +1550,7 @@ int jtag_examine_chain(void)
for (bit_count += 32; bit_count < (JTAG_MAX_CHAIN_SIZE * 32) - 31;bit_count += 32)
{
idcode = buf_get_u32(idcode_buffer, bit_count, 32);
if (unexpected||(idcode != 0x000000FF))
if (unexpected||((idcode != 0x000000FF)&&(idcode != 0xFFFFFFFF)))
{
LOG_WARNING("Unexpected idcode after end of chain! %d 0x%08x", bit_count, idcode);
unexpected = 1;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment