I am looking for a way to actually read an Atmel processor (SAMD-21) pin setup; but I am not sure how do you actually get the right info from the data sheet.
I did read the pinout, which has names like PA00, PB03 and so on; reading in the multiplexed section, I see a table with each pin, but I can't get what it actually does. I was expecting something like "SPI MOSI" or "Serial TX" and such; instead the table has a ton of entry that does not look like anything that I recognize.
For example Pin 13 is PA08, as type it is mentioned as I2C, and the rest of the line has entry like
NMI AIN[16] X[0] SERCOM0/Pad0 SERCOM2/Pad0 TCC0/WO[0] TCC1/WO[2] I2S/SD[1]
I did search in the section related to pinout, but there is only this table, which while it tell me if the pin is a I2C or SPI, it doesn't give me any context to translate in what I would see on a breakout board for example.
Is there a conversion table that show what these entry mean? I am a SW engineer, so this is my first attempt at reading a datasheet for a processor.
UPDATE:
Found some info online, after looking for SERCOM.
From my understanding, the SAMD21 has programmable pins, but there are some that are set as default for communication related to I2C, SPI and UART. These are under the name "SERCOM".
This show basically the default value for each pin, using an arduino zero board as reference
Pin Default SERCOM SERCOM alt
-----------------------------------------
PA00 xtal SERCOM1.0
PA01 xtal SERCOM1.1
PB08 SERCOM4.0
PB09 SERCOM4.1
PA04 SERCOM0.0
PA05 SERCOM0.1
PA06 SERCOM0.2
PA07 SERCOM0.3
PA08 SERCOM0.0 SERCOM2.0
PA09 SERCOM0.1 SERCOM2.1
PA10 SERCOM0.2 SERCOM2.2
PA11 SERCOM0.3 SERCOM2.3
PB10 MOSI SERCOM4.2
PB11 SCK SERCOM4.3
PA12 MISO SERCOM2.0 SERCOM4.0
PA13 EDBC SERCOM2.1 SERCOM4.1
PA14 SERCOM2.2 SERCOM4.2
PA15 SERCOM2.3 SERCOM4.3
PA16 SERCOM1.0 SERCOM3.0
PA17 SERCOM1.1 SERCOM3.1
PA18 SERCOM1.2 SERCOM3.2
PA19 SERCOM1.3 SERCOM3.3
PA20 SERCOM5.2 SERCOM3.2
PA21 SERCOM5.3 SERCOM3.3
PA22 SDA SERCOM3.0 SERCOM5.0
PA23 SCL SERCOM3.1 SERCOM5.1
PA24 USB SERCOM3.2 SERCOM5.2
PA25 USB SERCOM3.3 SERCOM5.3
PB22 EDBG TX SERCOM5.2
PB23 EDBG RX SERCOM5.3
PA30 SWCLK SERCOM1.2
PA31 SWDIO SERCOM1.3
PB02 SERCOM5.0
PB03 RX LED SERCOM5.1
So basically, you can set any of these pins if you need extra ports for I2C, SPI or UART.
Since I am using the bare SAMD21; I believe that the pins does not even have a default set. If anyone did start with a bare SAMD21, I would really appreciate some guidance about how did you set up the chip.
Datasheet link: http://www.atmel.com/Images/Atmel-42181-SAM-D21_Datasheet.pdf
Pinout : page 26
Muxing table: page 33 to 36