| ||||||||
Technical Support On-Line Manuals ULINK2 User's Guide | Creating New AlgorithmsµVision allows creating Flash programming algorithms for unsupported devices. The algorithm source code is implemented as a µVision project with special compiler and linker settings. Follow these steps to create a new Flash programming algorithm:
Note
FlashPrg.cThe file FlashPrg.c contains the mandatory Flash Algorithm Functions Init, UnInit, EraseSector, and ProgramPage. Optionally, and in dependency of the device features, or to speed-up execution, the functions EraseChip, BlankCheck, and Verify can be implemented. FlashDev.cThe file FlashDev.c contains parameter definitions for:
struct FlashDevice const FlashDevice = {
FLASH_DRV_VERS, // Driver Version, do not modify!
"STM32Fxxx High-density Flash", // Device Name (512kB/384kB/256kB)
ONCHIP, // Device Type
0x08000000, // Device Start Address
0x00080000, // Device Size in Bytes (512kB)
1024, // Programming Page Size
0, // Reserved, must be 0
0xFF, // Initial Content of Erased Memory
100, // Program Page Timeout 100 mSec
500, // Erase Sector Timeout 500 mSec
// Specify Size and Address of Sectors
0x0800, 0x000000, // Sector Size 2kB (256 Sectors)
SECTOR_END
};
Testing AlgorithmsThe \KEIL\ARM\FLASH\_Template\Test\ folder contains a project that shows how to test a new Flash Programming Algorithm on behalf of an STM32 device. | |||||||
| ||||||||