SAM4E Xplained Pro

Overview

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

Hardware

  • ATSAM4E16E ARM Cortex-M4F Processor

  • 12 MHz crystal oscillator

  • internal 32.768 kHz crystal oscillator

  • 2 x IS61WV5128BLL 4Mb SRAM

  • MT29F2G08ABAEAWP 2Gb NAND

  • SD card connector

  • CAN-bus (TLE7250GVIOXUMA1 CAN Transceiver)

  • Ethernet port (KSZ8081MNXIA phy)

  • Micro-AB USB device

  • Micro-AB USB debug interface supporting CMSIS-DAP, Virtual COM Port and Data Gateway Interface (DGI)

  • One reset and one user pushbutton

  • 1 yellow user LEDs

Supported Features

The sam4e_xpro 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.

sam4e_xpro/sam4e16e target

Type

Location

Description

Compatible

CPU

on-chip

ARM Cortex-M4F CPU1

arm,cortex-m4f

ADC

on-chip

Atmel SAM family AFEC2

atmel,sam-afec

Clock control

on-chip

Atmel Power Management Controller (PMC)1

atmel,sam-pmc

Counter

on-chip

Atmel SAM Timer Counter (TC) node3

atmel,sam-tc

Ethernet

on-chip

Atmel SAM-family GMAC Ethernet1

atmel,sam-gmac

on-board

Generic MII PHY1

ethernet-phy

Flash controller

on-chip

Atmel SAM Enhanced Embedded Flash Controller (EEFC)1

atmel,sam-flash-controller

GPIO & Headers

on-chip

SAM GPIO Port5

atmel,sam-gpio

on-board

GPIO pins exposed on Atmel Xplained Pro headers3

atmel-xplained-pro-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

MDIO

on-chip

Atmel SAM Family MDIO Driver node1

atmel,sam-mdio

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

SDHC

on-chip

ATMEL (Microchip) SAM HSMCI SD host controller1

atmel,sam-hsmci

Serial controller

on-chip

SAM family UART1 1

atmel,sam-uart

on-chip

Atmel SAM family USART1 1

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

The SAM4E Xplained Pro User Guide [1] has detailed information about board connections. Download the SAM4E Xplained Pro documentation [2] for more detail.

System Clock

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

Serial Port

The ATSAM4E16E MCU has 2 UARTs and 2 USARTs. One of the UARTs (UART0) is configured for the console and is available as a Virtual COM Port by EDBG USB chip.

Programming and Debugging

Flashing the Zephyr project onto SAM4E MCU requires the OpenOCD tool [3]. By default a factory new SAM4E chip will boot SAM-BA boot loader located in the ROM, not the flashed image. This is determined by the value of GPNVM1 (General-Purpose NVM bit 1). The flash procedure will ensure that GPNVM1 is set to 1 changing the default behavior to boot from Flash.

If your chip has a security bit GPNVM0 set you will be unable to program flash memory or connect to it via a debug interface. The only way to clear GPNVM0 is to perform a chip erase procedure that will erase all GPNVM bits and the full contents of the SAM4E flash memory:

  • With the board power off, set a jumper on the J304 header.

  • Turn the board power on. The jumper can be removed soon after the power is on (flash erasing procedure is started when the erase line is asserted for at least 230ms)

Flashing

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

Using OpenOCD

  1. Connect the SAM4E Xplained Pro board to your host computer using the USB debug port. Then build and flash the Hello World application.

    # From the root of the zephyr repository
    west build -b sam4e_xpro samples/hello_world
    west flash
    

Using SAM-BA bootloader

  1. Close the ERASE jumper on the SAM4E Xplained Pro board. Power on the board for 10s.

  2. Open the ERASE jumper.

  3. Connect the SAM4E Xplained Pro 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 sam4e_xpro 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! sam4e_xpro” 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 sam4e_xpro samples/hello_world
west debug

References