Microchip® Advanced Software Framework

SAM EEPROM Emulator Unit Test

Overview:

Introduction

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.

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.