4.4 Encapsulated instructions
Encapsulated functions are powerful and easy to use. When called then all device actions from the
beginning to the end are done automatically and final result is reported as TRUE or FALSE.
Required configuration should be set first using F_GetSetup and F_ConfigSetup functions. Also
Code file and Password File (if required) should be opened first. Encapsulated function has following
sequence:
- Power from the programming adapter becomes ON if PowerTargetEn in configuration
setup is enabled.
- Vcc is verified to be higher then 2.7V.
- JTAG/SBW or BSL communication between programming adapter and target device is
initialized. JTAG/SBW or BSL interface is selected in configuration setup in Interface.
- Selected encapsulated instruction is executed ( Autoprogram, Verify Fuse or Password,
Memory Erase etc. ).
- Communication between target device and programming adapter is terminated.
- Power from the programming adapter becomes OFF (if selected).
- Target device is released from the programming adapter.
F_AutoProgram
F_AutoProgram - Target device program with full sequence - erase, blank check,
program, verify and blow security fuse (if enabled).
VALID FPA index - ( 1 to 64 ) or 0 (ALL FPAs) executed simultaneously.
Auto Program button is the most frequently function when programming microcontrollers in
the production process. Auto Program function activates all required procedures to fully program and
verify the flash memory contents. Typically, when flash memory needs to be erased, Auto Program
executes the following procedures:
- initialization
- erase flash memory - restore retain data (including DCO constants) if enabled,
- confirm if memory has been erase,
- flash programming and verification,
- flash memory check sum verification,
- blowing the security fuse ( if flag BlowFuseEn = 3 ).
84