This method uses a double-buffered approach to increase the speed of the
operation.
The modem firmware package has several HEX files. The
firmware is divided into several files named
firmware.update.image.segments.[n].hex that contain separate
segments of the firmware.
To successfully update the modem, you must program the
firmware segments in correct order.
-
Take the lowest numbered
firmware.update.image.segments.[n].hex file.
-
Split the contents of the HEX file into contiguous sections that are page
aligned and 7 KB large.
-
Write the data to 0x2000001C + offset, where the offset is 0 or
0xE000.
-
Write the following:
-
The starting address of the section to 0x20000010.
-
The length of the section to 0x20000014.
-
The offset to where the data starts to 0x20000018 (0 or 0xE000)
depending on where you wrote the data that is about to be
transferred.
-
Write 0x9 to 0x2000000C.
-
Write 1 to 0x4002A004 to start the IPC transaction.
If this was the last page of the HEX file, skip the next step.
-
Write the next chunk of data to 0x2000001C + offset, where the offset is not
the same value as the one used previously.
-
Poll IPC.MODEM_CTRL_EVENT.
-
Write 0 to the event registers (0x4002A100, 0x4002A108, and
0x4002A110) to acknowledge the event.
-
Go back to Step 4 until all pages have been programmed.
-
Go back to Step 2 until all files have been programmed.