SAMD21-M0-Mini icon indicating copy to clipboard operation
SAMD21-M0-Mini copied to clipboard

D2 & D4 connections

Open n9wxu opened this issue 5 years ago • 3 comments

I have discovered on the batch of these M0-Mini's I just bought that D2 -> PA8 and D4 -> PA14

I cannot find any version data or schematics to match this.

n9wxu avatar Aug 25 '19 18:08 n9wxu

Compared to the schematic of Arduino Zero, where the Pins Dx are called TCC0-Wy and the numbering has to be derived from connector pins (J101, J102), D4 = J102.5 = TCC0-W0 is connected to PA8 and D2 = J102.3 = TCC0-W4 is connected to PA14. But the schematic of Arduino M0 shows different (changed) assignments with D4 = JOL.5 = TCC0-W4 connected to PA14 and D2 = JOL.3 = TCC0-W0 connected to PA8. For Arduino it is not a problem, because they may have any adaption in their variant-files. But for me, as I access the pins direct via ports, it is an issue. Here it is, that the pin assignment in the ReadMe.md is that of Arduino M0 and not that of Arduino Zero. But the assignments in Arduino Zero seem to be simply wrong, because compared to the pin numbers of the CPU and their meaning (see CPU datasheet) show, that D2->PA8->CPU.13 and D4->PA14->CPU.23 is correct.

Update 2022-04-19 Today I detected, that there is a mix of D2 and D4 with this board. I had to change the pin assignments in my header file to get values correct at the D2 to D5 pins (I use these 4 pins to show the value of a decimal turn switch connected at A0 to A3).

RobertPatzke avatar Apr 12 '22 10:04 RobertPatzke

I hit the same issue. D2 and D4 seem to be swapped.

jpmeijers avatar Aug 17 '22 14:08 jpmeijers