Macros | Functions
drivers/efc/efc.h File Reference

Embedded Flash Controller (EFC) driver for SAM. More...

#include "compiler.h"
Include dependency graph for drivers/efc/efc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CHIP_FLASH_IAP_ADDRESS   (IROM_ADDR + 8)
 
EFC command
#define EFC_FCMD_GETD   0x00
 Get Flash Descriptor. More...
 
#define EFC_FCMD_WP   0x01
 Write page. More...
 
#define EFC_FCMD_WPL   0x02
 Write page and lock. More...
 
#define EFC_FCMD_EWP   0x03
 Erase page and write page. More...
 
#define EFC_FCMD_EWPL   0x04
 Erase page and write page then lock. More...
 
#define EFC_FCMD_EA   0x05
 Erase all. More...
 
#define EFC_FCMD_SLB   0x08
 Set Lock Bit. More...
 
#define EFC_FCMD_CLB   0x09
 Clear Lock Bit. More...
 
#define EFC_FCMD_GLB   0x0A
 Get Lock Bit. More...
 
#define EFC_FCMD_SGPB   0x0B
 Set GPNVM Bit. More...
 
#define EFC_FCMD_CGPB   0x0C
 Clear GPNVM Bit. More...
 
#define EFC_FCMD_GGPB   0x0D
 Get GPNVM Bit. More...
 
#define EFC_FCMD_STUI   0x0E
 Start unique ID. More...
 
#define EFC_FCMD_SPUI   0x0F
 Stop unique ID. More...
 
#define EFC_FCMD_GCALB   0x10
 Get CALIB Bit. More...
 
EFC access mode
#define EFC_ACCESS_MODE_128   0
 
#define EFC_ACCESS_MODE_64   EEFC_FMR_FAM
 

Functions

void efc_disable_frdy_interrupt (Efc *p_efc)
 Disable the flash ready interrupt. More...
 
void efc_enable_frdy_interrupt (Efc *p_efc)
 Enable the flash ready interrupt. More...
 
uint32_t efc_get_flash_access_mode (Efc *p_efc)
 Get flash access mode. More...
 
uint32_t efc_get_result (Efc *p_efc)
 Get the result of the last executed command. More...
 
uint32_t efc_get_status (Efc *p_efc)
 Get the current status of the EEFC. More...
 
uint32_t efc_get_wait_state (Efc *p_efc)
 Get flash wait state. More...
 
uint32_t efc_init (Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws)
 Initialize the EFC controller. More...
 
uint32_t efc_perform_command (Efc *p_efc, uint32_t ul_command, uint32_t ul_argument)
 Perform the given command and wait until its completion (or an error). More...
 
uint32_t efc_perform_read_sequence (Efc *p_efc, uint32_t ul_cmd_st, uint32_t ul_cmd_sp, uint32_t *p_ul_buf, uint32_t ul_size)
 Perform read sequence. Supported sequences are read Unique ID and read User Signature. More...
 
void efc_set_flash_access_mode (Efc *p_efc, uint32_t ul_mode)
 Set flash access mode. More...
 
void efc_set_wait_state (Efc *p_efc, uint32_t ul_fws)
 Set flash wait state. More...
 

EFC return codes

enum  efc_rc {
  EFC_RC_OK = 0, EFC_RC_YES = 0, EFC_RC_NO = 1, EFC_RC_ERROR = 1,
  EFC_RC_INVALID, EFC_RC_NOT_SUPPORT = 0xFFFFFFFF
}
 
typedef enum efc_rc efc_rc_t
 

Detailed Description

Embedded Flash Controller (EFC) driver for SAM.

Copyright (c) 2011-2016 Atmel Corporation. All rights reserved.

Definition in file drivers/efc/efc.h.

Macro Definition Documentation

◆ CHIP_FLASH_IAP_ADDRESS

#define CHIP_FLASH_IAP_ADDRESS   (IROM_ADDR + 8)

The IAP function entry address

Definition at line 109 of file drivers/efc/efc.h.

◆ EFC_ACCESS_MODE_128

#define EFC_ACCESS_MODE_128   0

Definition at line 113 of file drivers/efc/efc.h.

◆ EFC_ACCESS_MODE_64

#define EFC_ACCESS_MODE_64   EEFC_FMR_FAM

Definition at line 114 of file drivers/efc/efc.h.

◆ EFC_FCMD_CGPB

#define EFC_FCMD_CGPB   0x0C

Clear GPNVM Bit.

Definition at line 91 of file drivers/efc/efc.h.

◆ EFC_FCMD_CLB

#define EFC_FCMD_CLB   0x09

Clear Lock Bit.

Definition at line 88 of file drivers/efc/efc.h.

◆ EFC_FCMD_EA

#define EFC_FCMD_EA   0x05

Erase all.

Definition at line 79 of file drivers/efc/efc.h.

◆ EFC_FCMD_EWP

#define EFC_FCMD_EWP   0x03

Erase page and write page.

Definition at line 77 of file drivers/efc/efc.h.

◆ EFC_FCMD_EWPL

#define EFC_FCMD_EWPL   0x04

Erase page and write page then lock.

Definition at line 78 of file drivers/efc/efc.h.

◆ EFC_FCMD_GCALB

#define EFC_FCMD_GCALB   0x10

Get CALIB Bit.

Definition at line 96 of file drivers/efc/efc.h.

◆ EFC_FCMD_GETD

#define EFC_FCMD_GETD   0x00

Get Flash Descriptor.

Definition at line 74 of file drivers/efc/efc.h.

◆ EFC_FCMD_GGPB

#define EFC_FCMD_GGPB   0x0D

Get GPNVM Bit.

Definition at line 92 of file drivers/efc/efc.h.

◆ EFC_FCMD_GLB

#define EFC_FCMD_GLB   0x0A

Get Lock Bit.

Definition at line 89 of file drivers/efc/efc.h.

◆ EFC_FCMD_SGPB

#define EFC_FCMD_SGPB   0x0B

Set GPNVM Bit.

Definition at line 90 of file drivers/efc/efc.h.

◆ EFC_FCMD_SLB

#define EFC_FCMD_SLB   0x08

Set Lock Bit.

Definition at line 87 of file drivers/efc/efc.h.

◆ EFC_FCMD_SPUI

#define EFC_FCMD_SPUI   0x0F

Stop unique ID.

Definition at line 94 of file drivers/efc/efc.h.

◆ EFC_FCMD_STUI

#define EFC_FCMD_STUI   0x0E

Start unique ID.

Definition at line 93 of file drivers/efc/efc.h.

◆ EFC_FCMD_WP

#define EFC_FCMD_WP   0x01

Write page.

Definition at line 75 of file drivers/efc/efc.h.

◆ EFC_FCMD_WPL

#define EFC_FCMD_WPL   0x02

Write page and lock.

Definition at line 76 of file drivers/efc/efc.h.

Typedef Documentation

◆ efc_rc_t

typedef enum efc_rc efc_rc_t

Enumeration Type Documentation

◆ efc_rc

enum efc_rc
Enumerator
EFC_RC_OK 

Operation OK.

EFC_RC_YES 

Yes.

EFC_RC_NO 

No.

EFC_RC_ERROR 

General error.

EFC_RC_INVALID 

Invalid argument input.

EFC_RC_NOT_SUPPORT 

Operation is not supported.

Definition at line 62 of file drivers/efc/efc.h.



inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:19:05