6.3. Writing to specific locations in Flash memory

Flash memory blocks are opened for access when you write to any location in Flash. Although you can load a binary to flash, you can also write to specific locations in Flash by using the Memory view.

To write to a specific location in Flash:

  1. Connect to your target.

  2. Select View → Memory from the Code window main menu to open the Memory view, if it is not already visible.

  3. Set the start address for the memory locations you want to view:

    1. Right-click in the Memory view to display the context menu.

    2. Select Set Start Address... from the context menu to open the Prompt dialog box.

    3. Enter the required start address in Flash, for example, 0x24000000.

    4. Click Set to display the Flash memory. The values are colored green to indicate that Flash memory is being displayed.

  4. Right-click in the first byte of the location that you want to change.

  5. Select Set Value... from the context menu.

  6. Enter the new value at the prompt, for example 0xA0.

  7. Click Set to confirm this value.

    The Flash device opens in preparation for writing, and the Flash Memory Control dialog box is opened, shown in Figure 6.1.

    Before you have written to Flash, you can view the Flash details if required.

  8. Make sure that the Erase Block before Write check box is selected.

  9. If it is required by your Flash device, the Clock Frequency field on the Flash Memory Control dialog box is enabled, and has the format f[Hz|kHz|MHz].

    Enter the clock frequency f as a positive floating point number, for example, 14.175MHz. The unit specifier is optional, and defaults to Hz.

  10. Click Write to write to the chosen Flash location. Monitor the changes in the Memory view as memory is updated. The Flash Log confirms the Flash operation.

  11. Click Close to close the Flash Memory Control dialog box.

See also

Copyright © 2002-2011 ARM. All rights reserved.ARM DUI 0153N
Non-ConfidentialID052111