Recommended method

This method uses a double-buffered approach to increase the speed of the operation.

  1. Split the contents of the HEX file into contiguous sections that are page aligned and 7 KB large.
  2. Write the data to 0x2000001C + offset, where the offset is 0 or 0xE000.
  3. Write the following:
  4. Write 1 to 0x4002A004 to start the IPC transaction.
    If this was the last page of the HEX file, skip the next step.
  5. Write the next chunk of data to 0x2000001C + offset, where the offset is not the same value as the one used previously.
  6. Poll IPC.MODEM_CTRL_EVENT.
  7. Write 0 to the event registers (0x4002A100, 0x4002A108, and 0x4002A110) to acknowledge the event.
  8. Go back to Step 4 until all pages have been programmed.
  9. Go back to Step 2 until all files have been programmed.