I am writing to flash memory of LPC2136. Do I need to erase the segment before writing Because i wrote garbage when i write to Flash after doing segment preparation only. every thing fine If i do in following way 1.)prepare the segments 2.)erase the segments 3.)prepare the segments 4.)write to segments Is there any thing wrong or this the only method to write to flash. my worries is whether each time do i need to erase 32kb segment to write. so i need a copy of this 32kb in the ram. Regards murale
Here is what the documentation says about an IAP command Copy RAM to Flash (from LPC213x user manual): 1. Param 0 (DST) - destination Flash address should be on a 256 byte boundary 2. Param 1 (SRC) - source RAM address should be a word boundary (means 32-bit aligned) 3. Param 2 - number of bytes written should be 256 | 512 | 1024 | 2048 | 4096 4. Param 3 (CLK) - system clock Frequency in KHz. As you see you still need to obey the above rules or you will have problems using IAP Flash programming. Franc
Thank you very much Franc Urbanc Best Regards Murale