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
LPC2106 and IAP flash programming
Started by ●June 22, 2008
Reply by ●June 22, 20082008-06-22
--- 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
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
Reply by ●June 22, 20082008-06-22
> 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
>> 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