/***********************************************************************************************************************
 * This file was generated by the MCUXpresso Config Tools. Any manual edits made to this file
 * will be overwritten if the respective MCUXpresso Config Tools is used to update this file.
 **********************************************************************************************************************/

/*
 * Copyright 2020 NXP
 * All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#ifndef _FLASH_CONFIG_H_
#define _FLASH_CONFIG_H_

/******************* Bootloader Configuration Area ************************/

#define BCA_CRC_START_ADDRESS 0xFFFFFFFFU
#define BCA_CRC_BYTE_COUNTS 0xFFFFFFFFU
#define BCA_CRC_EXPECTED_VALUE 0xFFFFFFFFU

/*
 * BCA_ENABLED_PERIPHERALS
 *   Bit[1]: LPI2C. 0b1 = enable, 0b0 = disable.
 *   Bit[0]: QSCI/UART. 0b1 = enable, 0b0 = disable.
 */
#define BCA_ENABLED_PERIPHERALS 0xFFU

/*
 * If BCA_I2C_SLAVE_ADDRESS = 0xFF, the I2C addr = 0x10,
 * otherwise use the BCA_I2C_SLAVE_ADDRESS[6:0] as I2C slave addr.
 */
#define BCA_I2C_SLAVE_ADDRESS 0xFFU

/*
 * If BCA_PERIPHERAL_DETECTION_TIMEOUT = 0xFFFF, the timeout = 5000ms.
 * otherwise timeout = BCA_PERIPHERAL_DETECTION_TIMEOUT in unit ms.
 */
#define BCA_PERIPHERAL_DETECTION_TIMEOUT 0xFFFFU

/*
 * If BCA_DIRECT_BOOT_FLAG = 0xFE, means direct boot,
 * otherwise not direct boot.
 */
#define BCA_DIRECT_BOOT_FLAG 0xFFU

/************************** Flash configuration field *********************/

#define FCF_BACKDOOR_KEY0 0xFFU
#define FCF_BACKDOOR_KEY1 0xFFU
#define FCF_BACKDOOR_KEY2 0xFFU
#define FCF_BACKDOOR_KEY3 0xFFU
#define FCF_BACKDOOR_KEY4 0xFFU
#define FCF_BACKDOOR_KEY5 0xFFU
#define FCF_BACKDOOR_KEY6 0xFFU
#define FCF_BACKDOOR_KEY7 0xFFU
#define FCF_FLASH_PROTECTION_BYTE0 0xFFU
#define FCF_FLASH_PROTECTION_BYTE1 0xFFU
#define FCF_FLASH_PROTECTION_BYTE2 0xFFU
#define FCF_FLASH_PROTECTION_BYTE3 0xFFU

/*
 * FCF_FLASH_SECURE_BYTE
 *   Bit[7:6]: KEYEN, Backdoor Key Security Enable. 0b10 = enable, others = disable.
 *   Bit[5:4]: MEEN, Mass Erase Enable Bits. 0b10 = disable, others = enable.
 *   Bit[3:2]: FSLACC, Factory Security Level Access Code. 0b00 or 0b11 = granted, others = denied.
 *   Bit[1:0]: SEC, Flash Security. 0b10 = unsecure, others = secure.
 */
#define FCF_FLASH_SECURE_BYTE 0x7EU

/*
 * FCF_FLASH_OPTION_BYTE
 *   Bit[7:6]: BOOTOPT, Boot options combined with SIM_BOOT_MODE_OVERRIDE[BOOT_OVERRIDE].
 *             When power on reset, 0b11 = boot from ROM, others = boot from flash.
 *   Bit[0]:   PowerMode. 0b1 = writing SIM_PWRMODE register takes effect, writing SIM_PWR register doesn't take effect.
 *                        0b0 = writing SIM_PWRMODE register doesn't take effect, writing SIM_PWR register takes effect.
 */
#define FCF_FLASH_OPTION_BYTE 0x3FU

#endif /* _FLASH_CONFIG_H_*/
