FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
5892 Discussions

JTAG chain not seen unless factory_load switch is set

Altera_Forum
Honored Contributor II
1,851 Views

Can't figure out how to recover ... I tried adding the Flash Controller and programming the FPGA Flash and User Application Flash vie the update portal on the  

Arria V start Kit card. 

 

It seemed to go to completion without error but now I can't access JTAG unless the factory_load switch ( SW4.3 ) is set to the factory application. 

If the factory_load swithc is off, ie normal mode , the green LED, D6, JTAG_RX is stuck on when trying to program the FPGA and the JTAG debug took indicates no chain. 

 

I believe I had invalid FLASH addresses for the User Software and tried the factory default restore procedure , which went through but I still can't see any JTAG 

with the factory_load switch in the normal position . 

 

Any ideas on how to recover ? 

 

Thanks, Bob.
0 Kudos
15 Replies
Altera_Forum
Honored Contributor II
725 Views

I have no idea if this applies, but on some devices it is necessary to issue a FACTORY command, eg., here's a Cyclone III LS knowledgebase entry ... 

 

http://www.altera.com/support/kdb/solutions/rd04202010_43.html 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
725 Views

Correction, the LED D8 , SCRX or SCTX comes on and stay on for JTAG operations , normally LED D7 , JTAG_TX comes on for FPGA configuration.

0 Kudos
Altera_Forum
Honored Contributor II
725 Views

If the device is configuring at power-on and somehow disabling JTAG, you could try holding the nCONFIG pin low, and that will keep the device in reset ... but I think still let you access it via JTAG. 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
725 Views

I went in to a previous design, altered the alive LED rate , re-compiled, converted sof -> flash and used the update portal to commit to FLASH the hardware FLASh file and all that works with the new FPGA design committed to FLASG with he new LED fpash rate evident. So teh card basically workd but JTAG seems to not work unless the factory_load switch is set. 

In that case the FPGA and the System Controller show up in the chain. 

 

I plan to go into the Board Test program and try to examine the FLASH contents. 

 

I am not sure where the the Altera Byteblaster ( MAXII ) or the Altera System Controller ( MAX V ) get their configuration from ... Assume from the FLASH image for System controller.
0 Kudos
Altera_Forum
Honored Contributor II
725 Views

Don't know how ... but somehow it has come back to "normal" . 

 

Had some issues running to board test programs but will get back to committing SW for NIOS to FLASH. 

 

Thanks for the help.
0 Kudos
Altera_Forum
Honored Contributor II
725 Views

Still not working correctly. 

Is there a way to dump the FLASH image so I can compare it with the other Arria V Starter Kit card I have ?
0 Kudos
Altera_Forum
Honored Contributor II
725 Views

 

--- Quote Start ---  

 

Is there a way to dump the FLASH image so I can compare it with the other Arria V Starter Kit card I have ? 

 

--- Quote End ---  

 

Just erase it? At that point the board will not configure, and you should be able to use JTAG. 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
725 Views

How to erase it .. I want to restore the braoken card back to how the other cards are ...  

 

The problem is the JTAG chain says it is broken even with inly the FPGA chain enabled. The JATG debug GUI says it  

sees nothing if the "factory_load" switch is in the normal position. If I switch to the factory load position, everything work fine. 

The JTAG chain is vidible to the GTAG debugger and the Portal Update FPGA code runs as well as the application.  

 

Someone mentioned the FLASH part that configures the System Controller may have been altered or some control bits to that to 

put the thing into secure mode and the JTAG chain is disabled.  

 

Via the Portal Update I can commit user configurations to the FLASH but I can't load anything new via JTAG and can't run NIOS load or debug via JATG. 

 

So ... I can try the procedureto restore the facrotey settings  

OR 

... I can try to dump the entire FLASH and compare the contents with a good reference FLASH dump. 

 

I am pretty sure this was my error but would expect the restore factory settings to fix it. 

 

Thanks, Bob.
0 Kudos
Altera_Forum
Honored Contributor II
725 Views

What is the flash package on the board? If its an SOIC (many of the EPCS devices are in this type of package), just remove it, then you know for-sure its blank :) 

 

If there is a "System Controller" on the board, its likely a MAX II or MAX V, which has its own internal flash, so anything you have done to the other flash should not matter. 

 

If you're totally stuck, post the link to the kit on the Altera site, and I'll look at the schematic and give you suggestions. 

 

Cheers. 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
725 Views

Thanks Dave, 

 

I will work on it as a second priority. Here is the URL http://www.altera.com/products/devkits/altera/kit-arria-v-starter.html which 

will point you to a picture as well. As you say, the System Controller MAX® V 5M2210ZF256C4N device and I was not aware that it had internal FLASH. 

 

The FLASH consista of 2 x 1Gb Intel FLASH components which share USER, Factory FPGA configurations, NIOS executable code and some other items.
0 Kudos
Altera_Forum
Honored Contributor II
725 Views

Thanks for the link. The BTS "Erase Flash" feature looks like it only erases a single sector. However, whatever configuration is used with the BTS could also be used to erase the whole flash. If the documentation includes details on the system controller memory map, you should be able to use that via JTAG to erase the flash (the max5.zip has the source, so you can figure it out if needed). However, you should also be able to follow the instructions in Appendix A of the User Guide to restore the board to its factory default state. I'll often do that step as soon as I get a board, just to ensure I have all the correct images. You can restore the MAX V system controller image too. 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
725 Views

Now I'm wondering about the MAX II Byte Blaster II. The LED that is stuck on is driven by the MAX II .. does it have internal FLASH ? 

 

The attached section of the schematic indicates SCTX is the signal stuck on. ( yellow highlight ). There is a mismatch in the schematic  

since the schematic says the associated LED is D9 but the silkscreen on my board says LED D8. 

I may have to bring up the .brd file to determine which signal / LED is the actual one stuck on. 

 

Anyone have any experience with the MAXII Byte Blaster ... is the RTL design available for me to determine why that LED would be stuck 

on when I try JTAG operations and the SW4.3 , "factory_load" is not set on ie user mode ? ... does that mean I have some code in 

the FLASH for the FPGA + NIOS that is loading on power up and shutting down the opening the JTAG loop or somehow shutting down JTAG 

even when I only have the FPGA in the JTAG path . ie all other JTAG devices bypassed ? That us what the factory inferred . 

 

Thanks in advance , Bob. 

 

Also , any hints on getting the BTS to work ... ? I thought I could do a visual check on the FLASH contents on the card that is acting up 

vs the good Arria V starter kit card.
0 Kudos
Altera_Forum
Honored Contributor II
725 Views

 

--- Quote Start ---  

Now I'm wondering about the MAX II Byte Blaster II. The LED that is stuck on is driven by the MAX II .. does it have internal FLASH ? 

--- Quote End ---  

 

Wrong terminology; the circuit you provided an image of is a "USB-Blaster II". 

 

The Cypress FX2 has internal memory and the MAX II has internal memory. Both of these devices need to be correctly programmed with USB-Blaster II firmware (which is proprietary to Altera). 

 

 

--- Quote Start ---  

 

The attached section of the schematic indicates SCTX is the signal stuck on. ( yellow highlight ). There is a mismatch in the schematic  

since the schematic says the associated LED is D9 but the silkscreen on my board says LED D8. 

I may have to bring up the .brd file to determine which signal / LED is the actual one stuck on. 

 

--- Quote End ---  

 

SC = SystemConsole, so my guess is that this is the SystemConsole communications interface transmitter LED. 

 

 

--- Quote Start ---  

 

Anyone have any experience with the MAXII Byte Blaster ... is the RTL design available for me to determine why that LED would be stuck 

on when I try JTAG operations and the SW4.3 , "factory_load" is not set on ie user mode ? ... does that mean I have some code in 

the FLASH for the FPGA + NIOS that is loading on power up and shutting down the opening the JTAG loop or somehow shutting down JTAG 

even when I only have the FPGA in the JTAG path . ie all other JTAG devices bypassed ? That us what the factory inferred . 

 

Also , any hints on getting the BTS to work ... ? I thought I could do a visual check on the FLASH contents on the card that is acting up 

vs the good Arria V starter kit card. 

--- Quote End ---  

 

 

I'd recommend filing a Service Request and talking with someone at Altera directly. 

 

If you're seeing differences between two Arria V starter kits, then its possible you have damaged one :( 

 

Cheers, 

Dave
0 Kudos
Altera_Forum
Honored Contributor II
725 Views

Ok ... yes it is a USB-Blaster II ... I'm thinking about the factory comment ... that the application I programmed the FLASH with may be causing trouble. 

 

That is a convoluted case of FLASH corruption ... so I will try to write the FLASH using the update portal with a minimum FPGA code to flash a LED and no NIOS II core. 

 

I will try that and see if it helps.
0 Kudos
Altera_Forum
Honored Contributor II
725 Views

I went to the Update Portal and re flashed the HW FLASH image the current FLASH contents may be configuring the FPGA and running NIOS II SW causing some 

weird JTAG "side effect" where the JTAG chain was no longer intact.  

 

Once I did this , the application came FPGA application came up running from power up, the JTAG chain check from the tools drop-down menu worked and I was able to program the same FPGA code via the tools programmer. 

 

Thanks for your help ... I still need to get the FLASH programmed with NIOS II SW + boot loader and have the FLASH read interface in the FPGA that I copied from the BTS example. 

 

Thanks for all your help. Bob.
0 Kudos
Reply