Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

JTAG issues after 5.1 SP1 and Flash Programmer

Hello all,

I've read several posts concerning JTAG Downloading issues. I have a custom EP2C8 board that I've had similar if not the exact same issues as others here have described. One thing that I did to work around the issue is add enable/disable logic to all of my internal circuitry so that everything boots up disabled. Then after the NIOS boots, it can enable the circuitry. This worked for me. I don't know if it was current draw with all of my circuitry working or internal noise affecting the JTAG circuitry or what, but I do know that by disabling everything, I was able to download code via the JTAG cable.

Now that that is out of the way, on to my question. I just upgraded to 5.1 SP1 and tried to go through all the steps to program the EPCS4 with my hardware file and my software file. I've used the command line and the IDE, both fail at the programming stage. I can see the flash being erased. I even once got a success while using the command line and programming just my software file, but I couldn't repeat it. I've read the flash back out and can see that some data is being written, and it closely resembles what is in my software file. I think this is the same old JTAG issue that affected me earlier. Except now, there is a lot more data that is being send over the JTAG cable than just downloading my code.

Here is the output from my command line attempt:

[SOPC Builder]$ nios2-flash-programmer --epcs --base=800 --debug epcs_controller.flash

Using cable "USB-Blaster [USB-0]", device 1, instance 0x00

Resetting and pausing target processor: OK

Processor data bus width is 32 bits

Looking for EPCS registers at address 0x00000800 (with 32bit alignment)

Initial values: 0001703A 04C00074 9801483A 9CFFF804 983FFD1E 0000203A

Not here: reserved fields are non-zero

Looking for EPCS registers at address 0x00000900 (with 32bit alignment)

Initial values: 002EE03A 00000106 6800683A 03010004 93000335 02C0C034

Not here: reserved fields are non-zero

Looking for EPCS registers at address 0x00000A00 (with 32bit alignment)

Initial values: 00000000 00000000 00000260 00000000 00000000 00000001

Valid registers found

EPCS signature is 0x12

EPCS device doesn't support RDID command

Using EPCS size information from section [EPCS-12]

Device size is 0MByte (4Mbit)

Erase regions are:

offset 0: 8 x 64K

EPCS status is 0x00

: Checksumming existing contents

00020000 : Verifying existing contents

00020000 : Needs erase then program

00030000 : Verifying existing contents

00030000 : Needs erase then program

00020000 : Reading existing contents

00030000 : Reading existing contents

Checksummed/read 128kB in 3.0s

00020000 ( 0%): Erasing

00030000 (50%): Erasing

Erased 128kB in 10.5s (12.1kB/s)

00020000 ( 0%): Programming

Program failed

Leaving target processor paused

This is very frustrating to say the least. I'm open to suggestions.

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    After reading other posts about adding series resistors to clock lines, I changed my JTAG resistor pack from 10K to 1K. I can now successfully program the EPCS4 using the IDE's Flash Programmer. After looking at the signals more closely with a scope, I noticed that they weren't going up to 3.3V like they should. So I thought a stronger pullup on the lines might help. It seems to have worked for me.