6. Memory Options Dialog Screen


The Memory Options dialog screen selected by choosing the Setup→Memory Options option (shown in Figure 6.1) has several settings panels and one information panel. These settings allow the user to specify memory segments for erase, write, verify and read operations. The user can also choose to retain data in flash memory between successive "Auto Program" and "Erase" operations and choose the type of write verification. The information panel lists details of the selected MCU, such as the address range for non-volatile registers, internal flash, external flash, and RAM size.

Figure 6.1: Control how memory will be modified using this dialog window.

 

6.1 Memory Erase, Write, and Verify Address Range


The "AUTO PROG.", "ERASE FLASH", "WRITE FLASH", and "VERIFY FLASH" operations used in the main dialog screen (shown in Figure 4.1) use addresses specified in this dialog screen. This settings panel has seven options available and several checkboxes that modify the default behavior of some functions:

  • “Erase whole memory if the MCU is locked” - When this checkbox is selected the "AUTO PROG." operation will attempt to unlock the target device using the "Clear Locked Device" recovery procedure:

    • if the programmer fails to read the MCU part ID or,

    • if the erase and blank check procedures fail to clear flash before programming.

  • “Do not erase if blank” - During the "AUTO PROG." operation a quick checksum is calculated for flash pages that encompass the target area for programming. If this checkbox is selected, a flash page that is empty will not be erased during the “AUTO PROG.” procedure. This can save time for some MCUs where erase time is long.

  1. “Update only” - When this option is selected the "AUTO PROG." operation will not erase memory contents. Instead, contents of code data taken from the code file will only be programmed to flash memory. This option is useful when a relatively small amount of data, such as calibration data, needs to be added to flash memory. Other address ranges should not be included in the code file, meaning that the code file should contain ONLY the data which is to be programmed to flash memory. For example, if the code file contains data as shown in TI *.txt format:

    @1008
    25 CA 80 40 39 E3 F8 02
    @2200
    48 35 59 72 AC B8
    Q

    Then 8 bytes of data will be written to location 0x1008 and 6 bytes of data will be written to location 0x2200. The specified addresses should be blank before writing (contain a value of 0xFF or 0x00 depending on MCU family). Before the writing operation is actually performed, the programmer will automatically verify if this part of memory is blank and will only proceed to program the device if verification is successful.

  2. “Flash Memory only” - All internal flash memory will be erased and programmed. Contents of OTP/INFO/EEPROM and external flash will be ignored.

  3. “Used by Code File” - When selected, only main flash, external flash, and OTP/INFO/EEPROM segments specified in the code file will be programmed. Other flash memory segments are not modified, unless the MCU only supports a mass erase procedure and does not have page erase functionality.

  4. “User Defined” - This option is similar to the “Used by Code File” option, but when this option is selected then on the right side of the memory selection area check boxes and address edit boxes will be enabled. The check boxes allow the user to select memory segments to be enabled (erased, programmed, and verified), and these include internal flash memory, OTP/INFO/EEPROM, and external flash. Edit boxes allow the user to specify the main memory address range (start and stop addresses). The start address should specify the first byte in the segment, and the stop address should specify the last byte in the segment (inclusive: both first and last byte specified are programmed). The start and stop addresses will automatically be rounded to match the minimum write granularity for the selected MCU.

  5. “External Flash only” - Only external flash memory specified in the “EFlash” section in the Main GUI will be erased and programmed. This option can only be used on the XStreamPro-Iso adapter (X2S), and the external flash configuration has to be configured first.

  6. “OTP/INFO/EEPROM” - If the selected MCU contains OTP memory, INFO segments, or EEPROM then it will be programmed. In some cases this memory cannot be erased, or can only be erased with the “Clear Locked Device” procedure that initiates a factory erase.

    • “Force Erase EEPROM” - If there is EEPROM on the selected MCU, then during any erase procedure involving EEPROM memory it will be pre-written with empty values (a value of 0xFF or 0x00 depending on MCU family).

  7. “All Memory” - The most frequently used option during programming. All memory is erased before programming, and all contents from the code file are downloaded to the target MCU’s internal flash memory, OTP/INFO/EEPROM, and external flash.

6.2 Read Address Range


The Read Address Range group (see Figure 6.1) specifies the address range used when the "READ / COPY" operation is used. Memory read setup has five options available:

  1. “Flash Memory Only” - Only internal flash will be read.

  2. “User Defined” - When this option is selected then on the right side of the memory selection area check boxes and address edit boxes will be enabled. The check boxes allow the user to select memory segments to be read and these include internal flash memory, OTP/INFO/EEPROM, and external flash. Edit boxes allow the user to specify the main memory address range (start and stop addresses). The start address should specify the first byte in the segment, and the stop address should specify the last byte in the segment (inclusive: both first and last byte specified will be read).

  3. “External Flash only” - Only external flash memory specified in the “EFlash” section in the Main GUI will be read. This option can only be used on the XStreamPro-Iso adapter (X2S), and the external flash configuration has to be configured first.

  4. “OTP/INFO/EEPROM” - If the selected MCU contains OTP memory, INFO segments, or EEPROM then it will be read.

  5. “All Memory” - All memory will be read from the selected MCU, including internal flash memory, OTP/INFO/EEPROM, external flash, and any security/option bytes that can only be programmed with the Lock Device procedure.


The meaning of each option is the same as for the Memory Erase, Write, and Verify settings.

6.3 Retain Data in Flash (Auto Program and Erase)


This feature allows the programmer to preserve flash contents between successive programming and erase operations. By specifying the start and end addresses (inclusively), the selected bytes will be first read and then copied to an internal buffer before the selected flash memory is erased. After the memory segment coinciding to this region has been erased, the internal buffer will be used to program this segment of flash memory to its previous values. OTP/INFO/EEPROM addresses cannot be entered in this section.

6.4 Write Verification


Verification setup allows the user to select one of three write verification methods and one checkbox that modified the programming of option/security bytes:

  1. None” - No verification will be performed after programming.

  2. “Fast Verification” - Each byte is verified after being written, and at the end of the process a check sum is calculated based on current flash memory and compared to the calculated check sum taken from the code file.

  3. “Standard Verification” - Includes Fast Verification as well as reading the contents of the entire flash after programming to compare them against the code file. If they are the same, then verification is successful. Typically, the standard verification procedure requires the same amount of time as the read/write procedure.

  • “Verify Protection in Lock Device Procedure” - During the “AUTO PROG.” or Lock Device procedure if the Memory Protection Enable checkbox is enabled in the Main GUI then option/security bytes will be programmed. Normally option bytes are verified using direct readback and byte-by-byte comparison. This this checkbox is disabled, then option bytes will only be written and not verified. This can be useful if option byte verification requires a power-cycle, and an external power supply is used.

6.5 About Microcontroller

This information panel lists metadata about the selected MCU, such as its part number, internal flash size, OTP/INFO size, EEPROM size, and external flash size. External flash size is reconfigurable depending on the connected SPI memory in the “EFlash” section in the Main GUI (only usable with the XStreamPro-Iso adapter (X2S)).