Skip to content

Commit 2ef5b78

Browse files
helmut64cmaglie
authored andcommitted
Added alternate ports 44,45 to make the SWCLK and SWDIO pins available
when no debugger is being used. BTW. The presence of a debugger can be checked via: if (DSU->STATUSB.bit.DBGPRES) ...
1 parent 253e40e commit 2ef5b78

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

variants/arduino_zero/variant.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@
9696
* | | GND | | |
9797
* | 42 | AREF | PA03 | | EIC/EXTINT[3] *[ADC|DAC]/VREFA ADC/AIN[1] PTC/Y[1]
9898
* +------------+------------------+--------+-----------------+--------------------------------------------------------------------------------------------------------
99+
* | 43 | | PA02 | | Alternate use of A0 (DAC output)
100+
* | 44 | | PA30 | | SWCLK, alternate use EXTINT[10] TCC1/WO[0] SERCOM1/PAD[2]
101+
* | 45 | | PA31 | | SWDIO, alternate use EXTINT[11] TCC1/WO[1] SERCOM1/PAD[3]
102+
* +------------+------------------+--------+-----------------+--------------------------------------------------------------------------------------------------------
99103
* | |32.768KHz Crystal | | |
100104
* +------------+------------------+--------+-----------------+--------------------------------------------------------------------------------------------------------
101105
* | | | PA00 | XIN32 | EIC/EXTINT[0] SERCOM1/PAD[0] TCC2/WO[0]
@@ -193,8 +197,10 @@ const PinDescription g_APinDescription[]=
193197
{ PORTA, 3, PIO_ANALOG, PIN_ATTR_ANALOG, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_NONE }, // DAC/VREFP
194198

195199
// ----------------------
196-
// 43 - Alternate use of A0 (DAC output)
200+
// 43..45 - Alternate use of A0 (DAC output), 44 SWCLK, 45, SWDIO
197201
{ PORTA, 2, PIO_ANALOG, PIN_ATTR_ANALOG, DAC_Channel0, NOT_ON_PWM, NOT_ON_TIMER, EXTERNAL_INT_2 }, // DAC/VOUT
202+
{ PORTA, 30, PIO_PWM, PIN_ATTR_DIGITAL|PIO_SERCOM, No_ADC_Channel, NOT_ON_PWM, TCC1_CH0, EXTERNAL_INT_10 }, // SWCLK
203+
{ PORTA, 31, PIO_PWM, PIN_ATTR_DIGITAL|PIO_SERCOM, No_ADC_Channel, NOT_ON_PWM, TCC1_CH1, EXTERNAL_INT_11 }, // SWDIO
198204
} ;
199205

200206
const void* g_apTCInstances[TCC_INST_NUM+TC_INST_NUM]={ TCC0, TCC1, TCC2, TC3, TC4, TC5 } ;

0 commit comments

Comments
 (0)