Xmega Application Note


sp_driver.h

Go to the documentation of this file.
00001 /* This file has been prepared for Doxygen automatic documentation generation.*/
00062 #ifndef SP_DRIVER_H
00063 #define SP_DRIVER_H
00064 
00065 #include "avr_compiler.h"
00066 
00067 /* Define the size of the flash page if not defined in the header files. */
00068 #ifndef FLASH_PAGE_SIZE
00069         #define FLASH_PAGE_SIZE 512
00070 #endif /*FLASH_PAGE_SIZE*/
00071 
00072 /* Define the Start of the application table if not defined in the header files. */
00073 #ifndef APPTABLE_SECTION_START
00074         #error  APPTABLE_SECTION_START must be defined if not defined in header files.
00075 #       //#define APPTABLE_SECTION_START 0x01E000 //APPTABLE address for ATxmega128A1
00076 #endif /*APPTABLE_SECTION_START*/
00077 
00089 uint8_t SP_ReadByte(uint32_t address);
00090 
00102 uint16_t SP_ReadWord(uint32_t address);
00103 
00112 uint8_t SP_ReadCalibrationByte(uint8_t index);
00113 
00122 uint8_t SP_ReadFuseByte(uint8_t index);
00123 
00132 void SP_WriteLockBits(uint8_t data);
00133 
00140 uint8_t SP_ReadLockBits(void);
00141 
00150 uint8_t SP_ReadUserSignatureByte(uint16_t index);
00151 
00156 void SP_EraseUserSignatureRow(void);
00157 
00162 void SP_WriteUserSignatureRow(void);
00163 
00171 void SP_EraseApplicationSections(void);
00172 
00179 void SP_EraseApplicationPage(uint32_t address);
00180 
00188 void SP_EraseWriteApplicationPage(uint32_t address);
00189 
00199 void SP_WriteApplicationPage(uint32_t address);
00200 
00208 void SP_LoadFlashWord(uint32_t address, uint16_t data);
00209 
00219 void SP_LoadFlashPage(const uint8_t * data);
00220 
00228 void SP_ReadFlashPage(const uint8_t * data, uint32_t address);
00229 
00234 void SP_EraseFlashBuffer(void);
00235 
00242 void SP_EraseBootPage(uint32_t address);
00243 
00251 void SP_EraseWriteBootPage(uint32_t address);
00252 
00262 void SP_WriteBootPage(uint32_t address);
00263 
00268 uint32_t SP_ApplicationCRC(void);
00269 
00274 uint32_t SP_BootCRC(void);
00275 
00281 void SP_LockSPM(void);
00282 
00287 void SP_WaitForSPM(void);
00288 
00289 
00290 #endif /* SP_DRIVER_H */
@DOC_TITLE@
Generated on Wed Sep 2 10:55:21 2009 for AVR1008: Writing EEPROM and Flash in ATxmega256A3 / ATxmega256A3B - Rev B by doxygen 1.5.9