SAM4S Xplained

Overview

The SAM4S Xplained evaluation kit is a development platform to evaluate the Atmel SAM4S series microcontrollers.

Hardware

  • ATSAM4S16C ARM Cortex-M4 Processor

  • 12 MHz crystal oscillator

  • internal 32.768 kHz crystal oscillator

  • IS66WV51216DALL 8 Mb SRAM

  • Micro-AB USB device

  • Micro-AB USB debug interface supporting SEGGER OB and Virtual COM Port and Data

  • One reset and one user pushbutton

  • 2 yellow user LEDs

  • IC pads for external flash chip

Supported Features

The sam4s_xplained board supports the hardware features listed below.

on-chip / on-board
Feature integrated in the SoC / present on the board.
2 / 2
Number of instances that are enabled / disabled.
Click on the label to see the first instance of this feature in the board/SoC DTS files.
vnd,foo
Compatible string for the Devicetree binding matching the feature.
Click on the link to view the binding documentation.

sam4s_xplained/sam4s16c target

Type

Location

Description

Compatible

CPU

on-chip

ARM Cortex-M4 CPU1

arm,cortex-m4

ADC

on-chip

Atmel SAM family ADC1

atmel,sam-adc

Clock control

on-chip

Atmel Power Management Controller (PMC)1

atmel,sam-pmc

Counter

on-chip

Atmel SAM Timer Counter (TC) node2

atmel,sam-tc

DAC

on-chip

Atmel SAM family DAC1

atmel,sam-dac

Flash controller

on-chip

Atmel SAM Enhanced Embedded Flash Controller (EEFC)1

atmel,sam-flash-controller

GPIO & Headers

on-chip

SAM GPIO Port3

atmel,sam-gpio

on-board

GPIO pins exposed on Atmel Xplained headers4

atmel-xplained-header

Hardware information

on-chip

ATMEL SAM Reset controller1

atmel,sam-rstc

I2C

on-chip

Atmel SAM Family I2C (TWI)1 1

atmel,sam-i2c-twi

Input

on-board

Group of GPIO-bound input keys1

gpio-keys

Interrupt controller

on-chip

ARMv7-M NVIC (Nested Vectored Interrupt Controller)1

arm,v7m-nvic

LED

on-board

Group of GPIO-controlled LEDs1

gpio-leds

Memory controller

on-chip

Atmel Static Memory Controller (SMC)1

atmel,sam-smc

MMU / MPU

on-chip

ARMv7-M Memory Protection Unit (MPU)1

arm,armv7m-mpu

MTD

on-chip

This binding describes the Atmel SAM flash area layout1

atmel,sam-flash

Pin control

on-chip

Atmel SAM Pinctrl Container1

atmel,sam-pinctrl

Power management

on-chip

Atmel SAM SUPC (Supply-Controller) controller1

atmel,sam-supc

PWM

on-chip

Atmel SAM PWM1

atmel,sam-pwm

RTC

on-chip

Atmel SAM family RTC device1

atmel,sam-rtc

Serial controller

on-chip

SAM family UART2

atmel,sam-uart

on-chip

Atmel SAM family USART2

atmel,sam-usart

SPI

on-chip

Atmel SAM SPI controller1

atmel,sam-spi

SRAM

on-chip

Generic on-chip SRAM description1

mmio-sram

Timer

on-chip

ARMv7-M System Tick1

arm,armv7m-systick

Watchdog

on-chip

ATMEL SAM0 watchdog1

atmel,sam-watchdog

Connections and IOs

Download the SAM4S Xplained Design Files [2] for more information. It has full schematic and gerbers files.

System Clock

The SAM4S MCU is configured to use the 12 MHz internal oscillator on the board with the on-chip PLL to generate an 84 MHz system clock.

Serial Port

The ATSAM4S16C MCU has 2 UARTs and 2 USARTs. One of the UARTs (UART0) is connected to the Segger J-Link OB chip (the AT91SAM3U4 is programmed to be Segger J-Link OB). Segger J-Link OB brings the UART out as a virtual COM port. The section flashing uses the UART from the Segger USB debug connection.

Programming and Debugging

The SAM4S Xplained board comes with Segger J-Link OB. This provides a debug interface to the SAM4S16C chip. You can use Ozone or JLink to communicate with the SAM4S16C.

Flashing

For flash the board Zephyr provides two paths. One uses the default JLink tool and the second one uses SAM Boot Assistant (SAM-BA).

Using SAM-BA bootloader

  1. Close the J25 jumper on the SAM4S Xplained board. Power on the board for 10s.

  2. Open the J25 jumper.

  3. Connect the SAM4S Xplained board to your host computer using the SoC USB port. Then build and flash the Hello World application.

    # From the root of the zephyr repository
    west build -b sam4s_xplained samples/hello_world
    
    $ west flash -r bossac
    

Visualizing the message

  1. Run your favorite terminal program to listen for output. Under Linux the terminal should be /dev/ttyACM0. For example:

    $ minicom -D /dev/ttyACM0 -o
    

    The -o option tells minicom not to send the modem initialization string. Connection should be configured as follows:

    • Speed: 115200

    • Data: 8 bits

    • Parity: None

    • Stop bits: 1

  2. Press reset button

    You should see “Hello World! sam4s_xplained” in your terminal.

Debugging

You can debug an application in the usual way. Here is an example for the Hello World application.

# From the root of the zephyr repository
west build -b sam4s_xplained samples/hello_world
west debug

References