OpenOCD
avr32_jtag.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  avr32_jtag
 

Macros

#define AVR32_INST_IDCODE   0x01
 
#define AVR32_INST_MB_ACCESS   0x12
 
#define AVR32_INST_MW_ACCESS   0x11
 
#define AVR32_INST_NEXUS_ACCESS   0x10
 
#define AVR32_OCDREG_DC   0x02
 
#define AVR32_OCDREG_DCCPU   0x44
 
#define AVR32_OCDREG_DCEMU   0x45
 
#define AVR32_OCDREG_DCSR   0x46
 
#define AVR32_OCDREG_DID   0x00
 
#define AVR32_OCDREG_DINST   0x41
 
#define AVR32_OCDREG_DPC   0x42
 
#define AVR32_OCDREG_DS   0x04
 
#define AVR32NUMCOREREGS   17
 
#define MFDR(reg, dreg)   (0xe5b00044 | ((reg) << 16) | dreg)
 
#define MFSR(reg, sysreg)   (0xe1b00002 | ((reg) << 16) | sysreg)
 
#define MODE_READ   0x01
 
#define MODE_WRITE   0x00
 
#define MTDR(dreg, reg)   (0xe7b00044 | ((reg) << 16) | dreg)
 
#define MTSR(sysreg, reg)   (0xe3b00002 | ((reg) << 16) | sysreg)
 
#define OCDREG_DC_ABORT   (1 << 31)
 
#define OCDREG_DC_DBE   (1 << 13)
 
#define OCDREG_DC_DBR   (1 << 12)
 
#define OCDREG_DC_RES   (1 << 30)
 
#define OCDREG_DC_SQA   (1 << 22)
 
#define OCDREG_DC_SS   (1 << 8)
 
#define OCDREG_DCSR_CPUD   (1 << 0)
 
#define OCDREG_DCSR_EMUD   (1 << 1)
 
#define OCDREG_DS_BOZ   (1 << 25)
 
#define OCDREG_DS_BP_MASK   0xff
 
#define OCDREG_DS_BP_SHIFT   8
 
#define OCDREG_DS_DBA   (1 << 26)
 
#define OCDREG_DS_DBS   (1 << 5)
 
#define OCDREG_DS_EXB   (1 << 27)
 
#define OCDREG_DS_HWB   (1 << 2)
 
#define OCDREG_DS_INC   (1 << 24)
 
#define OCDREG_DS_NTBF   (1 << 28)
 
#define OCDREG_DS_SSS   (1 << 0)
 
#define OCDREG_DS_STP   (1 << 4)
 
#define OCDREG_DS_SWB   (1 << 1)
 
#define RETD   0xd703d623
 
#define SLAVE_HSB_CACHED   0x04
 
#define SLAVE_HSB_UNCACHED   0x05
 
#define SLAVE_OCD   0x01
 

Functions

int avr32_jtag_exec (struct avr32_jtag *jtag_info, uint32_t inst)
 
int avr32_jtag_mwa_read (struct avr32_jtag *jtag_info, int slave, uint32_t addr, uint32_t *value)
 
int avr32_jtag_mwa_write (struct avr32_jtag *jtag_info, int slave, uint32_t addr, uint32_t value)
 
int avr32_jtag_nexus_read (struct avr32_jtag *jtag_info, uint32_t addr, uint32_t *value)
 
int avr32_jtag_nexus_write (struct avr32_jtag *jtag_info, uint32_t addr, uint32_t value)
 
int avr32_ocd_clearbits (struct avr32_jtag *jtag, int reg, uint32_t bits)
 
int avr32_ocd_setbits (struct avr32_jtag *jtag, int reg, uint32_t bits)
 

Macro Definition Documentation

◆ AVR32_INST_IDCODE

#define AVR32_INST_IDCODE   0x01

Definition at line 13 of file avr32_jtag.h.

◆ AVR32_INST_MB_ACCESS

#define AVR32_INST_MB_ACCESS   0x12

Definition at line 16 of file avr32_jtag.h.

◆ AVR32_INST_MW_ACCESS

#define AVR32_INST_MW_ACCESS   0x11

Definition at line 15 of file avr32_jtag.h.

◆ AVR32_INST_NEXUS_ACCESS

#define AVR32_INST_NEXUS_ACCESS   0x10

Definition at line 14 of file avr32_jtag.h.

◆ AVR32_OCDREG_DC

#define AVR32_OCDREG_DC   0x02

Definition at line 27 of file avr32_jtag.h.

◆ AVR32_OCDREG_DCCPU

#define AVR32_OCDREG_DCCPU   0x44

Definition at line 50 of file avr32_jtag.h.

◆ AVR32_OCDREG_DCEMU

#define AVR32_OCDREG_DCEMU   0x45

Definition at line 51 of file avr32_jtag.h.

◆ AVR32_OCDREG_DCSR

#define AVR32_OCDREG_DCSR   0x46

Definition at line 52 of file avr32_jtag.h.

◆ AVR32_OCDREG_DID

#define AVR32_OCDREG_DID   0x00

Definition at line 26 of file avr32_jtag.h.

◆ AVR32_OCDREG_DINST

#define AVR32_OCDREG_DINST   0x41

Definition at line 48 of file avr32_jtag.h.

◆ AVR32_OCDREG_DPC

#define AVR32_OCDREG_DPC   0x42

Definition at line 49 of file avr32_jtag.h.

◆ AVR32_OCDREG_DS

#define AVR32_OCDREG_DS   0x04

Definition at line 34 of file avr32_jtag.h.

◆ AVR32NUMCOREREGS

#define AVR32NUMCOREREGS   17

Definition at line 10 of file avr32_jtag.h.

◆ MFDR

#define MFDR (   reg,
  dreg 
)    (0xe5b00044 | ((reg) << 16) | dreg)

Definition at line 68 of file avr32_jtag.h.

◆ MFSR

#define MFSR (   reg,
  sysreg 
)    (0xe1b00002 | ((reg) << 16) | sysreg)

Definition at line 70 of file avr32_jtag.h.

◆ MODE_READ

#define MODE_READ   0x01

Definition at line 60 of file avr32_jtag.h.

◆ MODE_WRITE

#define MODE_WRITE   0x00

Definition at line 59 of file avr32_jtag.h.

◆ MTDR

#define MTDR (   dreg,
  reg 
)    (0xe7b00044 | ((reg) << 16) | dreg)

Definition at line 67 of file avr32_jtag.h.

◆ MTSR

#define MTSR (   sysreg,
  reg 
)    (0xe3b00002 | ((reg) << 16) | sysreg)

Definition at line 69 of file avr32_jtag.h.

◆ OCDREG_DC_ABORT

#define OCDREG_DC_ABORT   (1 << 31)

Definition at line 33 of file avr32_jtag.h.

◆ OCDREG_DC_DBE

#define OCDREG_DC_DBE   (1 << 13)

Definition at line 30 of file avr32_jtag.h.

◆ OCDREG_DC_DBR

#define OCDREG_DC_DBR   (1 << 12)

Definition at line 29 of file avr32_jtag.h.

◆ OCDREG_DC_RES

#define OCDREG_DC_RES   (1 << 30)

Definition at line 32 of file avr32_jtag.h.

◆ OCDREG_DC_SQA

#define OCDREG_DC_SQA   (1 << 22)

Definition at line 31 of file avr32_jtag.h.

◆ OCDREG_DC_SS

#define OCDREG_DC_SS   (1 << 8)

Definition at line 28 of file avr32_jtag.h.

◆ OCDREG_DCSR_CPUD

#define OCDREG_DCSR_CPUD   (1 << 0)

Definition at line 53 of file avr32_jtag.h.

◆ OCDREG_DCSR_EMUD

#define OCDREG_DCSR_EMUD   (1 << 1)

Definition at line 54 of file avr32_jtag.h.

◆ OCDREG_DS_BOZ

#define OCDREG_DS_BOZ   (1 << 25)

Definition at line 43 of file avr32_jtag.h.

◆ OCDREG_DS_BP_MASK

#define OCDREG_DS_BP_MASK   0xff

Definition at line 41 of file avr32_jtag.h.

◆ OCDREG_DS_BP_SHIFT

#define OCDREG_DS_BP_SHIFT   8

Definition at line 40 of file avr32_jtag.h.

◆ OCDREG_DS_DBA

#define OCDREG_DS_DBA   (1 << 26)

Definition at line 44 of file avr32_jtag.h.

◆ OCDREG_DS_DBS

#define OCDREG_DS_DBS   (1 << 5)

Definition at line 39 of file avr32_jtag.h.

◆ OCDREG_DS_EXB

#define OCDREG_DS_EXB   (1 << 27)

Definition at line 45 of file avr32_jtag.h.

◆ OCDREG_DS_HWB

#define OCDREG_DS_HWB   (1 << 2)

Definition at line 37 of file avr32_jtag.h.

◆ OCDREG_DS_INC

#define OCDREG_DS_INC   (1 << 24)

Definition at line 42 of file avr32_jtag.h.

◆ OCDREG_DS_NTBF

#define OCDREG_DS_NTBF   (1 << 28)

Definition at line 46 of file avr32_jtag.h.

◆ OCDREG_DS_SSS

#define OCDREG_DS_SSS   (1 << 0)

Definition at line 35 of file avr32_jtag.h.

◆ OCDREG_DS_STP

#define OCDREG_DS_STP   (1 << 4)

Definition at line 38 of file avr32_jtag.h.

◆ OCDREG_DS_SWB

#define OCDREG_DS_SWB   (1 << 1)

Definition at line 36 of file avr32_jtag.h.

◆ RETD

#define RETD   0xd703d623

Definition at line 66 of file avr32_jtag.h.

◆ SLAVE_HSB_CACHED

#define SLAVE_HSB_CACHED   0x04

Definition at line 19 of file avr32_jtag.h.

◆ SLAVE_HSB_UNCACHED

#define SLAVE_HSB_UNCACHED   0x05

Definition at line 20 of file avr32_jtag.h.

◆ SLAVE_OCD

#define SLAVE_OCD   0x01

Definition at line 18 of file avr32_jtag.h.

Function Documentation

◆ avr32_jtag_exec()

◆ avr32_jtag_mwa_read()

int avr32_jtag_mwa_read ( struct avr32_jtag jtag_info,
int  slave,
uint32_t  addr,
uint32_t *  value 
)

◆ avr32_jtag_mwa_write()

int avr32_jtag_mwa_write ( struct avr32_jtag jtag_info,
int  slave,
uint32_t  addr,
uint32_t  value 
)

◆ avr32_jtag_nexus_read()

◆ avr32_jtag_nexus_write()

int avr32_jtag_nexus_write ( struct avr32_jtag jtag_info,
uint32_t  addr,
uint32_t  value 
)

◆ avr32_ocd_clearbits()

int avr32_ocd_clearbits ( struct avr32_jtag jtag,
int  reg,
uint32_t  bits 
)

Definition at line 345 of file avr32_jtag.c.

References avr32_jtag_nexus_read(), avr32_jtag_nexus_write(), bits, and ERROR_OK.

Referenced by avr32_ap7k_resume().

◆ avr32_ocd_setbits()

int avr32_ocd_setbits ( struct avr32_jtag jtag,
int  reg,
uint32_t  bits 
)

Definition at line 328 of file avr32_jtag.c.

References avr32_jtag_nexus_read(), avr32_jtag_nexus_write(), bits, and ERROR_OK.

Referenced by avr32_ap7k_examine(), and avr32_ap7k_halt().