#include <avr32/io.h>
#include <stdio.h>
#include "usart.h"
#include "print_funcs.h"
#include "cycle_counter.h"
#include "board.h"
#include "intc.h"
#include "flashc.h"
#include "pm.h"
#include "gpio.h"
#include "nf.h"
#include "stdio_serial.h"
#include "conf_stdio_serial.h"
Functions | |
static void | init_exceptions (void) |
Initializes MCU exceptions. More... | |
static void | init_hmatrix (void) |
Initializes the HSB bus matrix. More... | |
static void | init_interrupts (void) |
Initializes MCU interrupts. More... | |
static void | init_stdio (void) |
Initializes STDIO. More... | |
int | main (void) |
Main function. More... | |
U32 | nf_block_2_page (U16 block_addr) |
Convert a block number into a page number. More... | |
Variables | |
return | |
U16 | valid_block_addr [NF_N_DEVICES] |
|
static |
Initializes MCU exceptions.
References _evba, Enable_global_exception, and Set_system_register.
|
static |
Initializes the HSB bus matrix.
Low-level initialization routine called during startup, before the main function.
|
static |
Initializes MCU interrupts.
References Enable_global_interrupt, and INTC_init_interrupts().
|
static |
Initializes STDIO.
References usart_options_t::baudrate, stdio_serial_init(), USART_SERIAL_CHAR_LENGTH, USART_SERIAL_EXAMPLE, USART_SERIAL_EXAMPLE_BAUDRATE, USART_SERIAL_PARITY, and USART_SERIAL_STOP_BIT.
Referenced by main().
int main | ( | void | ) |
Main function.
References board_init(), cpu_cy_2_us(), data, G_N_BLOCKS, G_OFST_BLK_STATUS, Get_sys_count, gpio_set_gpio_pin(), i, init_stdio(), M_ID_MICRON, MSB0, MSB1, MSB3, nf_block_2_page(), nf_erase_block(), nf_init(), NF_N_DEVICES, nf_open_page_read(), nf_open_page_write(), NF_PAGE_PROGRAM_CMD, nf_rd_data(), nf_read_id(), NF_READ_ID_CMD, nf_reset_nands(), nf_select(), NF_SPARE_POS, nf_unprotect(), nf_wait_busy(), nf_wr_cmd(), nf_wr_data(), SYSCLK_EBI, sysclk_enable_hsb_module(), sysclk_enable_pbb_module(), sysclk_get_cpu_hz(), SYSCLK_HMATRIX, sysclk_init(), and SYSCLK_SMC_REGS.
Convert a block number into a page number.
References G_SHIFT_BLOCK_PAGE.
return |
U16 valid_block_addr[NF_N_DEVICES] |