OpenOCD
aduc702x.c File Reference
Include dependency graph for aduc702x.c:

Go to the source code of this file.

Macros

#define ADUC702X_FLASH   0xfffff800
 
#define ADUC702X_FLASH_FEEADR   (4*4)
 
#define ADUC702X_FLASH_FEECON   (2*4)
 
#define ADUC702X_FLASH_FEEDAT   (3*4)
 
#define ADUC702X_FLASH_FEEHIDE   (7*4)
 
#define ADUC702X_FLASH_FEEMOD   (1*4)
 
#define ADUC702X_FLASH_FEEPRO   (6*4)
 
#define ADUC702X_FLASH_FEESIGN   (5*4)
 
#define ADUC702X_FLASH_FEESTA   (0*4)
 

Functions

static int aduc702x_build_sector_list (struct flash_bank *bank)
 
static int aduc702x_check_flash_completion (struct target *target, unsigned int timeout_ms)
 
static int aduc702x_erase (struct flash_bank *bank, unsigned int first, unsigned int last)
 
static int aduc702x_probe (struct flash_bank *bank)
 
static int aduc702x_set_write_enable (struct target *target, int enable)
 
static int aduc702x_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
 
static int aduc702x_write_block (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
 
static int aduc702x_write_single (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
 
 FLASH_BANK_COMMAND_HANDLER (aduc702x_flash_bank_command)
 

Variables

const struct flash_driver aduc702x_flash
 

Macro Definition Documentation

◆ ADUC702X_FLASH

#define ADUC702X_FLASH   0xfffff800

Definition at line 23 of file aduc702x.c.

◆ ADUC702X_FLASH_FEEADR

#define ADUC702X_FLASH_FEEADR   (4*4)

Definition at line 28 of file aduc702x.c.

◆ ADUC702X_FLASH_FEECON

#define ADUC702X_FLASH_FEECON   (2*4)

Definition at line 26 of file aduc702x.c.

◆ ADUC702X_FLASH_FEEDAT

#define ADUC702X_FLASH_FEEDAT   (3*4)

Definition at line 27 of file aduc702x.c.

◆ ADUC702X_FLASH_FEEHIDE

#define ADUC702X_FLASH_FEEHIDE   (7*4)

Definition at line 31 of file aduc702x.c.

◆ ADUC702X_FLASH_FEEMOD

#define ADUC702X_FLASH_FEEMOD   (1*4)

Definition at line 25 of file aduc702x.c.

◆ ADUC702X_FLASH_FEEPRO

#define ADUC702X_FLASH_FEEPRO   (6*4)

Definition at line 30 of file aduc702x.c.

◆ ADUC702X_FLASH_FEESIGN

#define ADUC702X_FLASH_FEESIGN   (5*4)

Definition at line 29 of file aduc702x.c.

◆ ADUC702X_FLASH_FEESTA

#define ADUC702X_FLASH_FEESTA   (0*4)

Definition at line 24 of file aduc702x.c.

Function Documentation

◆ aduc702x_build_sector_list()

static int aduc702x_build_sector_list ( struct flash_bank bank)
static

Definition at line 45 of file aduc702x.c.

References bank, ERROR_OK, and offset.

Referenced by FLASH_BANK_COMMAND_HANDLER().

◆ aduc702x_check_flash_completion()

static int aduc702x_check_flash_completion ( struct target target,
unsigned int  timeout_ms 
)
static

◆ aduc702x_erase()

◆ aduc702x_probe()

static int aduc702x_probe ( struct flash_bank bank)
static

Definition at line 327 of file aduc702x.c.

References ERROR_OK.

◆ aduc702x_set_write_enable()

static int aduc702x_set_write_enable ( struct target target,
int  enable 
)
static

Definition at line 334 of file aduc702x.c.

References ADUC702X_FLASH, ADUC702X_FLASH_FEEMOD, ERROR_OK, and target_write_u16().

Referenced by aduc702x_erase(), and aduc702x_write_single().

◆ aduc702x_write()

static int aduc702x_write ( struct flash_bank bank,
const uint8_t *  buffer,
uint32_t  offset,
uint32_t  count 
)
static

◆ aduc702x_write_block()

◆ aduc702x_write_single()

static int aduc702x_write_single ( struct flash_bank bank,
const uint8_t *  buffer,
uint32_t  offset,
uint32_t  count 
)
static

◆ FLASH_BANK_COMMAND_HANDLER()

FLASH_BANK_COMMAND_HANDLER ( aduc702x_flash_bank_command  )

Definition at line 35 of file aduc702x.c.

References aduc702x_build_sector_list(), bank, and ERROR_OK.

Variable Documentation

◆ aduc702x_flash

const struct flash_driver aduc702x_flash
Initial value:
= {
.name = "aduc702x",
.flash_bank_command = aduc702x_flash_bank_command,
.erase = aduc702x_erase,
.write = aduc702x_write,
.probe = aduc702x_probe,
.auto_probe = aduc702x_probe,
.erase_check = default_flash_blank_check,
}
static int aduc702x_write(struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
Definition: aduc702x.c:304
static int aduc702x_probe(struct flash_bank *bank)
Definition: aduc702x.c:327
static int aduc702x_erase(struct flash_bank *bank, unsigned int first, unsigned int last)
Definition: aduc702x.c:65
int default_flash_blank_check(struct flash_bank *bank)
Provides default erased-bank check handling.
int default_flash_read(struct flash_bank *bank, uint8_t *buffer, uint32_t offset, uint32_t count)
Provides default read implementation for flash memory.

Definition at line 347 of file aduc702x.c.