| Electronic Components Datasheet Search |
|
AN1576 Datasheet(PDF) 2 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1576 Datasheet(HTML) 2 Page - STMicroelectronics |
|
2 / 15 page ![]() 2/15 XFLASH DRIVER 1 XFLASH DRIVER The XFlash driver is a software which can be compiled using either C-Metrowerks or C- COSMIC and supports all memory models. The driver is composed of 2 files: XFlash.c and XFlash.h to be included in the project. It pro- vides RASS_Disable, and XFlashWriteBlock functions. No Sector Erase function is provided, since it can be emulated by writing 0xFF in a memory block. The driver code is approximately 256 bytes in size, this may vary slightly depending on the compilation. 1.1 DRIVER FUNCTIONS 1.1.1 RASS_Disable void RASS_Disable(unsigned char key1,unsigned char key2) This function disables the RASS protection to allow write access to XFLASH sectors 1 & 2, if the two user variables key1 and key2 have the correct values: 0x56 and 0xAE. To increase the reliability of the system, the software sequence which writes the hardware keys should not be stored in the program memory. Both hardware keys must always be loaded externally (via I/O ports, SCI, etc...). This security feature prevents any wrongful ac- cess after a program counter corruption. 1.1.2 XFlashWriteBlock unsigned char XFlashWriteBlock ( unsigned char *Buffer, unsigned int Flash, unsigned char ByteNb ) This function performs write operations with the following parameters: – Buffer points to the start address of the new data to be programmed – Flash points to the XFLASH start address area where the new data is to be programmed – ByteNb is the number of bytes to be programmed The ByteNb can take a value of up to 256 even though the XFLASH itself is programmed in rows of 32 bytes max: The XFLASH driver handles the iterative loops automatically in cases where ByteNb is greater than 32. The function returns a status: 0 means a failed operation, while a 1 means a successful oper- ation. 2 |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |