Open GoogleCodeExporter opened 9 years ago
[deleted comment]
I was having a problem disabling JTAG on my atmega644p. I tried the above by
changing JTAG to 0xDA but that didn't work. So I used the following code
"MCUCR|= (1<<JTD); MCUCR|= (1<<JTD);" it needs to be written twice for it to
work according to the data sheet. Include the code inside the void setup()
section and it worked :) Only down side though it needs to be included in every
sketch :(
According to Atmega644p datasheet page 275. The MCU Control Register contains
control bits for general MCU functions. Bits 7 – JTD: JTAG Interface Disable.
When this bit is zero, the JTAG interface is enabled if the JTAGEN Fuse is
programmed. If this bit is one, the JTAG interface is disabled. In order to
avoid unintentional disabling or enabling of the JTAG interface, a timed
sequence must be followed when changing this bit: The application software must
write this bit to the desired value twice within four cycles to change its
value. Note that this bit must not be altered when using the On-chip Debug
system.
Original comment by yassirsh...@gmail.com
on 26 Feb 2013 at 7:41
Original issue reported on code.google.com by
einkauf.cn
on 10 Nov 2012 at 9:21