Flash program example for SAM.
Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.
#include "asf.h"
#include "stdio_serial.h"
#include "conf_board.h"
#include "conf_clock.h"
#include "conf_example.h"
Macros | |
#define | STRING_EOL "\r" |
#define | STRING_HEADER |
Typedefs | |
typedef unsigned long | UL |
Functions | |
static void | configure_console (void) |
Configure console using UART. More... | |
int | main (void) |
Perform initialization and tests on flash. More... | |
#define STRING_EOL "\r" |
#define STRING_HEADER |
Referenced by main().
typedef unsigned long UL |
|
static |
Configure console using UART.
References uart_rs232_options::baudrate, CONF_UART, CONF_UART_BAUDRATE, CONF_UART_CHAR_LENGTH, CONF_UART_PARITY, CONF_UART_STOP_BITS, CONSOLE_UART_ID, stdio_serial_init(), and sysclk_enable_peripheral_clock().
Referenced by main().
int main | ( | void | ) |
Perform initialization and tests on flash.
References board_init(), configure_console(), FLASH_ACCESS_MODE_128, flash_enable_security_bit(), flash_erase_sector(), flash_init(), flash_lock(), FLASH_RC_OK, flash_unlock(), flash_write(), SAM4C, SAM4CM, SAM4CP, SAM4E, SAM4N, SAM4S, SAME70, SAMG, SAMS70, SAMV70, SAMV71, STRING_HEADER, sysclk_init(), and TEST_PAGE_ADDRESS.