User manual

UM0036 Program
Doc ID 7705 Rev 11 327/385
ICP mode with Option Bytes Disabled is a safe programming mode that allows you to
start your MCU while ignoring the current option byte values. This is to avoid start-up
failures that result from option byte settings that are not compatible with the application
configuration. For example, you can use it when the clock on your application board doesn't
match the oscillator type specified by the MCU's option byte.
To use this mode you must connect your MCU to either the ICCOSC clock signal from the
ICC connector, or a clock signal from your application board that has a square wave form
between 0V and VDD. For more information about these connections, refer to the user
manual for your programming hardware.
When using ICP mode or ICP mode with Option Bytes Enabled, the MCU’s option byte
settings are taken into account upon startup. Use this programming mode if your MCU has
the factory default settings, and if you are certain that the clock source on your application
board matches the oscillator type specified by the MCU's option bytes.
In this mode, the ICCOSC clock from the ICC connector is not required.
Protections
Some devices allow you to protect specific values that may already be loaded in a register in
your MCU’s memory when programming. These types of values are specific to one of your
MCU’s features, such as RC calibration values. If your MCU supports a feature with that can
be protected, a protection option will appear the Protections field. You can enable the
option by clicking to place a checkmark in the box next to it.
RC Calibration values
Some microcontrollers store values for calibrating the internal RC oscillator in the RC
Control Register. To avoid erasing these values, the option “Protect RC calibration values in
Program Memory/Data Memory” appears in the Protections field.
Caution: Any program or data in the memory are lost when Read Out Protection is disabled.
Restoring the default RC calibration values in the microcontroller’s Data and Program
memory can be done by enabling and disabling Read Out Protection. If Read Out Protection
is already disabled, set it to ON in the option byte settings and program the option byte.
Then set Read Out Protection back to OFF and reprogram the option byte. The default RC
calibration values are written to the appropriate addresses in Program and Data memory.
Refer to your microcontroller’s datasheet for the default values and addresses.
Erase before programming option
This option is only available when programming Flash devices. If you check this box, the
programmer will erase the memory areas that you have identified for programming, before
starting the programming sequence. When you erase the Flash device, the memory area
being erased is set to FFh.
Note: For information about selecting memory areas for programming, refer to Section 11.2:
Assigning files to memory areas.
If you enable this option, Erase replaces the Blank Check step in the programming
sequence (see Section 11.4: Starting the programming sequence). In this case, the Blank
Check is not performed.