zephyr/soc/arm/nxp_kinetis/flash_configuration.c
Maureen Helm f646f8d0cf soc: nxp_kinetis: Refactor flash configuration field to a common place
Refactors the kinetis flash configuration field so it can be shared
across all kinetis SoCs. Defaults are overridden for the k8x and ke1xf
series to preserve values used prior to this refactoring.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-09-13 13:58:46 -05:00

34 lines
895 B
C

/*
* Copyright (c) 2019, NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <kernel.h>
#include <linker/sections.h>
u8_t __kinetis_flash_config_section __kinetis_flash_config[] = {
/* Backdoor Comparison Key (unused) */
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
/* Program flash protection; 1 bit/region - 0=protected, 1=unprotected
*/
0xFF, 0xFF, 0xFF, 0xFF,
/* Flash security register (FSEC) enables/disables backdoor key access,
* mass erase, factory access, and flash security
*/
CONFIG_KINETIS_FLASH_CONFIG_FSEC,
/* Flash nonvolatile option register (FOPT) enables/disables NMI,
* EzPort, and boot options
*/
CONFIG_KINETIS_FLASH_CONFIG_FOPT,
/* EEPROM protection register (FEPROT) for FlexNVM devices */
CONFIG_KINETIS_FLASH_CONFIG_FEPROT,
/* Data flash protection register (FDPROT) for FlexNVM devices */
CONFIG_KINETIS_FLASH_CONFIG_FDPROT,
};