[9X/2650] Fix occasional interaction between JTAG port and POT3 (fix from Mike following openrcforums discussion)

This commit is contained in:
Andre Bernet
2016-03-22 12:18:29 +04:00
parent 9e61f3e5e0
commit 3eb0c3a953
+4
View File
@@ -2663,9 +2663,13 @@ int main()
#if defined(CPUM2560) || defined(CPUM2561)
uint8_t mcusr = MCUSR; // save the WDT (etc) flags
MCUSR = 0; // must be zeroed before disabling the WDT
MCUCR = 0x80 ; // Disable JTAG port that can interfere with POT3
MCUCR = 0x80 ; // Must be done twice
#elif defined(PCBSTD)
uint8_t mcusr = MCUCSR;
MCUCSR = 0;
MCUCSR = 0x80 ; // Disable JTAG port that can interfere with POT3
MCUCSR = 0x80 ; // Must be done twice
#endif
#if defined(PCBTARANIS)
g_eeGeneral.contrast = 30;