arm_flash_atmel.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sysexits.h>
#include <ctype.h>
#include <unistd.h>
#include "dbg_msg.h"
#include "jt_arm.h"
#include "jt_flash.h"
#include "arm_gdbstub.h"
#include "arm_memory_mmap.h"
#include "arm_memory_workspace.h"
#include "convert.h"

Defines

Functions


Detailed Description


Define Documentation

#define SAM7_MC_FMR__FMCN ( _x_   )     (((_x_)&0xFF)<<16)
#define SAM7_MC_FMR__FWS ( _x_   )     (((_x_)&0x3)<<8)
#define SAM7_MC_FMR__NEBP ( _x_   )     (((_x_)&0x1)<<7)
#define SAM7_MC_FCR__KEY   (0x5A<<24)
#define SAM7_MC_FCR__PAGEN ( _x_   )     (((_x_)&0x3FF)<<8)
#define SAM7_MC_FCR__FCMD ( _x_   )     (((_x_)&0xF))
#define SAM7_MC_FCR__FCMD_WP   1
#define SAM7_MC_FCR__FCMD_SLB   2

Referenced by atmelFlashLock().

#define SAM7_MC_FCR__FCMD_WPL   3
#define SAM7_MC_FCR__FCMD_CLB   4

Referenced by atmelFlashUnlock().

#define SAM7_MC_FCR__FCMD_EA   8
#define SAM7_MC_FCR__FCMD_SGPB   11

Referenced by atmelFlashSetGPNVM().

#define SAM7_MC_FCR__FCMD_CGPB   13

Referenced by atmelFlashClearGPNVM().

#define SAM7_MC_FCR__FCMD_SSB   15

Function Documentation

int atmelFlashEraseAndProgram ( uint32_t  addr,
int  pageNumber,
int  pageSize,
uint32_t *  data 
)
int atmelFlashProgramOnly ( uint32_t  addr,
int  pageNumber,
int  pageSize,
uint32_t *  data 
)
int atmelFlashUnlock ( uint32_t  addr,
int  pageNumber 
)
int atmelFlashLock ( uint32_t  addr,
int  pageNumber 
)
int atmelFlashSetGPNVM ( int  bitNumber  ) 
int atmelFlashClearGPNVM ( int  bitNumber  ) 
int atmelFlashErase ( uint32_t  addr,
int  pageNumber 
)
uint32_t atmelFlashGetStatus ( uint32_t  addr  ) 

Atmel SAM7 flash. read AT91SAM7 Flash Status Register

Parameters:
addr Flash page address start
Returns:
Flash Status Register

References jtag_arm_ReadWord().

Referenced by eraseFlashCB_sector(), and programFlashCB_write_sector().


This file is part of the documentation for JTAG-GDB Server for ARM .

Generated on Mon Feb 15 21:23:21 2010 by doxygen 1.6.2.