Microchip® Advanced Software Framework

smc.c File Reference

Static Memory Controller (SMC) driver for SAM.

Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.

#include "smc.h"
#include "board.h"

Macros

#define SMC_WPKEY_VALUE   (0x534D43)
 

Functions

uint32_t smc_ecc_get_status (Smc *p_smc, uint32_t ul_parity_number)
 Get ECC status by giving ecc number. More...
 
void smc_ecc_get_value (Smc *p_smc, uint32_t *p_ecc)
 Get all ECC parity registers value. More...
 
void smc_ecc_init (Smc *p_smc, uint32_t ul_type, uint32_t ul_pagesize)
 Initialize ECC mode. More...
 
void smc_enable_writeprotect (Smc *p_smc, uint32_t ul_enable)
 Set write protection of SMC registers. More...
 
uint32_t smc_get_mode (Smc *p_smc, uint32_t ul_cs)
 Get the SMC mode of the specified Chip Select. More...
 
uint32_t smc_get_writeprotect_status (Smc *p_smc)
 Get the status of SMC write protection register. More...
 
void smc_nfc_disable (Smc *p_smc)
 Disable NFC controller. More...
 
void smc_nfc_disable_interrupt (Smc *p_smc, uint32_t ul_sources)
 Disable SMC interrupts. More...
 
void smc_nfc_disable_spare_read (Smc *p_smc)
 Prevent NFC controller from reading the spare area in read mode. More...
 
void smc_nfc_disable_spare_write (Smc *p_smc)
 Prevent NFC controller from writing the spare area in read mode. More...
 
void smc_nfc_enable (Smc *p_smc)
 Enable NFC controller. More...
 
void smc_nfc_enable_interrupt (Smc *p_smc, uint32_t ul_sources)
 Enable SMC interrupts. More...
 
void smc_nfc_enable_spare_read (Smc *p_smc)
 Enable NFC controller to read both main and spare area in read mode. More...
 
void smc_nfc_enable_spare_write (Smc *p_smc)
 Enable NFC controller to write both main and spare area in write mode. More...
 
uint32_t smc_nfc_get_interrupt_mask (Smc *p_smc)
 Get the interrupt mask. More...
 
uint32_t smc_nfc_get_status (Smc *p_smc)
 Get the NFC Status. More...
 
void smc_nfc_init (Smc *p_smc, uint32_t ul_config)
 Initialize NFC configuration. More...
 
void smc_nfc_send_command (Smc *p_smc, uint32_t ul_cmd, uint32_t ul_address_cycle, uint32_t ul_cycle0)
 Use the HOST nandflash controller to send a command. More...
 
void smc_nfc_set_address0 (Smc *p_smc, uint8_t uc_address0)
 Set flash cycle 0 address. More...
 
void smc_nfc_set_bank (Smc *p_smc, uint32_t ul_bank)
 Set NFC sram bank. More...
 
void smc_nfc_set_page_size (Smc *p_smc, uint32_t ul_page_size)
 Set NFC page size. More...
 
void smc_set_cycle_timing (Smc *p_smc, uint32_t ul_cs, uint32_t ul_cycle_timing)
 Configure the SMC cycle timing for the specified Chip Select. More...
 
void smc_set_mode (Smc *p_smc, uint32_t ul_cs, uint32_t ul_mode)
 Configure the SMC mode for the specified Chip Select. More...
 
void smc_set_nand_timing (Smc *p_smc, uint32_t ul_cs, uint32_t ul_nand_timing)
 Configure the SMC nand timing for the specified Chip Select. More...
 
void smc_set_pulse_timing (Smc *p_smc, uint32_t ul_cs, uint32_t ul_pulse_timing)
 Configure the SMC pulse timing for the specified Chip Select. More...
 
void smc_set_setup_timing (Smc *p_smc, uint32_t ul_cs, uint32_t ul_setup_timing)
 Configure the SMC Setup timing for the specified Chip Select. More...
 

#define SMC_WPKEY_VALUE   (0x534D43)

Referenced by smc_enable_writeprotect().