Thomas
The FTFA_FOPT register is loaded with the value in Flash at location 0x40c at reset.
Thereforefore you control the setting with the const values in the Flash configration area (0x400..0x40f).
// Flash configuration - this is linked at address 0x00000400 (when working with standalone-build)
//
const KINETIS_FLASH_CONFIGURATION __attribute__((section(".f_config"))) __flash_config
= {
KINETIS_FLASH_CONFIGURATION_BACKDOOR_KEY,
KINETIS_FLASH_CONFIGURATION_PROGRAM_PROTECTION,
KINETIS_FLASH_CONFIGURATION_SECURITY,
KINETIS_FLASH_CONFIGURATION_NONVOL_OPTION,
KINETIS_FLASH_CONFIGURATION_EEPROM_PROT,
KINETIS_FLASH_CONFIGURATION_DATAFLASH_PROT
};Eg.
#define KINETIS_FLASH_CONFIGURATION_NONVOL_OPTION (FTFL_FOPT_EZPORT_ENABLED | FTFL_FOPT_LPBOOT_NORMAL | FTFL_FOPT_NMI_DISABLED)
Regards
Mark
Kinetis: http://www.utasker.com/kinetis.html
KL03: http://www.utasker.com/kinetis/FRDM-KL03Z.html
For the complete "out-of-the-box" Kinetis experience and faster time to market