MDK-ARM Keil, MDK-ARM Datasheet - Page 59

KIT REALVIEW MCU DEVELOPMENT

MDK-ARM

Manufacturer Part Number
MDK-ARM
Description
KIT REALVIEW MCU DEVELOPMENT
Manufacturer
Keil
Type
Compiler and IDEr
Datasheets

Specifications of MDK-ARM

For Use With/related Products
ARM MCUs
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Getting Started: Building Applications with RL-ARM
provide some extra code to manage the Flash page size. Typically, this code has
to read the current data stored in the Flash page, concatenate this with the new
data stored in the file system buffer, and then write the updated page to the Flash
memory. The code below can be used as a starting point for such a device.
#define PAGE_SZ 1024
U32 Page [PAGE_SZ/4];
int fs_ProgramPage (U32 adr, U32 sz, U8 *buf)
}
In addition to the programming algorithms, you will need to define the Flash
sector definitions in
The file
algorithms, so you can use this as a basis for the
you can modify an existing
conform to the format described above.
If you are using the internal microcontroller Flash memory, you should locate the
file system into a region where there are multiple small sectors, as this will
reduce the amount of erasing and buffering required. Also, since the RL-Flash
file system does not support wear leveling, you must bear in mind an estimated
number of writes to the file system over the life time of the final product.
Typically, microcontroller Flash memory is rated at 100K write cycles. If you
are likely to exceed this, you should consider using an SD/MMC card since these
formats support wear leveling in hardware.
unsigned long i;
for (i = 0; i < ((sz+1)/2); i++)
}
return (0);
M16 (adr & ~3) = CMD_PRGS;
M16 (adr) = *((__packed unsigned short *) buf); // Write 2 byte data
if (WaitWithStatus(adr & ~3) & (PS | SP))
buf += 2;
adr += 2;
return (1);
FlashDev.c
contains the sector definitions for the ULINK programming
FS_FlashDev.h
FS_FlashDev.h
.
{
file. Either way the
// Write Program Set-up Command
FS_FlashDev.h
{
// Page Size
// Page Buffer
// Done successfully
// Unsuccessful
FlashDev.h
file or alternatively
file must
59

Related parts for MDK-ARM