Forum Discussion
Altera_Forum
Honored Contributor
10 years agoI've always used a GPIO with the built-in pull up enabled. It's connected to an external switch that grounded it. Grounded indicating debug mode, open is non-debug mode. The software could read that switch at startup to determine if you were running in debug mode or not.
If this isn't available, you might try a different scheme. I've not used this but it's easy to see if it works or not. Write some characters to the JTAG uart. If the transmit buffer never empties, no JTAG is connected. Don't write more than the FIFO holds or the software will hang waiting for the data to go out (which it never will).