Example application for the SRAM test.
This example shows how the SRAM test can be embedded in an application. The application lights up an LED that signals correct behavior of the system. Then it enters the main loop, where the SRAM test is called periodically. This test is based on March X and it checks a segment of SRAM memory at a time. After the SRAM test, a second LED is toggled in order to visualize when the partial tests are finished. If errors were found, the global error flag would be set by the test. This would lead to the application leaving the main loop and switching off the first LED.
The configuration for memory size, amount of segments, buffer size, etc. can bet set up in classb_sram.h. Note that if GCC is used and the size of the test buffer changes (as a result of a change in the number of segments or the amount of segment overlap), the new buffer size must be configured in the linker as well. See Internal SRAM Test for more details.
Copyright (C) 2012 Atmel Corporation. All rights reserved.
Definition in file sram/UserApplication.c.
Include dependency graph for sram/UserApplication.c:Go to the source code of this file.
Functions | |
| int | main (void) |
| Main entry point of the application. Sets up board hardware, and waits until an error has occurred. | |
| ISR (SWITCH_INT0_vect) | |
| Button press interrupt. | |
Variables | |
| NO_INIT volatile uint8_t | classb_error |
| Global error variable. | |