Xmega Application Note | |||||
00001 /* This file has been prepared for Doxygen automatic documentation generation.*/ 00062 #ifndef SP_DRIVER_H 00063 #define SP_DRIVER_H 00064 00065 /* Define the size of the flash page if not defined in the header files. */ 00066 #ifndef FLASH_PAGE_SIZE 00067 //#error "FLASH_PAGE_SIZE must be defined if not defined in header files." 00068 #define FLASH_PAGE_SIZE 512 00069 #endif /*FLASH_PAGE_SIZE*/ 00070 00071 //APPTABLE address for ATxmega128A1 00072 //#define APPTABLE_SECTION_START 0x01E000 00073 00074 /* Define the Start of the application table if not defined in the header files. */ 00075 #ifndef APPTABLE_SECTION_START 00076 //#error "APPTABLE_SECTION_START must be defined if not defined in header files." 00077 #define APPTABLE_SECTION_START 0x01E000 //APPTABLE address for ATxmega128A1 00078 #endif /*APPTABLE_SECTION_START*/ 00079 00091 uint8_t SP_ReadByte(uint32_t address); 00092 00104 uint16_t SP_ReadWord(uint32_t address); 00105 00114 uint8_t SP_ReadCalibrationByte(uint8_t index); 00115 00124 uint8_t SP_ReadFuseByte(uint8_t index); 00125 00134 void SP_WriteLockBits(uint8_t data); 00135 00142 uint8_t SP_ReadLockBits(void); 00143 00152 uint8_t SP_ReadUserSignatureByte(uint16_t index); 00153 00158 void SP_EraseUserSignatureRow(void); 00159 00164 void SP_WriteUserSignatureRow(void); 00165 00173 void SP_EraseApplicationSection(void); 00174 00181 void SP_EraseApplicationPage(uint32_t address); 00182 00190 void SP_EraseWriteApplicationPage(uint32_t address); 00191 00201 void SP_WriteApplicationPage(uint32_t address); 00202 00210 void SP_LoadFlashWord(uint16_t address, uint16_t data); 00211 00221 void SP_LoadFlashPage(const uint8_t * data); 00222 00230 void SP_ReadFlashPage(const uint8_t * data, uint32_t address); 00231 00236 void SP_EraseFlashBuffer(void); 00237 00244 void SP_EraseBootPage(uint32_t address); 00245 00253 void SP_EraseWriteBootPage(uint32_t address); 00254 00264 void SP_WriteBootPage(uint32_t address); 00265 00270 uint32_t SP_ApplicationCRC(void); 00271 00276 uint32_t SP_BootCRC(void); 00277 00285 uint32_t SP_FlashRangeCRC(uint32_t StartByteAddress, uint32_t EndByteAddress); 00286 00292 void SP_LockSPM(void); 00293 00298 void SP_WaitForSPM(void); 00299 00300 #endif /* SP_DRIVER_H */
Generated on Fri Mar 27 14:05:25 2009 for AVR1605: XMEGA BOOTLOADER by ![]() |