EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

LPC2106 and IAP flash programming

Started by Unknown June 22, 2008
Hello everyone!
I using Olimex LPC2106-MT board and has a three questions:

1. How to determine address in flash memomry to write data?
2. Possible to read flash memomry:
unsigned int addr, data;
data = *(volatile unsigned int *)addr;
3. Possible to write flash memomry:
unsigned int addr, data;
*(volatile unsigned int *)addr = data;

--
Best regards,
post-graduate student
Roman Antoshchenkov
Kharkiv Technikal University of Agriculture
Ukraine
mailto:d...@rambler.ru

An Engineer's Guide to the LPC2100 Series

--- In l...,
wrote:
>
> Hello everyone!
> I using Olimex LPC2106-MT board and has a three questions:
>
> 1. How to determine address in flash memomry to write data?

Consult your memory map/section/placement file to find out what's where.

> 2. Possible to read flash memomry:
> unsigned int addr, data;
> data = *(volatile unsigned int *)addr;

Of course - that's what the processor does to fetch instructions and
read-only data, (assuming you mean the memory-mapped flash on LPC chips).

> 3. Possible to write flash memomry:
> unsigned int addr, data;
> *(volatile unsigned int *)addr = data;

No. Google for 'writing to flash' and search this group for 'IAP'.

Rgds,
Martin

> Consult your memory map/section/placement file to find out what's where.

>> 2. Possible to read flash memomry:
>> unsigned int addr, data;
>> data = *(volatile unsigned int *)addr;

> Of course - that's what the processor does to fetch instructions and
> read-only data, (assuming you mean the memory-mapped flash on LPC chips).

>> 3. Possible to write flash memomry:
>> unsigned int addr, data;
>> *(volatile unsigned int *)addr = data;

> No. Google for 'writing to flash' and search this group for 'IAP'.

> Rgds,
> Martin

Thanks a lot, Martin!

I try to write and read following code after swithed off power:

__no_init data flash_data;

flash_data++;

It work fine

--
Best regards,
post-graduate student
Roman Antoshchenkov
Kharkiv Technikal University of Agriculture
Ukraine
mailto:d...@rambler.ru

The 2024 Embedded Online Conference