|
发表于 2009-12-4 23:31:38
|
显示全部楼层
the reason for the jtag bug is that if you set up the jtag pins for other uses (other than for jtag) before the communication is established between the jtag and the mcu, you will never be able to debug the chip.
so they are two fixes:
1) intentionally delay the initialization so that you can establish the link between jtag and the mcu before those pins are used for non-jtag purposes. a long delay (>1s for example) will do that. But that is obviously not very efficient.
2) have your own initialization routine before main() or at begining of main() so that you can revert the jtag pins to their jtage functions. this does not have the boot-up delay of the 1st approach, but if you have accidentally set the jtag pins for other uses you can still restore them. |
|