External AVR device programming. More...
Go to the source code of this file.
Defines | |
#define | AVRTARGET_PAGESIZE 128 |
Target's page size. | |
#define | AVRSIGNATURE_MEGA8 0x001E9307UL |
#define | AVRSIGNATURE_MEGA168 0x001E9406UL |
#define | AVRSIGNATURE_MEGA103 0x001E9701UL |
#define | AVRSIGNATURE_MEGA128 0x001E9702UL |
#define | AVRSIGNATURE_MEGA1280 0x001E9703UL |
#define | AVRSIGNATURE_MEGA1281 0x001E9704UL |
#define | AVRSIGNATURE_90CAN128 0x001E9781UL |
#define | AVRSIGNATURE_MEGA2560 0x001E9801UL |
#define | AVRSIGNATURE_MEGA2561 0x001E9802UL |
#define | AVRCMD_PROG_ENABLE 0xAC530000UL |
#define | AVRCMD_CHIP_ERASE 0xAC800000UL |
#define | AVRCMD_READ_PROG_MEM_LO 0x20000000UL |
#define | AVRCMD_READ_PROG_MEM_HI 0x28000000UL |
#define | AVRCMD_LOAD_PROG_MEM_PAGE_LO 0x40000000UL |
#define | AVRCMD_LOAD_PROG_MEM_PAGE_HI 0x48000000UL |
#define | AVRCMD_WRITE_PROG_MEM_PAGE 0x4c000000UL |
#define | AVRCMD_LOAD_EXT_ADDR_BYTE 0x4d000000UL |
#define | AVRCMD_READ_EEPROM_MEM 0xA0000000UL |
#define | AVRCMD_WRITE_EEPROM_MEM 0xC0000000UL |
#define | AVRCMD_LOAD_EEPROM_MEM_PAGE 0xC1000000UL |
#define | AVRCMD_WRITE_EEPROM_MEM_PAGE 0xC2000000UL |
#define | AVRCMD_READ_LOCK_BITS 0x58000000UL |
#define | AVRCMD_WRITE_LOCK_BITS 0xACE00000UL |
#define | AVRCMD_READ_SIGNATURE_BYTE 0x30000000UL |
#define | AVRCMD_WRITE_FUSE_BITS 0xACA00000UL |
#define | AVRCMD_WRITE_FUSE_HI_BITS 0xACA80000UL |
#define | AVRCMD_WRITE_FUSE_EXT_BITS 0xACA40000UL |
#define | AVRCMD_READ_FUSE_BITS 0x50000000UL |
#define | AVRCMD_READ_FUSE_HI_BITS 0x58080000UL |
#define | AVRCMD_READ_FUSE_EXT_BITS 0x50080000UL |
#define | AVRCMD_READ_CALIBRATION_BYTE 0x38000000UL |
#define | AVRCMD_POLL_READY 0xF0000000UL |
Functions | |
int | AvrTargetInit (void) |
Initialize programming interface. | |
void | AvrTargetSelect (ureg_t act) |
Set or clear the chip select line. | |
void | AvrTargetReset (ureg_t on) |
Set or release the target's reset line. | |
uint32_t | AvrTargetCmd (uint32_t cmd) |
Send programming command and return response. | |
uint32_t | AvrTargetSignature (void) |
Retrieve the target's signature. | |
uint32_t | AvrTargetFusesRead (void) |
Retrieve the target's fuses. | |
uint32_t | AvrTargetFusesWriteSafe (uint32_t fuses) |
Program the target's fuses in a safe way. | |
int | AvrTargetProgEnable (void) |
Enable target's programming mode. | |
int | AvrTargetPollReady (unsigned int tmo) |
Poll target for becoming ready. | |
int | AvrTargetChipErase (void) |
Erase the target chip. | |
void | AvrTargetPageLoad (uint32_t page, CONST uint8_t *data) |
Load target's program memory page buffer. | |
int | AvrTargetPageWrite (uint32_t page) |
Write page buffer contents to program memory. | |
int | AvrTargetPageVerify (uint32_t page, CONST uint8_t *data) |
Verify program memory page contents. |
External AVR device programming.
* * $Log$ * Revision 1.3 2009/01/17 11:26:47 haraldkipp * Getting rid of two remaining BSD types in favor of stdint. * Replaced 'u_int' by 'unsinged int' and 'uptr_t' by 'uintptr_t'. * * Revision 1.2 2008/08/11 06:59:59 haraldkipp * BSD types replaced by stdint types (feature request #1282721). * * Revision 1.1 2007/04/12 09:01:41 haraldkipp * New API allows to program external AVR devices. * * *
Definition in file avrtarget.h.
#define AVRTARGET_PAGESIZE 128 |
Target's page size.
Hardcoded for now.
Definition at line 66 of file avrtarget.h.
Referenced by AvrTargetPageLoad(), and AvrTargetPageVerify().
#define AVRSIGNATURE_MEGA8 0x001E9307UL |
Definition at line 72 of file avrtarget.h.
#define AVRSIGNATURE_MEGA168 0x001E9406UL |
Definition at line 73 of file avrtarget.h.
#define AVRSIGNATURE_MEGA103 0x001E9701UL |
Definition at line 74 of file avrtarget.h.
#define AVRSIGNATURE_MEGA128 0x001E9702UL |
Definition at line 75 of file avrtarget.h.
#define AVRSIGNATURE_MEGA1280 0x001E9703UL |
Definition at line 76 of file avrtarget.h.
#define AVRSIGNATURE_MEGA1281 0x001E9704UL |
Definition at line 77 of file avrtarget.h.
#define AVRSIGNATURE_90CAN128 0x001E9781UL |
Definition at line 78 of file avrtarget.h.
#define AVRSIGNATURE_MEGA2560 0x001E9801UL |
Definition at line 79 of file avrtarget.h.
#define AVRSIGNATURE_MEGA2561 0x001E9802UL |
Definition at line 80 of file avrtarget.h.
#define AVRCMD_PROG_ENABLE 0xAC530000UL |
Definition at line 85 of file avrtarget.h.
Referenced by AvrTargetProgEnable().
#define AVRCMD_CHIP_ERASE 0xAC800000UL |
Definition at line 86 of file avrtarget.h.
Referenced by AvrTargetChipErase().
#define AVRCMD_READ_PROG_MEM_LO 0x20000000UL |
Definition at line 87 of file avrtarget.h.
Referenced by AvrTargetPageVerify().
#define AVRCMD_READ_PROG_MEM_HI 0x28000000UL |
Definition at line 88 of file avrtarget.h.
Referenced by AvrTargetPageVerify().
#define AVRCMD_LOAD_PROG_MEM_PAGE_LO 0x40000000UL |
Definition at line 89 of file avrtarget.h.
Referenced by AvrTargetPageLoad().
#define AVRCMD_LOAD_PROG_MEM_PAGE_HI 0x48000000UL |
Definition at line 90 of file avrtarget.h.
Referenced by AvrTargetPageLoad().
#define AVRCMD_WRITE_PROG_MEM_PAGE 0x4c000000UL |
Definition at line 91 of file avrtarget.h.
Referenced by AvrTargetPageWrite().
#define AVRCMD_LOAD_EXT_ADDR_BYTE 0x4d000000UL |
Definition at line 92 of file avrtarget.h.
#define AVRCMD_READ_EEPROM_MEM 0xA0000000UL |
Definition at line 93 of file avrtarget.h.
#define AVRCMD_WRITE_EEPROM_MEM 0xC0000000UL |
Definition at line 94 of file avrtarget.h.
#define AVRCMD_LOAD_EEPROM_MEM_PAGE 0xC1000000UL |
Definition at line 95 of file avrtarget.h.
#define AVRCMD_WRITE_EEPROM_MEM_PAGE 0xC2000000UL |
Definition at line 96 of file avrtarget.h.
#define AVRCMD_READ_LOCK_BITS 0x58000000UL |
Definition at line 97 of file avrtarget.h.
#define AVRCMD_WRITE_LOCK_BITS 0xACE00000UL |
Definition at line 98 of file avrtarget.h.
#define AVRCMD_READ_SIGNATURE_BYTE 0x30000000UL |
Definition at line 99 of file avrtarget.h.
Referenced by AvrTargetSignature().
#define AVRCMD_WRITE_FUSE_BITS 0xACA00000UL |
Definition at line 100 of file avrtarget.h.
Referenced by AvrTargetFusesWriteSafe().
#define AVRCMD_WRITE_FUSE_HI_BITS 0xACA80000UL |
Definition at line 101 of file avrtarget.h.
Referenced by AvrTargetFusesWriteSafe().
#define AVRCMD_WRITE_FUSE_EXT_BITS 0xACA40000UL |
Definition at line 102 of file avrtarget.h.
Referenced by AvrTargetFusesWriteSafe().
#define AVRCMD_READ_FUSE_BITS 0x50000000UL |
Definition at line 103 of file avrtarget.h.
Referenced by AvrTargetFusesRead().
#define AVRCMD_READ_FUSE_HI_BITS 0x58080000UL |
Definition at line 104 of file avrtarget.h.
Referenced by AvrTargetFusesRead().
#define AVRCMD_READ_FUSE_EXT_BITS 0x50080000UL |
Definition at line 105 of file avrtarget.h.
Referenced by AvrTargetFusesRead().
#define AVRCMD_READ_CALIBRATION_BYTE 0x38000000UL |
Definition at line 106 of file avrtarget.h.
#define AVRCMD_POLL_READY 0xF0000000UL |
Definition at line 107 of file avrtarget.h.
Referenced by AvrTargetPollReady().