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

Go to the source code of this file.

Macros

#define ADUCM360_FLASH_BASE   0x40002800
 
#define ADUCM360_FLASH_FEEADR0H   0x0014
 
#define ADUCM360_FLASH_FEEADR0L   0x0010
 
#define ADUCM360_FLASH_FEEADR1H   0x001C
 
#define ADUCM360_FLASH_FEEADR1L   0x0018
 
#define ADUCM360_FLASH_FEEADRAH   0x004C
 
#define ADUCM360_FLASH_FEEADRAL   0x0048
 
#define ADUCM360_FLASH_FEEAEN0   0x0078
 
#define ADUCM360_FLASH_FEEAEN1   0x007C
 
#define ADUCM360_FLASH_FEEAEN2   0x0080
 
#define ADUCM360_FLASH_FEECMD   0x0008
 
#define ADUCM360_FLASH_FEECON0   0x0004
 
#define ADUCM360_FLASH_FEECON1   0x0038
 
#define ADUCM360_FLASH_FEEKEY   0x0020
 
#define ADUCM360_FLASH_FEEPROH   0x002C
 
#define ADUCM360_FLASH_FEEPROL   0x0028
 
#define ADUCM360_FLASH_FEESIGH   0x0034
 
#define ADUCM360_FLASH_FEESIGL   0x0030
 
#define ADUCM360_FLASH_FEESTA   0x0000
 
#define FEESTA_WRDONE   0x00000008
 
#define FLASH_SECTOR_SIZE   512
 

Functions

static int aducm360_build_sector_list (struct flash_bank *bank)
 
static int aducm360_check_flash_completion (struct target *target, unsigned int timeout_ms)
 
static int aducm360_erase (struct flash_bank *bank, unsigned int first, unsigned int last)
 
static int aducm360_mass_erase (struct target *target)
 
static int aducm360_page_erase (struct target *target, uint32_t padd)
 
static int aducm360_probe (struct flash_bank *bank)
 
static int aducm360_set_write_enable (struct target *target, int enable)
 
static int aducm360_write (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
 
static int aducm360_write_block (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
 
static int aducm360_write_block_async (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
 
static int aducm360_write_block_sync (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
 
static int aducm360_write_modified (struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
 
 FLASH_BANK_COMMAND_HANDLER (aducm360_flash_bank_command)
 

Variables

const struct flash_driver aducm360_flash
 

Macro Definition Documentation

◆ ADUCM360_FLASH_BASE

#define ADUCM360_FLASH_BASE   0x40002800

Definition at line 41 of file aducm360.c.

◆ ADUCM360_FLASH_FEEADR0H

#define ADUCM360_FLASH_FEEADR0H   0x0014

Definition at line 46 of file aducm360.c.

◆ ADUCM360_FLASH_FEEADR0L

#define ADUCM360_FLASH_FEEADR0L   0x0010

Definition at line 45 of file aducm360.c.

◆ ADUCM360_FLASH_FEEADR1H

#define ADUCM360_FLASH_FEEADR1H   0x001C

Definition at line 48 of file aducm360.c.

◆ ADUCM360_FLASH_FEEADR1L

#define ADUCM360_FLASH_FEEADR1L   0x0018

Definition at line 47 of file aducm360.c.

◆ ADUCM360_FLASH_FEEADRAH

#define ADUCM360_FLASH_FEEADRAH   0x004C

Definition at line 56 of file aducm360.c.

◆ ADUCM360_FLASH_FEEADRAL

#define ADUCM360_FLASH_FEEADRAL   0x0048

Definition at line 55 of file aducm360.c.

◆ ADUCM360_FLASH_FEEAEN0

#define ADUCM360_FLASH_FEEAEN0   0x0078

Definition at line 57 of file aducm360.c.

◆ ADUCM360_FLASH_FEEAEN1

#define ADUCM360_FLASH_FEEAEN1   0x007C

Definition at line 58 of file aducm360.c.

◆ ADUCM360_FLASH_FEEAEN2

#define ADUCM360_FLASH_FEEAEN2   0x0080

Definition at line 59 of file aducm360.c.

◆ ADUCM360_FLASH_FEECMD

#define ADUCM360_FLASH_FEECMD   0x0008

Definition at line 44 of file aducm360.c.

◆ ADUCM360_FLASH_FEECON0

#define ADUCM360_FLASH_FEECON0   0x0004

Definition at line 43 of file aducm360.c.

◆ ADUCM360_FLASH_FEECON1

#define ADUCM360_FLASH_FEECON1   0x0038

Definition at line 54 of file aducm360.c.

◆ ADUCM360_FLASH_FEEKEY

#define ADUCM360_FLASH_FEEKEY   0x0020

Definition at line 49 of file aducm360.c.

◆ ADUCM360_FLASH_FEEPROH

#define ADUCM360_FLASH_FEEPROH   0x002C

Definition at line 51 of file aducm360.c.

◆ ADUCM360_FLASH_FEEPROL

#define ADUCM360_FLASH_FEEPROL   0x0028

Definition at line 50 of file aducm360.c.

◆ ADUCM360_FLASH_FEESIGH

#define ADUCM360_FLASH_FEESIGH   0x0034

Definition at line 53 of file aducm360.c.

◆ ADUCM360_FLASH_FEESIGL

#define ADUCM360_FLASH_FEESIGL   0x0030

Definition at line 52 of file aducm360.c.

◆ ADUCM360_FLASH_FEESTA

#define ADUCM360_FLASH_FEESTA   0x0000

Definition at line 42 of file aducm360.c.

◆ FEESTA_WRDONE

#define FEESTA_WRDONE   0x00000008

Definition at line 435 of file aducm360.c.

◆ FLASH_SECTOR_SIZE

#define FLASH_SECTOR_SIZE   512

Definition at line 72 of file aducm360.c.

Function Documentation

◆ aducm360_build_sector_list()

static int aducm360_build_sector_list ( struct flash_bank bank)
static

Definition at line 75 of file aducm360.c.

References bank, ERROR_OK, FLASH_SECTOR_SIZE, and offset.

Referenced by FLASH_BANK_COMMAND_HANDLER().

◆ aducm360_check_flash_completion()

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

◆ aducm360_erase()

static int aducm360_erase ( struct flash_bank bank,
unsigned int  first,
unsigned int  last 
)
static

◆ aducm360_mass_erase()

◆ aducm360_page_erase()

◆ aducm360_probe()

static int aducm360_probe ( struct flash_bank bank)
static

Definition at line 494 of file aducm360.c.

References ERROR_OK.

◆ aducm360_set_write_enable()

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

◆ aducm360_write()

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

◆ aducm360_write_block()

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

◆ aducm360_write_block_async()

◆ aducm360_write_block_sync()

◆ aducm360_write_modified()

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

◆ FLASH_BANK_COMMAND_HANDLER()

FLASH_BANK_COMMAND_HANDLER ( aducm360_flash_bank_command  )

Definition at line 62 of file aducm360.c.

References aducm360_build_sector_list(), bank, and ERROR_OK.

Variable Documentation

◆ aducm360_flash

const struct flash_driver aducm360_flash
Initial value:
= {
.name = "aducm360",
.flash_bank_command = aducm360_flash_bank_command,
.erase = aducm360_erase,
.write = aducm360_write,
.probe = aducm360_probe,
.auto_probe = aducm360_probe,
.erase_check = default_flash_blank_check,
}
static int aducm360_probe(struct flash_bank *bank)
Definition: aducm360.c:494
static int aducm360_write(struct flash_bank *bank, const uint8_t *buffer, uint32_t offset, uint32_t count)
Definition: aducm360.c:471
static int aducm360_erase(struct flash_bank *bank, unsigned int first, unsigned int last)
Definition: aducm360.c:155
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 523 of file aducm360.c.