Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20703 Discussions

MAX10: JTAG sharing not working -- how to erase fw-image?

Altera_Forum
Honored Contributor II
2,392 Views

Hi, 

 

target MAX10: 10M02SCU169 

Quartus: 15.1 

 

I was trying to use JTAG sharing on MAX10 so I checked "enable JTAG sharing" and unchecked "enable nCONFIG, nSTATUS, CONF_DONE" and generated JTAG-sharing-fw1 putting JTAG pins to hi-z in user mode. 

 

The JTAGEN is pulled-up always (so JTAG-port should always be active) 

 

I succeed to upload JTAG-sharing-fw1 to MAX10 but immediately after I don't get access to JTAG-port anymore: JTAG-Autodetect command from Programmer-windows is not working anymore and MAX10 device is not recognized "unknown device". 

 

I repeated this test with 3 more boards, all fails the same: they work correctly with any firmware where JTAG sharing is disabled. 

 

I suspect that JTAG-sharing-fw1 is preventing the JTAG-port to work correctly and that for some reasons, JTAGEN is perhaps not correctly sampled (I didnt try to toggle the JTAGEN to see if anything happens) 

 

My questions: 

 

1st q: i want to erase the jtag-sharing-fw1 image from max10 and get back an "empty" MAX10  

 

Could you please tell me which is the procedure? 

 

As far as I could understand, after poweron, I have to set nCONFIG to low and hold it. This will set MAX10 in reset mode so preventing JTAG-sharing-fw1 to be loaded. 

 

While nCONFIG is hold low (FPGA in RESET state) will JTAG-Autodetect command work? 

Should I drive nSTATUS and CONF-DONE as well? how? 

 

2ND Q: is there any REFERENCE design / APP-note where JTAG sharing has been tested?  

 

3RD Q: which is the procedure to RESET the TAP controller using Quartus JTAG debugger? 

 

4TH Q: it there any problem with Quartus 15.1 version?  

 

Thanks for your help, 

L
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
1,039 Views

 

--- Quote Start ---  

Hi, 

 

target MAX10: 10M02SCU169 

Quartus: 15.1 

 

I was trying to use JTAG sharing on MAX10 so I checked "enable JTAG sharing" and unchecked "enable nCONFIG, nSTATUS, CONF_DONE" and generated JTAG-sharing-fw1 putting JTAG pins to hi-z in user mode. 

 

The JTAGEN is pulled-up always (so JTAG-port should always be active) 

 

I succeed to upload JTAG-sharing-fw1 to MAX10 but immediately after I don't get access to JTAG-port anymore: JTAG-Autodetect command from Programmer-windows is not working anymore and MAX10 device is not recognized "unknown device". 

 

I repeated this test with 3 more boards, all fails the same: they work correctly with any firmware where JTAG sharing is disabled. 

 

I suspect that JTAG-sharing-fw1 is preventing the JTAG-port to work correctly and that for some reasons, JTAGEN is perhaps not correctly sampled (I didnt try to toggle the JTAGEN to see if anything happens) 

 

My questions: 

 

1st q: i want to erase the jtag-sharing-fw1 image from max10 and get back an "empty" MAX10  

 

Could you please tell me which is the procedure? 

 

As far as I could understand, after poweron, I have to set nCONFIG to low and hold it. This will set MAX10 in reset mode so preventing JTAG-sharing-fw1 to be loaded. 

 

While nCONFIG is hold low (FPGA in RESET state) will JTAG-Autodetect command work? 

Should I drive nSTATUS and CONF-DONE as well? how? 

 

--- Quote End ---  

 

 

 

Hi, got some info reporting this bug on Quartus from here: " Why can’t I access the MAX 10 device via JTAG even though JTAGEN is pulled high in user mode?" 

 

https://www.altera.com/support/support-resources/knowledge-base/solutions/rd03222016_95.html 

 

and here: "How do I gain access to the JTAG pins of my MAX 10 device if I have enabled the JTAG pin sharing option, and the Quartus Prime Programmer is unable to auto detect the device?" 

 

https://www.altera.com/support/support-resources/knowledge-base/solutions/rd05192016_963.html 

 

In my design, nCONFIG-nSTATUS-CONF_DONE are connected to CPU-GPIOS; so after poweron, I tried to assert-low nCONFIG and hold it low and tried to access JTAG-port with Quartus programmer Autodetect; it doesnt work. Same if I assert-low all signals nCONFIG-nSTATUS-CONF_DONE 

 

My question is:  

 

To erase fw we must force a fw-reload which is triggered by following events (ref to m10_handbook.pdf at page 477) 

 

"........ Reconfiguration is triggered by the following actions: 

• Driving the nSTATUS low externally. 

• Driving the nCONFIG low externally. 

• Driving RU_nCONFIG low." 

 

since in the JTAG-sharing-fw1 generation I have enabled JTAG-sharing and DISABLED nCONFIG-nSTATUS-CONF_DONE, such pins wont work anymore so it is normal that this procedure must fail.  

 

Since nCONFIG is disabled, how to get control back on the JTAG-port?  

 

BR, 

L
0 Kudos
Altera_Forum
Honored Contributor II
1,039 Views

I got into the same problem - programmed an image which didn't define the JTAG pins in my design, so that instead of becoming shared under the control of JTAGEN they became undedicated inputs. 

As described in the other link, problem solved by defining three inputs and an output in the HDL and assigning them to the TDI/TDO/TMS/TCK pins. 

 

 

I rescued my 'bricked' prototypes by soldering a wire onto my nSTATUS and CONF_DONE pins (probably just one of them would have been enough), and holding it to GND while powering up the board. The JTAG will then operate to program the internal memory (or simply erase), and after that things are back to normal and I could remove my wire. 

 

I didn't find a way to soft-configure the device in that state - the JTAG could load the RAM image but holding down the nSTATUS all the way through prevented it from configuring after the download, and letting go of it too soon seemed to start an internal-configure with the bogus image. 

 

Hopefully the OP solved is problem before now, but maybe this will help someone finding this page on a search like I did.
0 Kudos
Altera_Forum
Honored Contributor II
1,039 Views

I recommend to use Q16.1 to design Max 10 project, as your setting it's awkward to let Max 10 return in config mode, only way to let IC in Reset status is keep nConfig low externally when power cycle and then use programmer to erase the flash image.

0 Kudos
Altera_Forum
Honored Contributor II
1,039 Views

Hi. Did someone found how to 'unbrick' MAX10 with OP's problem? I have the same issue right now.  

The JTAG Sharring combobox was checked and nConfig enable combobox was unchecked, so the standart solution sadly won't work.
0 Kudos
Altera_Forum
Honored Contributor II
1,039 Views

Nevermind guys, after doing exactly the same thing as arg I revive the board, to be honest I don't know how and why it helped because all that pins should have been I/O pins.

0 Kudos
MV
New Contributor I
1,039 Views

I just run into the same trap.

Shut down the power, shorted nSTATUS pun to GND, powered-up, erased the Altera chip through JTAG (USB Blaster), released the pin (which has 10k pull-up on my PCBA) and all works again.

0 Kudos
Reply