Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

SimplePublish for SAM C21 Xplained Pro

The QSL includes a SimplePublish example for the Atmel SAM C21 Xplained Pro evaluation kit. This is an Atmel Studio 7 project based on the Atmel Software Framework (ASF). The main.c code itself is similar to the one for RPi, with the addition of a watchdog timer and initialization of a second serial port to enable debug prints (the watchdog is for demonstration purposes only, and can be removed as the user see fit).

Although the code is written specifically for the ATSAMC21J18A on the SAM C21 Xplained Pro evaluation kit, it should be pretty straightforward to port it to similar architectures since ASF is used. Correctly configuring the available serial ports (SERCOM) in serial.c/.h should be the only thing that might require some adaptation.

Prepare Atmel Studio

Download and run the Atmel Studio web installer from the official download page, and follow the instructions. This will also install the necessary drivers for the embedded debugger on the Xplained Pro board.

Prepare the SAM C21 Xplained Pro

Connect to Mote

Image Added

Figure 1: Mote connected to the SAM C21 Xplained Pro.

 

NamePin #Name
ID12GND
ADC+34ADC-
GPIO056

GPIO1

PWM+78PWM-
IRQ910SPI_SS_B
TWI_SDA1112TWI_SCL
UART_RX1314UART_TX
SPI_SS_A1516SPI_MOSI
SPI_MISO1718SPI_SCK
GND1920VCC

Table 1: Xplained Pro Standard Extention Header.


Xplained ProMote
VCCVBAT
GNDGND
UART_TXRX
UART_RXTX
GNDRX RTSn
GNDTX CTSn

Table 2: Xplained Pro to mote pin mapping.