Microchip® Advanced Software Framework

SAM RTC Unit Test

Overview:

Introduction

This unit test carries out tests for WDT driver.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for the BOD driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2S driver.

This unit test carries out tests for TC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.
  • Application as a bridge for I2C slave bootloader self programming
  • Uses USB Communication Device Class(CDC)
  • I2C Master sends the data to be programmed over I2C bus

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This application calibrates the internal OSC8M (8MHz) oscillator of the device against a known, accurate external clock or crystal frequency.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This unit test carries out tests for the I2S driver.

It consists of test cases for the following functionalities:

  • Test for polled mode transmit/receive of I2S.
  • Test for callback mode transmit/receive of I2S.

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

  • Application for self programming
  • Uses I2C Slave interface
  • I2C Master sends the data to be programmed over I2C bus
  • Resets the device after programming and starts executing application

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application runs a suite of tests for the AT25DFx SerialFlash driver with any SPI HAL that is supported by the driver and for which setup code has been added to this application.

This unit test carries out tests for the BOD driver.

It consists of test cases for the following functionalities:

  • Test for BOD initialization.
  • Test for BOD detected.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design, and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the USB Stack for applications, included in ASF as middleware service.

asf_structure.jpg

For more information on ASF USB Stack and ASF, refer to the online documentation at following link:

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

This application demonstrates the use of the OLED1 Xplained Pro extension board for the SAM Xplained Pro with a Tic-tac-toe game.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This example demonstrates the different functional modes of Analog Comparator (AC) module in SAM D21 devices.

The following kit is required for carrying out the test:

  • SAM D21 Xplained Pro board
  • SAM L21 Xplained Pro board
  • SAM L22 Xplained Pro board
  • SAM L22 Xplained Pro B board
  • SAM R21 Xplained Pro board
  • SAM DA1 Xplained Pro board
  • SAM C21 Xplained Pro board
  • SAM D20 Xplained Pro board
  • SAM R30 Xplained Pro board
  • SAM R30 Module Xplained Pro board
  • SAM R34 Xplained Pro board
  • WLR 089 Xplained Pro board

Setup

To run the test:

  • Connect the supported Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • Different modes of the RTC are tested.

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for WDT driver.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for the BOD driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2S driver.

This unit test carries out tests for TC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.
  • Application as a bridge for I2C slave bootloader self programming
  • Uses USB Communication Device Class(CDC)
  • I2C Master sends the data to be programmed over I2C bus

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This application calibrates the internal OSC8M (8MHz) oscillator of the device against a known, accurate external clock or crystal frequency.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This unit test carries out tests for the I2S driver.

It consists of test cases for the following functionalities:

  • Test for polled mode transmit/receive of I2S.
  • Test for callback mode transmit/receive of I2S.

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

  • Application for self programming
  • Uses I2C Slave interface
  • I2C Master sends the data to be programmed over I2C bus
  • Resets the device after programming and starts executing application

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application runs a suite of tests for the AT25DFx SerialFlash driver with any SPI HAL that is supported by the driver and for which setup code has been added to this application.

This unit test carries out tests for the BOD driver.

It consists of test cases for the following functionalities:

  • Test for BOD initialization.
  • Test for BOD detected.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design, and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the USB Stack for applications, included in ASF as middleware service.

asf_structure.jpg

For more information on ASF USB Stack and ASF, refer to the online documentation at following link:

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

This application demonstrates the use of the OLED1 Xplained Pro extension board for the SAM Xplained Pro with a Tic-tac-toe game.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This example demonstrates the different functional modes of Analog Comparator (AC) module in SAM D21 devices.

The following kit is required for carrying out the test:

  • SAM D21 Xplained Pro board
  • SAM L21 Xplained Pro board
  • SAM L22 Xplained Pro board
  • SAM L22 Xplained Pro B board
  • SAM R21 Xplained Pro board
  • SAM DA1 Xplained Pro board
  • SAM C21 Xplained Pro board
  • SAM D20 Xplained Pro board
  • SAM R30 Xplained Pro board
  • SAM R30 Module Xplained Pro board
  • SAM R34 Xplained Pro board
  • WLR 089 Xplained Pro board

Setup

To run the test:

  • Connect the supported Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • Different modes of the RTC count are tested.

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for WDT driver.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for the BOD driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2S driver.

This unit test carries out tests for TC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.
  • Application as a bridge for I2C slave bootloader self programming
  • Uses USB Communication Device Class(CDC)
  • I2C Master sends the data to be programmed over I2C bus

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This application calibrates the internal OSC8M (8MHz) oscillator of the device against a known, accurate external clock or crystal frequency.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This unit test carries out tests for the I2S driver.

It consists of test cases for the following functionalities:

  • Test for polled mode transmit/receive of I2S.
  • Test for callback mode transmit/receive of I2S.

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

  • Application for self programming
  • Uses I2C Slave interface
  • I2C Master sends the data to be programmed over I2C bus
  • Resets the device after programming and starts executing application

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application runs a suite of tests for the AT25DFx SerialFlash driver with any SPI HAL that is supported by the driver and for which setup code has been added to this application.

This unit test carries out tests for the BOD driver.

It consists of test cases for the following functionalities:

  • Test for BOD initialization.
  • Test for BOD detected.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design, and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the USB Stack for applications, included in ASF as middleware service.

asf_structure.jpg

For more information on ASF USB Stack and ASF, refer to the online documentation at following link:

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

This application demonstrates the use of the OLED1 Xplained Pro extension board for the SAM Xplained Pro with a Tic-tac-toe game.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This example demonstrates the different functional modes of Analog Comparator (AC) module in SAM D21 devices.

The following kit is required for carrying out the test:

  • SAM D20 Xplained Pro board
  • SAM D21 Xplained Pro board
  • SAM R21 Xplained Pro board
  • SAM L21 Xplained Pro board
  • SAM L22 Xplained Pro board
  • SAM C21 Xplained Pro board
  • SAM DA1 Xplained Pro board
  • SAM HA1G16A Xplained Pro board
  • SAM R30 Xplained Pro board

Setup

The following connections has to be made using wires:

  • None

The NVMCTRL_FUSES_EEPROM_SIZE has to be set to 0x00 in the fuse setting of the device to run this test. Atmel Studio can be used to set this fuse (Tools->Device Programming).

To run the test:

  • Connect the SAM Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • The unit test first initializes the EEPROM emulator and formats the memory if not previously done.
  • The test writes a buffer of data to arbitrary offset and reads back and compares
  • The test then writes a page of data to a page and reads back and compares

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for WDT driver.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for the BOD driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2S driver.

This unit test carries out tests for TC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.
  • Application as a bridge for I2C slave bootloader self programming
  • Uses USB Communication Device Class(CDC)
  • I2C Master sends the data to be programmed over I2C bus

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This application calibrates the internal OSC8M (8MHz) oscillator of the device against a known, accurate external clock or crystal frequency.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This unit test carries out tests for the I2S driver.

It consists of test cases for the following functionalities:

  • Test for polled mode transmit/receive of I2S.
  • Test for callback mode transmit/receive of I2S.

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

  • Application for self programming
  • Uses I2C Slave interface
  • I2C Master sends the data to be programmed over I2C bus
  • Resets the device after programming and starts executing application

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application runs a suite of tests for the AT25DFx SerialFlash driver with any SPI HAL that is supported by the driver and for which setup code has been added to this application.

This unit test carries out tests for the BOD driver.

It consists of test cases for the following functionalities:

  • Test for BOD initialization.
  • Test for BOD detected.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design, and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the USB Stack for applications, included in ASF as middleware service.

asf_structure.jpg

For more information on ASF USB Stack and ASF, refer to the online documentation at following link:

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

This application demonstrates the use of the OLED1 Xplained Pro extension board for the SAM Xplained Pro with a Tic-tac-toe game.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This example demonstrates the different functional modes of Analog Comparator (AC) module in SAM D21 devices.

The following kit is required for carrying out the test:

  • SAM D20 Xplained Pro board
  • SAM D21 Xplained Pro board
  • SAM R21 Xplained Pro board
  • SAM L21 Xplained Pro board
  • SAM L22 Xplained Pro board
  • SAM DA1 Xplained Pro board
  • SAM HA1G16A Xplained Pro board
  • SAM C21 Xplained Pro board
  • SAM R30 Xplained Pro board
  • SAM R34 Xplained Pro board
  • WLR 089 Xplained Pro board

Setup

The following connections has to be made using wires: -SAM D20 Xplained Pro

  • SCK: EXT3 PIN18 (PB23) <–> EXT2 PIN15 (PA17)
  • SS_0: EXT3 PIN15 (PB17) <–> EXT2 PIN16 (PA18)
  • DI/DO: EXT3 PIN17 (PB16) <–> EXT2 PIN17 (PA16)
  • DO/DI: EXT3 PIN16 (PB22) <–> EXT2 PIN18 (PA19) -SAM D21/DA1 Xplained Pro
  • SCK: EXT3 PIN15 (PB17) <–> EXT2 PIN15 (PA17)
  • SS_0: EXT3 PIN16 (PB22) <–> EXT2 PIN16 (PA18)
  • DI/DO: EXT3 PIN17 (PB16) <–> EXT2 PIN17 (PA16)
  • DO/DI: EXT3 PIN18 (PB23) <–> EXT2 PIN18 (PA19) -SAM HA1G16A Xplained Pro
  • SCK: EXT3 PIN17 (PA16) <–> EXT1 PIN16 (PA04)
  • SS_0: EXT3 PIN18 (PA17) <–> EXT1 PIN18 (PA05)
  • DI/DO: EXT3 PIN15 (PA20) <–> EXT1 PIN15 (PA10)
  • DO/DI: EXT3 PIN16 (PA21) <–> EXT1 PIN17 (PA11)

SAM R21 Xplained Pro

  • SS_0: EXT1 PIN15 (PB03) <–> EXT1 PIN12 (PA17)
  • DI/D0: EXT1 PIN16 (PB22) <–> EXT1 PIN7 (PA18)
  • DO/DI: EXT1 PIN17 (PB02) <–> EXT1 PIN11 (PA16)
  • SCK: EXT1 PIN18 (PB23) <–> EXT1 PIN8 (PA19)

SAM L21 Xplained Pro

  • DO/DI: EXT3 PIN9 (PA16) <–> EXT3 PIN17 (PB16)
  • SS_0: EXT2 PIN15 (PA17) <–> EXT3 PIN15 (PB17)
  • DI/DO: EXT2 PIN14 (PA18) <–> EXT3 PIN16 (PB22)
  • SCK: EXT2 PIN13 (PA19) <–> EXT3 PIN18 (PB23)

SAM L22 Xplained Pro.

  • SS_0: EXT1 PIN15 (PB21) <–> EXT2 PIN15 (PA17)
  • DO/DI: EXT1 PIN16 (PB00) <–> EXT2 PIN17 (PA16)
  • DI/DO: EXT1 PIN17 (PB02) <–> EXT2 PIN16 (PA18)
  • SCK: EXT1 PIN18 (PB01) <–> EXT2 PIN18 (PA19)

SAM C21 Xplained Pro.

  • SS_0: EXT1 PIN15 (PA17) <–> EXT2 PIN15 (PB03)
  • DO/DI: EXT1 PIN16 (PA18) <–> EXT2 PIN17 (PB02)
  • DI/DO: EXT1 PIN17 (PA16) <–> EXT2 PIN16 (PB00)
  • SCK: EXT1 PIN18 (PA19) <–> EXT2 PIN18 (PB01)

SAM R30 Xplained Pro

  • DO/DI: EXT1 PIN11 (PA16) <–> EXT3 PIN17 (PB02)
  • SS_0: EXT1 PIN12 (PA17) <–> EXT3 PIN15 (PA14)
  • DI/DO: EXT1 PIN7 (PA18) <–> EXT3 PIN16 (PB22)
  • SCK: EXT1 PIN8 (PA19) <–> EXT3 PIN18 (PB23)

SAM R34 Xplained Pro

  • DO/DI: EXT1 PIN11 (PA16) <–> EXT1 PIN17 (PB02)
  • SS_0: EXT1 PIN12 (PA17) <–> EXT1 PIN15 (PA23)
  • DI/DO: EXT1 PIN7 (PA18) <–> EXT1 PIN16 (PB22)
  • SCK: EXT1 PIN8 (PA19) <–> EXT1 PIN18 (PB23)

WLR 089 Xplained Pro

  • DO/DI: EXT1 PIN11 (PA16) <–> EXT1 PIN17 (PB02)
  • SS_0: EXT1 PIN12 (PA17) <–> EXT1 PIN15 (PA23)
  • DI/DO: EXT1 PIN7 (PA18) <–> EXT1 PIN16 (PB22)
  • SCK: EXT1 PIN8 (PA19) <–> EXT1 PIN18 (PB23)

To run the test:

  • Connect the SAM Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • The unit tests are carried out with SERCOM1 on EXT2 as SPI master and SERCOM0 on EXT1 as SPI slave.
  • Data is transmitted from master to slave in lengths of a single byte as well as multiple bytes.

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for WDT driver.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for the BOD driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2S driver.

This unit test carries out tests for TC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.
  • Application as a bridge for I2C slave bootloader self programming
  • Uses USB Communication Device Class(CDC)
  • I2C Master sends the data to be programmed over I2C bus

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This application calibrates the internal OSC8M (8MHz) oscillator of the device against a known, accurate external clock or crystal frequency.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This unit test carries out tests for the I2S driver.

It consists of test cases for the following functionalities:

  • Test for polled mode transmit/receive of I2S.
  • Test for callback mode transmit/receive of I2S.

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

  • Application for self programming
  • Uses I2C Slave interface
  • I2C Master sends the data to be programmed over I2C bus
  • Resets the device after programming and starts executing application

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application runs a suite of tests for the AT25DFx SerialFlash driver with any SPI HAL that is supported by the driver and for which setup code has been added to this application.

This unit test carries out tests for the BOD driver.

It consists of test cases for the following functionalities:

  • Test for BOD initialization.
  • Test for BOD detected.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design, and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the USB Stack for applications, included in ASF as middleware service.

asf_structure.jpg

For more information on ASF USB Stack and ASF, refer to the online documentation at following link:

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

This application demonstrates the use of the OLED1 Xplained Pro extension board for the SAM Xplained Pro with a Tic-tac-toe game.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This example demonstrates the different functional modes of Analog Comparator (AC) module in SAM D21 devices.

This unit test carries out test for three modes of event propagation: Synchronous, Resynchronized & Asynchronous.

  • A RTC module with internal 32kHz RC oscillator is configured as an event generator and a Timer Counter (TC3) module is configured as event user.
  • RTC overflow signal is sent as an event to the timer. The timer will start counting on receiving this event.
  • The timer's count register is read to detect successful event action.

The following kits are supported for carrying out the test:

  • SAM D20 Xplained Pro board
  • SAM D21 Xplained Pro board
  • SAM R21 Xplained Pro board
  • SAM L21 Xplained Pro board
  • SAM L22 Xplained Pro board
  • SAM DA1 Xplained Pro board
  • SAM C21 Xplained Pro board
  • SAM HA1G16A Xplained Pro board
  • SAM R30 Xplained Pro board
  • SAM R30 Module Xplained Pro board
  • SAM R34 Xplained Pro board
  • WLR 089 Xplained Pro board

Setup

The following connections has to be made using wires:

  • None

To run the test:

  • Connect the Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • The unit test carries out test for three modes of event propagation: Synchronous, Resynchronized & Asynchronous.
  • RTC module with internal 32kHz RC oscillator is configured as event generator and Timer (TC3) module is configured as event user.
  • RTC overflow signal is sent as an event to the timer. The timer will start counting on receiving this event.
  • Timer's count register is read to detect successful event action.

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Features

  • Application as a bridge for I2C slave bootloader self programming
  • Uses USB Communication Device Class(CDC)
  • I2C master sends the data to be programmed over I2C bus

Introduction

This application implements a USB Device CDC and a I2C master for SAM devices, it works as a bridge between I2C slave and the USB CDC interface.

This application has been tested on following boards:

  • SAM D21 Xplained Pro

Prerequisites

A python script (bootloader.py in script folder) is used on the host PC to send data over USB CDC interface, example application bin file(to be programmed) starts at 0x2000. To run the python script, execute a command for example as below: python bootloader.py -p COM20 -i led_toggle_flash.bin Make sure that python environment is installed on your PC,

Hardware Setup

For SAM D21 Xplained Pro: I2C slave should be connected to PIN11 (PA08 - SDA) and PIN12 (PA09 - SCL) on External header 1 (EXT1).

Communication Protocol

  • I2C Master first receives 4 bytes of data which contains the length of the data to be programmed for I2C slave.
  • Read a block from CDC interface of size NVMCTRL_PAGE_SIZE
  • Receive an acknowledgement byte 's' from I2C slave to indicate it has received the data and finished programming
  • Repeat till entire length of data has transferred and programmed.

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.

Support and FAQ: visit Microchip Support

Overview:

Introduction

This unit test carries out tests for WDT driver.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for the BOD driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2S driver.

This unit test carries out tests for TC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.
  • Application as a bridge for I2C slave bootloader self programming
  • Uses USB Communication Device Class(CDC)
  • I2C Master sends the data to be programmed over I2C bus

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This application calibrates the internal OSC8M (8MHz) oscillator of the device against a known, accurate external clock or crystal frequency.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This unit test carries out tests for the I2S driver.

It consists of test cases for the following functionalities:

  • Test for polled mode transmit/receive of I2S.
  • Test for callback mode transmit/receive of I2S.

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

  • Application for self programming
  • Uses I2C Slave interface
  • I2C Master sends the data to be programmed over I2C bus
  • Resets the device after programming and starts executing application

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application runs a suite of tests for the AT25DFx SerialFlash driver with any SPI HAL that is supported by the driver and for which setup code has been added to this application.

This unit test carries out tests for the BOD driver.

It consists of test cases for the following functionalities:

  • Test for BOD initialization.
  • Test for BOD detected.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design, and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the USB Stack for applications, included in ASF as middleware service.

asf_structure.jpg

For more information on ASF USB Stack and ASF, refer to the online documentation at following link:

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

This application demonstrates the use of the OLED1 Xplained Pro extension board for the SAM Xplained Pro with a Tic-tac-toe game.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This example demonstrates the different functional modes of Analog Comparator (AC) module in SAM D21 devices.

The following kit is required for carrying out the test:

  • SAM D21 Xplained Pro board
  • SAM L21 Xplained Pro board
  • SAM L22 Xplained Pro board
  • SAM R21 Xplained Pro board
  • SAM DA1 Xplained Pro board
  • SAM C21 Xplained Pro board
  • SAM D20 Xplained Pro board
  • SAM R30 Xplained Pro board
  • SAM R34 Xplained Pro board
  • WLR 089 Xplained Pro board

Setup

The following connections has to be made using wires:

  • SAM D21/DA1/D20 Xplained Pro board
    • PB02 (EXT1 PIN7) <--—> PA08 (EXT2 PIN11)
    • PB03 (EXT1 PIN8) <--—> PA09 (EXT2 PIN12)
  • SAM L21 Xplained Pro board
    • PA12 (EXT1 PIN7) <--—> PA08 (EXT2 PIN11)
    • PA13 (EXT1 PIN8) <--—> PA09 (EXT2 PIN12)
  • SAM L22 Xplained Pro board
    • PB30 (EXT1 PIN11) <--—> PA12 (EXT2 PIN14)
    • PB31 (EXT1 PIN12) <--—> PA13 (EXT2 PIN13)
  • SAM R21 Xplained Pro board
    • PA16 (EXT1 PIN11) <--—> PB02 (EXT1 PIN17)
    • PA17 (EXT1 PIN12) <--—> PB03 (EXT1 PIN15)
  • SAM C21 Xplained Pro board
    • PA12 (EXT2 PIN11) <--—> PB30 (EXT2 PIN7)
    • PA13 (EXT2 PIN12) <--—> PB31 (EXT2 PIN8)
  • SAM R30 Xplained Pro board
    • PA22 (EXT1 PIN9) <--—> PA16 (EXT1 PIN11)
    • PA23 (EXT1 PIN10) <--—> PA17 (EXT1 PIN12)
  • SAM R34 Xplained Pro board
    • PB02 (EXT1 PIN17) <--—> PA16 (EXT1 PIN11)
    • PA23 (EXT1 PIN15) <--—> PA17 (EXT1 PIN12)
  • WLR 089 Xplained Pro board
    • PB02 (EXT1 PIN17) <--—> PA16 (EXT1 PIN11)
    • PA23 (EXT1 PIN15) <--—> PA17 (EXT1 PIN12)

To run the test:

  • Connect the supported Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • The unit test configures a I2C master and a I2C slave,
  • master write to slave and then read from slave,
  • compare the write and read results

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for WDT driver.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for the BOD driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2S driver.

This unit test carries out tests for TC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.
  • Application as a bridge for I2C slave bootloader self programming
  • Uses USB Communication Device Class(CDC)
  • I2C Master sends the data to be programmed over I2C bus

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This application calibrates the internal OSC8M (8MHz) oscillator of the device against a known, accurate external clock or crystal frequency.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This unit test carries out tests for the I2S driver.

It consists of test cases for the following functionalities:

  • Test for polled mode transmit/receive of I2S.
  • Test for callback mode transmit/receive of I2S.

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

  • Application for self programming
  • Uses I2C Slave interface
  • I2C Master sends the data to be programmed over I2C bus
  • Resets the device after programming and starts executing application

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application runs a suite of tests for the AT25DFx SerialFlash driver with any SPI HAL that is supported by the driver and for which setup code has been added to this application.

This unit test carries out tests for the BOD driver.

It consists of test cases for the following functionalities:

  • Test for BOD initialization.
  • Test for BOD detected.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design, and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the USB Stack for applications, included in ASF as middleware service.

asf_structure.jpg

For more information on ASF USB Stack and ASF, refer to the online documentation at following link:

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

This application demonstrates the use of the OLED1 Xplained Pro extension board for the SAM Xplained Pro with a Tic-tac-toe game.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This example demonstrates the different functional modes of Analog Comparator (AC) module in SAM D21 devices.

Tests will be performed for rising and falling edges of the external signal.

The following kit is required for carrying out the test:

  • SAM D20/D21/R21/L21/L22/DA1/C21/R30/R34 Xplained Pro board

Setup

The following connections has to be made using wires:

  • SAM D21/DA1/D20 Xplained Pro
    • EXT1 Pin 9 (PB04) <--—> Pin 11 (PA08)
  • SAM R21 Xplained Pro
    • EXT1 Pin 3 (PA06) <--—> EXT3 Pin 10 (PA08)
  • SAM L21 Xplained Pro
    • EXT1 Pin 9 (PB04) <--—> EXT3 Pin 5 (PB30)
  • SAM L22 Xplained Pro
    • EXT1 Pin 9 (PC02) <--—> EXT3 Pin 5 (PC16)
  • SAM C21 Xplained Pro
    • EXT1 Pin 9 (PB14) <--—> EXT1 Pin 10 (PB15)
  • SAM R30 Xplained Pro
    • EXT1 Pin 5 (PA13) <--—> EXT1 Pin 8 (PA19)
  • SAM R30 Module Xplained Pro
    • EXT Pin 10 (PA28) <--—> EXT Pin 3 (PA06)
  • SAM R34 Xplained Pro
    • EXT1 Pin 9 (PA22) <--—> EXT3 Pin 10 (PA08)
  • WLR 089 Xplained Pro
    • EXT1 Pin 9 (PA22) <--—> EXT3 Pin 10 (PA08)

To run the test:

  • Connect the SAM Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • The unit test configures external interrupt on PB04 pin (channel 4) to detect falling edge.
  • Logic level on PB05 is changed from high to low (falling edge) and the channel is checked for interrupt detection.
  • The test is repeated for rising edge and with callback enabled.

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

While some devices require exact timing, and therefore require an external calibration crystal or other high-accuracy clock source, other applications with looser accuracy requirements may use the internal RC Oscillator(s) for space and/or cost reasons. However, this can lead to unstable communication interfaces if the internal oscillator is not first calibrated against an accurate reference clock.

This application uses a known external reference frequency to calibrate the internal 8MHz (nominal) RC Oscillator, OSC8M, so that it is as close as possible to the desired 8MHz frequency.

This application has been tested on following boards:

  • SAM D20/D21 Xplained Pro

Usage Instructions

On startup, the application will immediately begin calibration of the OSC8M internal oscillator, against a 32.768KHz watch crystal attached to the device XOSC32K pins (see device datasheet). As the possible calibration values are cycled through, the board LED will turn on each time a better match is found, and turn off when an equal or lesser calibration value is tested. Once the best values are found, the results are printed to the device USART and the board LED will flash rapidly to signal the end of the calibration sequence.

Note
The calibration values are not stored to the device's non-volatile memory. The example execution time is depend on the configuration in conf_example file. It's about (2<<CONF_CALIBRATION_RESOLUTION) *(2<<CONF_FRANGE_CAL -1)*(2<<CONF_TEMP_CAL -1)*128/32768 seconds. To get more accurate result, we can increase the value of CONF_FRANGE_CAL, CONF_TEMP_CAL and CONF_CALIBRATION_RESOLUTION, but the execution time is also longer.

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for WDT driver.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for the BOD driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2S driver.

This unit test carries out tests for TC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.
  • Application as a bridge for I2C slave bootloader self programming
  • Uses USB Communication Device Class(CDC)
  • I2C Master sends the data to be programmed over I2C bus

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This application calibrates the internal OSC8M (8MHz) oscillator of the device against a known, accurate external clock or crystal frequency.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This unit test carries out tests for the I2S driver.

It consists of test cases for the following functionalities:

  • Test for polled mode transmit/receive of I2S.
  • Test for callback mode transmit/receive of I2S.

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

  • Application for self programming
  • Uses I2C Slave interface
  • I2C Master sends the data to be programmed over I2C bus
  • Resets the device after programming and starts executing application

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application runs a suite of tests for the AT25DFx SerialFlash driver with any SPI HAL that is supported by the driver and for which setup code has been added to this application.

This unit test carries out tests for the BOD driver.

It consists of test cases for the following functionalities:

  • Test for BOD initialization.
  • Test for BOD detected.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design, and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the USB Stack for applications, included in ASF as middleware service.

asf_structure.jpg

For more information on ASF USB Stack and ASF, refer to the online documentation at following link:

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

This application demonstrates the use of the OLED1 Xplained Pro extension board for the SAM Xplained Pro with a Tic-tac-toe game.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This example demonstrates the different functional modes of Analog Comparator (AC) module in SAM D21 devices.

The following kit is required for carrying out the test:

  • SAM D20/D21/R21/L21/L22/DA1/C21/R30/HA1G16A Xplained Pro board

Setup

The following connections has to be made using wires:

  • SAM D21/D20 Xplained Pro:EXTINT 0 (PB00, EXT1 pin 3) <--—> TC4 WO1 (PB09, EXT1 pin 13)
  • SAM R21 Xplained Pro:EXTINT 0 (PA16, EXT2 pin 11) <--—> TC4 WO1 (PA23, EXT1 pin 10)
  • SAM L21 Xplained Pro:EXTINT 0 (PB00, EXT3 pin 3) <--—> TC0 WO1 (PB09, EXT1 pin 13)
  • SAM L22 Xplained Pro:EXTINT 2 (PB16, EXT3 pin 7) <--—> TC0 WO1 (PB09, EXT1 pin 8)
  • SAM DA1 Xplained Pro:EXTINT 0 (PA16, EXT2 pin 17) <--—> TC4 WO1 (PB09, EXT1 pin 13)
  • SAM HA1G16A Xplained Pro:EXTINT 0 (PA16, EXT1 pin 10) <--—> TC3 WO1 (PA19, EXT1 pin 8)
  • SAM C21 Xplained Pro:EXTINT 0 (PB16, EXT2 pin 9) <--—> TC0 WO1 (PB09, EXT1 pin 3)
  • SAM R30 Xplained Pro:EXTINT 0 (PA16, EXT1 pin 11) <--—> TC0 WO1 (PA23, EXT1 pin 10)
  • SAM R30 Module Xplained Pro:EXTINT 0 (PA16, EXT1 pin 11) <--—> TC4 WO1 (PA19, EXT pin 17)
  • SAM R34 Xplained Pro:EXTINT 1 (PA17, EXT1 pin 12) <--—> TC0 WO1 (PA23, EXT1 pin 15)
  • WLR 089 Xplained Pro:EXTINT 1 (PA17, EXT1 pin 12) <--—> TC0 WO1 (PA23, EXT1 pin 15)

To run the test:

  • Connect the SAM Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • The unit tests are carried out using the several TC modules internally for internal checks.
  • The EXTINT module is connected to a TC module so that it can detect the correct TC waveform output.

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for WDT driver.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for the BOD driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2S driver.

This unit test carries out tests for TC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.
  • Application as a bridge for I2C slave bootloader self programming
  • Uses USB Communication Device Class(CDC)
  • I2C Master sends the data to be programmed over I2C bus

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This application calibrates the internal OSC8M (8MHz) oscillator of the device against a known, accurate external clock or crystal frequency.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This unit test carries out tests for the I2S driver.

It consists of test cases for the following functionalities:

  • Test for polled mode transmit/receive of I2S.
  • Test for callback mode transmit/receive of I2S.

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

  • Application for self programming
  • Uses I2C Slave interface
  • I2C Master sends the data to be programmed over I2C bus
  • Resets the device after programming and starts executing application

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application runs a suite of tests for the AT25DFx SerialFlash driver with any SPI HAL that is supported by the driver and for which setup code has been added to this application.

This unit test carries out tests for the BOD driver.

It consists of test cases for the following functionalities:

  • Test for BOD initialization.
  • Test for BOD detected.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design, and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the USB Stack for applications, included in ASF as middleware service.

asf_structure.jpg

For more information on ASF USB Stack and ASF, refer to the online documentation at following link:

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

This application demonstrates the use of the OLED1 Xplained Pro extension board for the SAM Xplained Pro with a Tic-tac-toe game.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This example demonstrates the different functional modes of Analog Comparator (AC) module in SAM D21 devices.

Tests will be performed for data transmitting and receiving of I2S.

The following kit is required for carrying out the test:

  • SAM D21 Xplained Pro board
  • SAM DA1 Xplained Pro board

Setup

The following connections has to be made using wires:

  • SAM D21/DA1 Xplained Pro
    • EXT2 Pin 3 (PA10, SCK0) <--—> EXT3 Pin 13 (PB11, SCK1)
    • EXT2 Pin 4 (PA11, FS0) <--—> Pin 7 (PB12, FS1)

To run the test:

  • Connect the board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • The unit test configures Clock Unit 0 to generate SCK and FS and Clock Unit 1 to use the signals.
  • The unit test configures Serializer 0 to transmit data and Serializer 1 to receive data, over control signals received by Clock Unit 1.
  • The test is again and with callback disabled.

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

A timer is used to guarantee the DAC conversions are performed at the correct sample rate, using the Event System module of the device to link the periodic timer output events to the DAC module to trigger new sample conversions.

This application has been tested on following boards:

  • SAM D20/D21/L21/C21 Xplained Pro

Hardware Setup

The device's DAC channel output should be connected to an audio amplifier, speaker, oscilloscope or other similar monitoring equipment so that the generated waveform can be monitored.

Usage

On startup the device hardware will be configured, and the example will enter an infinite loop. Each time the board button is pressed, the embedded waveform will be output through the DAC and the board LED will be toggled

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for WDT driver.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for the BOD driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2S driver.

This unit test carries out tests for TC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.
  • Application as a bridge for I2C slave bootloader self programming
  • Uses USB Communication Device Class(CDC)
  • I2C Master sends the data to be programmed over I2C bus

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This application calibrates the internal OSC8M (8MHz) oscillator of the device against a known, accurate external clock or crystal frequency.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This unit test carries out tests for the I2S driver.

It consists of test cases for the following functionalities:

  • Test for polled mode transmit/receive of I2S.
  • Test for callback mode transmit/receive of I2S.

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

  • Application for self programming
  • Uses I2C Slave interface
  • I2C Master sends the data to be programmed over I2C bus
  • Resets the device after programming and starts executing application

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application runs a suite of tests for the AT25DFx SerialFlash driver with any SPI HAL that is supported by the driver and for which setup code has been added to this application.

This unit test carries out tests for the BOD driver.

It consists of test cases for the following functionalities:

  • Test for BOD initialization.
  • Test for BOD detected.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design, and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the USB Stack for applications, included in ASF as middleware service.

asf_structure.jpg

For more information on ASF USB Stack and ASF, refer to the online documentation at following link:

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

This application demonstrates the use of the OLED1 Xplained Pro extension board for the SAM Xplained Pro with a Tic-tac-toe game.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This example demonstrates the different functional modes of Analog Comparator (AC) module in SAM D21 devices.

Input to the AC is provided with the DAC module.

The following kit is required for carrying out the test:

  • SAM D20 Xplained Pro board
  • SAM D21 Xplained Pro board
  • SAM L21 Xplained Pro board
  • SAM DA1 Xplained Pro board
  • SAM C21 Xplained Pro board

Setup

The following connections has to be made using wires:

  • DAC VOUT (PA02) <--—> AIN0 (PA04)

To run the test:

  • Connect the SAM Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • The unit test configures DAC module to provide voltage to the AC positive input.
  • AC negative input is given from internal voltage scaler.
  • DAC output is adjusted to generate various voltages which are compared by the AC.
  • Different modes of the AC are tested.

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This application demonstrates a runtime XOSC32K (external 32KHz crystal oscillator) failure detector, using hardware timer peripherals and the SAM event system.

A pair of timers are linked together; one with a clock source from the XOSC32K 32.768KHz external clock, and another from the OSC32K 32.768KHz internal RC clock source. Each time the XOSC32K timer reaches a configurable count value, a hardware event resets the second timer using the OSC32K clock source.

If the OSC32K clocked timer reaches a configurable count value before it is reset by the XOSC32K timer, the XOSC32K clock source is considered failed and a callback function is executed. If instead the XOSC32K closed clocked timer resets the OSC32K clocked timer, the oscillator is considered OK and another callback function is executed.

In the example application, the DFLL reference clock is automatically switched between the internal and external 32KHz clock sources depending on the external reference availability.

This application has been tested on following boards:

  • SAM D20/D21/R21/L21/D11/R30 Xplained Pro

Usage

Connect an oscilloscope to PA28 of the SAM D20/D21 or PB22 of SAMR21 or PA08 of SAM D10/D11 or PA27 of SAML21 or PA14 of SAMR30 Xplained Pro. Run the example application, and press and hold the board button to turn off the external XOSC32K crystal clock source to observe the fail-over to the internal clock source. Releasing the button will re-enable the external crystal.

The board LED will be turned on when the external crystal is used, and will be turned off when the internal RC is used due to a crystal failure detection.

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Features

  • Application for self programming
  • Uses I2C Slave interface
  • I2C Master sends the data to be programmed over I2C bus
  • Resets the device after programming and starts executing application

Introduction

As many electronic designs evolve rapidly there is a growing need for being able to update products, which have already been shipped or sold. Microcontrollers that support boot loader facilitates updating the application flash section without the need of an external programmer, are of great use in situations where the application has to be updated on the field. The boot loader may use various interfaces like SPI, UART, TWI, Ethernet etc.

This application implements a I2C Slave bootloader for SAM devices.

This application has been tested on following boards:

  • SAM D20/D21/R21/D11/L22/L21 Xplained Pro

Program Memory Organization

This bootloader implementation consumes around 8000 bytes (approximately), which is 32 rows of Program Memory space starting from 0x00000000. BOOTPROT fuses on the device can be set to protect first 32 rows of the program memory which are allocated for the BOOT section. So, the end user application should be generated with starting address as 0x00002000.

Prerequisites

There are no prerequisites for this implementation

Hardware Setup

SAM device in SAM Xplained Pro kit is used as the I2C Slave. I2C master should be connected to PIN11 (PA08 - SDA) and PIN12 (PA09 - SCL) on External header 1 (EXT1) of SAM D20/D21 Xplained Pro. I2C master should be connected to PIN11 (PA16 - SDA) and PIN12 (PA17 - SCL) on External header 1 (EXT1) of SAM R21 Xplained Pro. I2C master should be connected to PIN11 (PA22 - SDA) and PIN12 (PA23 - SCL) on External header 1 (EXT1) of SAM D10/D11 Xplained Pro. I2C master should be connected to PIN11 (PB30 - SDA) and PIN12 (PB31 - SCL) on External header 1 (EXT1) of SAM L22 Xplained Pro. I2C master should be connected to PIN11 (PA08 - SDA) and PIN12 (PA09 - SCL) on External header 1 (EXT1) of SAM L21 Xplained Pro. SW0 will be configured as BOOT_LOAD_PIN and LED0 will be used to display the bootloader status. LED0 will be ON when the device is in bootloader mode.

Bootloader Process

Boot Check

The bootloader is located at the start of the program memory and is executed at each reset/power-on sequence. Initially check the status of a user configurable BOOT_LOAD_PIN.

  • If the pin is pulled low continue execution in bootloader mode.
  • Else read the first location of application section (0x00002000) which contains the stack pointer address and check whether it is 0xFFFFFFFF.
    • If yes, application section is empty and wait indefinitely there.
    • If not, jump to the application section and start execution from there.
      Note
      Configuring the BOOT_LOAD_PIN and disabling watchdog in this boot mode check routine are made with direct peripheral register access to enable quick decision on application or bootloader mode.

Initialization

Initialize the following

  • Board
  • System clock
  • I2C Slave module
  • NVM module

Boot Protocol

  • I2C Master first sends 4 bytes of data which contains the length of the data to be programmed
  • Read a block from I2C Master of size NVMCTRL_PAGE_SIZE
  • Program the data to Program memory starting APP_START_ADDRESS
  • Send an acknowledgement byte 's' to I2C Master to indicate it has received the data and finished programming
  • Repeat till entire length of data has been programmed to the device

Start Application

Once the programming is completed, enable Watchdog Timer with a timeout period of 256 clock cycles and wait in a loop for Watchdog to reset the device.

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for WDT driver.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for the BOD driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2S driver.

This unit test carries out tests for TC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.
  • Application as a bridge for I2C slave bootloader self programming
  • Uses USB Communication Device Class(CDC)
  • I2C Master sends the data to be programmed over I2C bus

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This application calibrates the internal OSC8M (8MHz) oscillator of the device against a known, accurate external clock or crystal frequency.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This unit test carries out tests for the I2S driver.

It consists of test cases for the following functionalities:

  • Test for polled mode transmit/receive of I2S.
  • Test for callback mode transmit/receive of I2S.

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

  • Application for self programming
  • Uses I2C Slave interface
  • I2C Master sends the data to be programmed over I2C bus
  • Resets the device after programming and starts executing application

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application runs a suite of tests for the AT25DFx SerialFlash driver with any SPI HAL that is supported by the driver and for which setup code has been added to this application.

This unit test carries out tests for the BOD driver.

It consists of test cases for the following functionalities:

  • Test for BOD initialization.
  • Test for BOD detected.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design, and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the USB Stack for applications, included in ASF as middleware service.

asf_structure.jpg

For more information on ASF USB Stack and ASF, refer to the online documentation at following link:

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

This application demonstrates the use of the OLED1 Xplained Pro extension board for the SAM Xplained Pro with a Tic-tac-toe game.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This example demonstrates the different functional modes of Analog Comparator (AC) module in SAM D21 devices.

The test suite consists of test cases for the following functionality:

  • chip presence checking
  • reading and writing of buffers
  • chip erase
  • block erase
  • global protection
  • sector protection
  • sleeping and waking

The test suite has been written to test with an AT25DF081A on the EXT1 header of an Xplained Pro board.

Test reporting is done via UART configured on CONF_STDIO_USART_MODULE, with baud rate CONF_STDIO_BAUDRATE. The convention is to use EDBG CDC.

Setup

Connect a SerialFlash () wing board to EXT1 of the Xplained Pro. The SPI pin mapping is according to the convention, meaning the regular MISO, MOSI, SCK and SS_0 as defined in the board definition header file.

Note
SS_1 is used as a dummy pin in verification of presence checking.

Compilation Info

This software was written for the GNU GCC for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for WDT driver.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for the BOD driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2S driver.

This unit test carries out tests for TC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.
  • Application as a bridge for I2C slave bootloader self programming
  • Uses USB Communication Device Class(CDC)
  • I2C Master sends the data to be programmed over I2C bus

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This application calibrates the internal OSC8M (8MHz) oscillator of the device against a known, accurate external clock or crystal frequency.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This unit test carries out tests for the I2S driver.

It consists of test cases for the following functionalities:

  • Test for polled mode transmit/receive of I2S.
  • Test for callback mode transmit/receive of I2S.

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

  • Application for self programming
  • Uses I2C Slave interface
  • I2C Master sends the data to be programmed over I2C bus
  • Resets the device after programming and starts executing application

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application runs a suite of tests for the AT25DFx SerialFlash driver with any SPI HAL that is supported by the driver and for which setup code has been added to this application.

This unit test carries out tests for the BOD driver.

It consists of test cases for the following functionalities:

  • Test for BOD initialization.
  • Test for BOD detected.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design, and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the USB Stack for applications, included in ASF as middleware service.

asf_structure.jpg

For more information on ASF USB Stack and ASF, refer to the online documentation at following link:

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

This application demonstrates the use of the OLED1 Xplained Pro extension board for the SAM Xplained Pro with a Tic-tac-toe game.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This example demonstrates the different functional modes of Analog Comparator (AC) module in SAM D21 devices.

The following kit is required for carrying out the test:

  • SAM D21 Xplained Pro board

Setup

The following operation has to be made:

  • adjust the power supply to lower than 3v.

To run the test:

  • Connect the supported Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application.
  • Conect board to external power supply though "PWR 5.0 IN and GND", this power have higher priority than usb power supply, you can check the cpu voltage from VCC.

    The terminal shows the results of the unit test.

Usage

  • Init bod and then test bod detected.

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for WDT driver.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for the BOD driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2S driver.

This unit test carries out tests for TC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.
  • Application as a bridge for I2C slave bootloader self programming
  • Uses USB Communication Device Class(CDC)
  • I2C Master sends the data to be programmed over I2C bus

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This application calibrates the internal OSC8M (8MHz) oscillator of the device against a known, accurate external clock or crystal frequency.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This unit test carries out tests for the I2S driver.

It consists of test cases for the following functionalities:

  • Test for polled mode transmit/receive of I2S.
  • Test for callback mode transmit/receive of I2S.

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

  • Application for self programming
  • Uses I2C Slave interface
  • I2C Master sends the data to be programmed over I2C bus
  • Resets the device after programming and starts executing application

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application runs a suite of tests for the AT25DFx SerialFlash driver with any SPI HAL that is supported by the driver and for which setup code has been added to this application.

This unit test carries out tests for the BOD driver.

It consists of test cases for the following functionalities:

  • Test for BOD initialization.
  • Test for BOD detected.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design, and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the USB Stack for applications, included in ASF as middleware service.

asf_structure.jpg

For more information on ASF USB Stack and ASF, refer to the online documentation at following link:

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

This application demonstrates the use of the OLED1 Xplained Pro extension board for the SAM Xplained Pro with a Tic-tac-toe game.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This example demonstrates the different functional modes of Analog Comparator (AC) module in SAM D21 devices.

The following kit is required for carrying out the test:

  • SAM D21/R21/L21/DA1/C21/R30/R34 Xplained Pro board

Setup

The following connections has to be made using wires:

  • SAM D21/DA1 Xplained Pro:
    • EXTINT 4 (PB04, EXT1 pin 9 ) <--—> TCC0 WO0 (PA08, EXT2 pin 11)
  • SAM R21 Xplained Pro:
    • EXTINT 6 (PA06, EXT1 pin 3 ) <--—> TCC0 WO0 (PA08, EXT3 pin 10)
  • SAM L21 Xplained Pro:
    • EXTINT 4 (PB04, EXT1 pin 9 ) <--—> TCC0 WO0 (PB30, EXT3 pin 5)
  • SAM C21 Xplained Pro:
    • EXTINT 4 (PA20, EXT1 pin 5 ) <--—> TCC0 WO0 (PA08, EXT2 pin 3)
  • SAM R30 Xplained Pro:
    • EXTINT 3 (PB03, EXT1 pin 15 ) <--—> TCC0 WO0 (PA08, EXT3 pin 10)
  • SAM R30 Module Xplained Pro:
    • EXTINT 8 (PA28, EXT pin 10 ) <--—> TCC0 WO0 (PA08, EXT pin 11)
  • SAM R34 Xplained Pro:
    • EXTINT 7 (PA28, EXT1 pin 6 ) <--—> TCC0 WO0 (PA08, EXT1 pin 5)
  • WLR 089 Xplained Pro:
    • EXTINT 7 (PA28, EXT1 pin 6 ) <--—> TCC0 WO0 (PA08, EXT1 pin 5)

To run the test:

  • Connect the SAM Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • The unit tests are carried out using the several TCC modules internally for internal checks.
  • The EXTINT module is connected to a TCC module so that it can detect the correct TCC waveform output.

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for WDT driver.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for the BOD driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2S driver.

This unit test carries out tests for TC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.
  • Application as a bridge for I2C slave bootloader self programming
  • Uses USB Communication Device Class(CDC)
  • I2C Master sends the data to be programmed over I2C bus

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This application calibrates the internal OSC8M (8MHz) oscillator of the device against a known, accurate external clock or crystal frequency.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This unit test carries out tests for the I2S driver.

It consists of test cases for the following functionalities:

  • Test for polled mode transmit/receive of I2S.
  • Test for callback mode transmit/receive of I2S.

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

  • Application for self programming
  • Uses I2C Slave interface
  • I2C Master sends the data to be programmed over I2C bus
  • Resets the device after programming and starts executing application

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application runs a suite of tests for the AT25DFx SerialFlash driver with any SPI HAL that is supported by the driver and for which setup code has been added to this application.

This unit test carries out tests for the BOD driver.

It consists of test cases for the following functionalities:

  • Test for BOD initialization.
  • Test for BOD detected.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design, and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the USB Stack for applications, included in ASF as middleware service.

asf_structure.jpg

For more information on ASF USB Stack and ASF, refer to the online documentation at following link:

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

This application demonstrates the use of the OLED1 Xplained Pro extension board for the SAM Xplained Pro with a Tic-tac-toe game.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This example demonstrates the different functional modes of Analog Comparator (AC) module in SAM D21 devices.

Input to the ADC is provided with the DAC module.

The following kit is required for carrying out the test:

  • SAM D20 Xplained Pro board
  • SAM D21 Xplained Pro board
  • SAM L21 Xplained Pro board
  • SAM DA1 Xplained Pro board
  • SAM C21 Xplained Pro board

Setup

The following connections has to be made using wires:

  • SAM D21/L21/C21/D20 Xplained Pro
    • DAC VOUT (PA02) <--—> ADC4 (PA04)

To run the test:

  • Connect the supported Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • The unit test configures DAC module to provide voltage to the ADC input.
  • DAC output is adjusted to generate various voltages which are measured by the ADC.
  • Different modes of the ADC are tested.

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for WDT driver.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for the BOD driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2S driver.

This unit test carries out tests for TC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.
  • Application as a bridge for I2C slave bootloader self programming
  • Uses USB Communication Device Class(CDC)
  • I2C Master sends the data to be programmed over I2C bus

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This application calibrates the internal OSC8M (8MHz) oscillator of the device against a known, accurate external clock or crystal frequency.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This unit test carries out tests for the I2S driver.

It consists of test cases for the following functionalities:

  • Test for polled mode transmit/receive of I2S.
  • Test for callback mode transmit/receive of I2S.

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

  • Application for self programming
  • Uses I2C Slave interface
  • I2C Master sends the data to be programmed over I2C bus
  • Resets the device after programming and starts executing application

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application runs a suite of tests for the AT25DFx SerialFlash driver with any SPI HAL that is supported by the driver and for which setup code has been added to this application.

This unit test carries out tests for the BOD driver.

It consists of test cases for the following functionalities:

  • Test for BOD initialization.
  • Test for BOD detected.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design, and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the USB Stack for applications, included in ASF as middleware service.

asf_structure.jpg

For more information on ASF USB Stack and ASF, refer to the online documentation at following link:

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

This application demonstrates the use of the OLED1 Xplained Pro extension board for the SAM Xplained Pro with a Tic-tac-toe game.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This example demonstrates the different functional modes of Analog Comparator (AC) module in SAM D21 devices.

The following kit can be used for carrying out the test:

  • SAM D20 Xplained Pro board
  • SAM D21 Xplained Pro board
  • SAM R21 Xplained Pro board
  • SAM L21 Xplained Pro board
  • SAM L22 Xplained Pro board
  • SAM DA1 Xplained Pro board
  • SAM HA1G16A Xplained Pro board
  • SAM R30 Xplained Pro board
  • SAM R30 Module Xplained Pro board
  • SAM R34 Xplained Pro board
  • WLR 089 Xplained Pro board

Setup

The following connections has to be made using wires:

  • None

To run the test:

  • Connect the SAM Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • The unit tests are carried out using the internal NVM controller.

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for WDT driver.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for the BOD driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2S driver.

This unit test carries out tests for TC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.
  • Application as a bridge for I2C slave bootloader self programming
  • Uses USB Communication Device Class(CDC)
  • I2C Master sends the data to be programmed over I2C bus

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This application calibrates the internal OSC8M (8MHz) oscillator of the device against a known, accurate external clock or crystal frequency.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This unit test carries out tests for the I2S driver.

It consists of test cases for the following functionalities:

  • Test for polled mode transmit/receive of I2S.
  • Test for callback mode transmit/receive of I2S.

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

  • Application for self programming
  • Uses I2C Slave interface
  • I2C Master sends the data to be programmed over I2C bus
  • Resets the device after programming and starts executing application

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application runs a suite of tests for the AT25DFx SerialFlash driver with any SPI HAL that is supported by the driver and for which setup code has been added to this application.

This unit test carries out tests for the BOD driver.

It consists of test cases for the following functionalities:

  • Test for BOD initialization.
  • Test for BOD detected.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design, and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the USB Stack for applications, included in ASF as middleware service.

asf_structure.jpg

For more information on ASF USB Stack and ASF, refer to the online documentation at following link:

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

This application demonstrates the use of the OLED1 Xplained Pro extension board for the SAM Xplained Pro with a Tic-tac-toe game.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This example demonstrates the different functional modes of Analog Comparator (AC) module in SAM D21 devices.

The following kit is required for carrying out the test:

  • SAM D20 Xplained Pro board
  • SAM D21 Xplained Pro board
  • SAM R21 Xplained Pro board
  • SAM L21 Xplained Pro board
  • SAM L22 Xplained Pro board
  • SAM DA1 Xplained Pro board
  • SAM HA1G16A Xplained Pro board
  • SAM C21 Xplained Pro board
  • SAM R30 Xplained Pro board
  • SAM R30 Module Xplained Pro board
  • SAM R34 Xplained Pro board
  • WLR 089 Xplained Pro board

Setup

The following connections has to be made using wires:

  • SAM D21/DA1/D20 Xplained Pro board
    • TX/RX: EXT2 PIN17 (PA16) <–> EXT3 PIN17 (PB16)
  • SAM HA1G16A Xplained Pro board
    • TX/RX: EXT1 PIN14 (PB10) <–> EXT1 PIN12 (PA09)
  • SAM R21 Xplained Pro board
    • TX/RX: EXT1 PIN11 (PA16) <–> EXT1 PIN17 (PB02)
  • SAM L21 Xplained Pro board
    • TX/RX: EXT2 PIN3 (PA10) <–> EXT2 PIN8 (PB13)
  • SAM L22 Xplained Pro board
    • TX/RX: EXT1 PIN13 (PA23) <–> EXT3 PIN3 (PA06)
  • SAM C21 Xplained Pro board
    • TX/RX: EXT1 PIN11 (PA12) <–> EXT2 PIN4 (PA09)
  • SAM R30 Xplained Pro board
    • TX/RX: EXT1 PIN7 (PA18) <–> EXT1 PIN12 (PA17) <<<<<<< HEAD
  • SAM R30 Module Xplained Pro board

    - TX/RX: EXT PIN13 (PA14) <–> EXT PIN15 (PA17)

  • SAM R34 Xplained Pro board
    • TX/RX: EXT1 PIN11 (PA16) <–> EXT1 PIN17 (PB02)
  • WLR 089 Xplained Pro board
    • TX/RX: EXT1 PIN11 (PA16) <–> EXT1 PIN17 (PB02)

      3518a2958ff4695a84f9222901de2da524b4520d

To run the test:

  • Connect the SAM Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • The unit tests are carried out with one SERCOM on EXT1 as the USART transmitter and another SERCOM on EXT1 as the SERCOM USART receiver.
  • Data is transmitted from transmitter to receiver in lengths of a single byte as well as multiple bytes.

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

This application has been tested on following boards:

  • SAM D20/D21/R21/D11/L21/L22/C21/R30 Xplained Pro

Hardware Setup

This application use AIN0 as ADC input channel. When the measured voltage is lower than 0.5V, then the device will start toggling the led pin to signal that the low voltage condition has happened. Connect the PA02(EXT3 pin3) to GND in SAM D20/D21 Xplained Pro to trigger it. Connect the PA06(EXT1 pin3) to GND in SAM R21 Xplained Pro to trigger it. Connect the PA02(EXT1 pin3) to GND in SAM D10/D11 Xplained Pro to trigger it. Connect the PA03(EXT1 pin4) to GND in SAM L21/L22 Xplained Pro to trigger it. Connect the PA03_ADC_DAC_VREF(J701 pin4) to GND in SAM C21 Xplained Pro to trigger it. Connect the PA04(EXT1 pin14) to GND in SAM R30 Xplained Pro to trigger it.

If debugging it is also possible to start a debug session and place a breakpoint in the window callback that will trigger whenever the voltage has gone below the defined threshold.

The application can easily be modified to monitor other voltages by changing the input source and threshold values in the adc_setup function.

Implementation Details

ADC Configuration

The ADC is configured to perform hardware averaging on the measured value, where the ADC will sample the signal 16 times and find the average value in hardware. This smooths out high frequency noise.

Sample timing

To trigger the ADC conversions, the RTC is setup in 32-bit counter mode, clocked by the internal 32kHz oscillator divided by 32, giving a 1kHz input clock. A compare value of 1000 is used to trigger the ADC conversion every second.

Event Routing

The Event system is setup to route the compare match interrupt from the RTC to the ADC, and the ADC is configured to start a new conversion on an event input. The event channel is configured as an asynchronous channel, so no clock is needed for the event channel during sleep.

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for WDT driver.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for the BOD driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2S driver.

This unit test carries out tests for TC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.
  • Application as a bridge for I2C slave bootloader self programming
  • Uses USB Communication Device Class(CDC)
  • I2C Master sends the data to be programmed over I2C bus

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This application calibrates the internal OSC8M (8MHz) oscillator of the device against a known, accurate external clock or crystal frequency.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This unit test carries out tests for the I2S driver.

It consists of test cases for the following functionalities:

  • Test for polled mode transmit/receive of I2S.
  • Test for callback mode transmit/receive of I2S.

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

  • Application for self programming
  • Uses I2C Slave interface
  • I2C Master sends the data to be programmed over I2C bus
  • Resets the device after programming and starts executing application

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application runs a suite of tests for the AT25DFx SerialFlash driver with any SPI HAL that is supported by the driver and for which setup code has been added to this application.

This unit test carries out tests for the BOD driver.

It consists of test cases for the following functionalities:

  • Test for BOD initialization.
  • Test for BOD detected.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design, and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the USB Stack for applications, included in ASF as middleware service.

asf_structure.jpg

For more information on ASF USB Stack and ASF, refer to the online documentation at following link:

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

This application demonstrates the use of the OLED1 Xplained Pro extension board for the SAM Xplained Pro with a Tic-tac-toe game.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This example demonstrates the different functional modes of Analog Comparator (AC) module in SAM D21 devices.

The following kit is required for carrying out the test:

  • SAM D21 Xplained Pro board
  • SAM L21 Xplained Pro board
  • SAM DA1 Xplained Pro board
  • SAM HA1G16A Xplained Pro board
  • SAM C21 Xplained Pro board
  • SAM D20 Xplained Pro board

Setup

To run the test:

  • Connect the supported Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • Different operations of the dac are tested.

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This application demonstrates a simple example to toggle the board LED.

This application has been tested on following boards:

  • SAM D20/D21/R21/D11/L21/L22/R30/R34 Xplained Pro
  • SAM D10 Xplained Mini
  • SAMR21ZLL-EK

Usage

The application uses system timer to generate periodic interrupts, once the interrupt occurs, LED0 will toggle.

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This unit test carries out tests for WDT driver.

This unit test carries out tests for the DAC driver.

This unit test carries out tests for SERCOM USART driver.

This unit test carries out tests for NVM driver.

This unit test carries out tests for the ADC driver.

This unit test carries out tests for TCC driver.

This unit test carries out tests for the BOD driver.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

This unit test carries out tests for the AC driver.

This unit test carries out tests for the I2S driver.

This unit test carries out tests for TC driver.

This unit test carries out tests for the External Interrupt driver.

This unit test carries out tests for the I2C driver.

This unit test carries out tests for the EVENTS driver.

This unit test carries out tests for SERCOM SPI driver.

This unit test carries out tests for the EEPROM Emulator service.

This unit test carries out tests for the RTC count driver.

This unit test carries out tests for the RTC calendor driver.

It consists of test cases for the following functionalities:

  • Test for RTC calendar initialization.
  • Test for RTC calendar polled mode.
  • Test for RTC calendar callback mode.

This unit test carries out tests for the RTC count driver.

It consists of test cases for the following functionalities:

  • Test for RTC count initialization.
  • Test for RTC count polled mode.
  • Test for RTC count callback mode.

This unit test carries out tests for the EEPROM Emulator service.

It consists of test cases for the following functionalities:

  • Test for EEPROM emulator initialization.
  • Test for EEPROM emulator buffer read/write functionality.
  • Test for EEPROM emulator page read/write functionality.

This unit test carries out tests for SERCOM SPI driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single byte write and read by polling.
  • Test for buffer write by polling and read with interrupt.
  • Test for buffer read & write using transceive function.
  • Test for 9-bit data transfer.
  • Test for baudrate.

This unit test carries out tests for the EVENTS driver.

It consists of test cases for the following functionalities:

  • Test for synchronous event propagation.
  • Test for resynchronized event propagation.
  • Test for asynchronous event propagation.
  • Application as a bridge for I2C slave bootloader self programming
  • Uses USB Communication Device Class(CDC)
  • I2C Master sends the data to be programmed over I2C bus

This unit test carries out tests for the I2C driver.

It consists of test cases for the following functionalities:

  • Test for I2C initialization.
  • Test for I2C master transfer.
  • Test for I2C master full speed transfer.

This unit test carries out tests for the External Interrupt driver.

It consists of test cases for the following functionalities:

  • Test for polled mode detection of external interrupt.
  • Test for callback mode detection of external interrupt.

This application calibrates the internal OSC8M (8MHz) oscillator of the device against a known, accurate external clock or crystal frequency.

This unit test carries out tests for TC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TC start/stop
  • Test for TC callback generation
  • Test for 32-bit (chained) TC operation
  • Test for compare and capture TC operation

This unit test carries out tests for the I2S driver.

It consists of test cases for the following functionalities:

  • Test for polled mode transmit/receive of I2S.
  • Test for callback mode transmit/receive of I2S.

This application demonstrates a simple sound player, sourcing a waveform from the device's Non-Volatile Memory and streaming it out of the DAC as an analog waveform.

This unit test carries out tests for the AC driver.

It consists of test cases for the following functionalities:

  • Test for AC initialization.
  • Test for AC single shot comparison.
  • Test for AC callback mode comparison.
  • Test for AC continuous window mode comparison.

This application demonstrates a hardware XOSC32K external 32KHz crystal oscillator clock source failure detector, using general purpose hardware peripherals.

  • Application for self programming
  • Uses I2C Slave interface
  • I2C Master sends the data to be programmed over I2C bus
  • Resets the device after programming and starts executing application

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the low level ASF module drivers of the device.

asf_structure.jpg

For more information on ASF refer to the online documentation at www.atmel.com/asf.

This application runs a suite of tests for the AT25DFx SerialFlash driver with any SPI HAL that is supported by the driver and for which setup code has been added to this application.

This unit test carries out tests for the BOD driver.

It consists of test cases for the following functionalities:

  • Test for BOD initialization.
  • Test for BOD detected.

This unit test carries out tests for TCC driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for TCC start/stop
  • Test for TCC callback generation
  • Test for 24-bit TCC operation
  • Test for compare and capture TCC operation

This unit test carries out tests for the ADC driver.

It consists of test cases for the following functionalities:

  • Test for ADC initialization.
  • Test for ADC polled mode conversion.
  • Test for ADC callback mode conversion.
  • Test for ADC averaging mode.
  • Test for ADC window mode.

This unit test carries out tests for NVM driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for NVM parameter retrieval.
  • Test for FLASH row erasure.
  • Test for FLASH page read and write.
  • Test for FLASH partial page update.

This unit test carries out tests for SERCOM USART driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for single 8-bit write and read by polling.
  • Test for single 9-bit write and read by polling.
  • Test for multiple 8-bit write by polling and read by interrupts.
  • Test for multiple 8-bit write and read by interrupts.

The Atmel® Software Framework (ASF) is a collection of free embedded software for Atmel microcontroller devices.

It simplifies the usage of Atmel products, providing an abstraction to the hardware and high-value middleware.

ASF is designed to be used for evaluation, prototyping, design, and production phases. ASF is integrated in the Atmel Studio IDE with a graphical user interface or available as a standalone package for several commercial and open source compilers.

This document describes the API interfaces to the USB Stack for applications, included in ASF as middleware service.

asf_structure.jpg

For more information on ASF USB Stack and ASF, refer to the online documentation at following link:

This application demonstrates how to configure the ADC in a sleepwalking operation, where the input voltage is measured at a fixed interval, but the device is not woken from sleep until the measured value is below a given threshold; in this application 0.5 Volts.

This application demonstrates the use of the OLED1 Xplained Pro extension board for the SAM Xplained Pro with a Tic-tac-toe game.

This unit test carries out tests for the DAC driver.

DAC conversion has already been tested by quick_start. This test cases consists of the following functionalities:

  • Test for DAC initialization.
  • Test for DAC buffer empty

This application demonstrates a simple example to toggle the board LED.

This unit test carries out tests for WDT driver.

It consists of test cases for the following functionalities:

  • Test for driver initialization.
  • Test for early warning callbacks.
  • Test for system reset upon timeout.

This example demonstrates the different functional modes of Analog Comparator (AC) module in SAM D21 devices.

The following kit is required for carrying out the test:

  • SAM D20 Xplained Pro board
  • SAM D21 Xplained Pro board
  • SAM R21 Xplained Pro board
  • SAM L21 Xplained Pro board
  • SAM L22 Xplained Pro board
  • SAM DA1 Xplained Pro board
  • SAM C21 Xplained Pro board
  • SAM R30 Xplained Pro board
  • SAM R34 Xplained Pro board
  • WLR 089 Xplained Pro board

Setup

The following connections has to be made using wires:

  • None

To run the test:

  • Connect the SAM Xplained Pro board to the computer using a micro USB cable.
  • Open the virtual COM port in a terminal application.
    Note
    The USB composite firmware running on the Embedded Debugger (EDBG) will enumerate as debugger, virtual COM port and EDBG data gateway.
  • Build the project, program the target and run the application. The terminal shows the results of the unit test.

Usage

  • The unit tests are carried out using the internal Watchdog.

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.

Overview:

Introduction

This example demonstrates the different functional modes of Analog Comparator (AC) module in SAM D21 devices.

Analog comparator is configured in different modes like level crossing detector, window mode detector, false spike avoider or SleepWalking one at a time by commenting / uncommenting the macro AC_MODE in the application example.

This application has been tested on following board:

  • SAM D21 Xplained Pro

Hardware Setup

A sine wave signal should be applied on pin PA04 in the SAM D21 Xplained pro board. More details on analog input signal specification can be found in application note 'Analog Comparator Application Examples'. The device's analog comparator output pin (PA12) should be connected to an oscilloscope so that the generated waveform can be monitored.

Usage

The waveform selection macro AC_MODE should be set to required AC example.

The application will first configure the system clock and then configures the analog comparator based on selected example mode. In level crossing application, the output pin PA12 will be set when the analog input is above a threshold level. In window mode application, the output pin will be set whenever the input signal goes out of a window with two threshold levels. In false spike avoider application, hysteresis and filter mode are enabled which avoid frequent toggling of AC output when the analog input oscillates around the detect threshold. In SleepWalking mode, the analog comparator is configured in single shot mode which performs comparison every 10ms which is timed from RTC and triggered through Event System that reduces the overall current consumption of the system.

Compilation Info

This software was written for the GNU GCC and IAR for ARM. Other compilers may or may not work.

Contact Information

For further information, visit http://www.microchip.com.