/*==============================================================================================*/ /* Project = Selfprogramming library for 78K0R/Ix3/Kx3-L Single Voltage SST (MF2) Flash */ /* Module = fsl_user.h */ /* Version = V1.01 */ /* Date = 28.03.2008 11:45:55 */ /*==============================================================================================*/ /* COPYRIGHT */ /*==============================================================================================*/ /* Copyright (c) 2007 by NEC Electronics (Europe) GmbH, */ /* a company of the NEC Electronics Corporation */ /*==============================================================================================*/ /* Purpose: */ /* user configurable constant/macros of the selfprogramming library */ /* */ /*==============================================================================================*/ /* */ /* Warranty Disclaimer */ /* */ /* Because the Product(s) is licensed free of charge, there is no warranty of any kind */ /* whatsoever and expressly disclaimed and excluded by NEC, either expressed or implied, */ /* including but not limited to those for non-infringement of intellectual property, */ /* merchantability and/or fitness for the particular purpose. NEC shall not have any obligation */ /* to maintain, service or provide bug fixes for the supplied Product(s) and/or the Application.*/ /* */ /* Each User is solely responsible for determining the appropriateness of using the Product(s) */ /* and assumes all risks associated with its exercise of rights under this Agreement, */ /* including, but not limited to the risks and costs of program errors, compliance with */ /* applicable laws, damage to or loss of data, programs or equipment, and unavailability or */ /* interruption of operations. */ /* */ /* Limitation of Liability */ /* */ /* In no event shall NEC be liable to the User for any incidental, consequential, indirect, */ /* or punitive damage (including but not limited to lost profits) regardless of whether */ /* such liability is based on breach of contract, tort, strict liability, breach of warranties, */ /* failure of essential purpose or otherwise and even if advised of the possibility of */ /* such damages. NEC shall not be liable for any services or products provided by third party */ /* vendors, developers or consultants identified or referred to the User by NEC in connection */ /* with the Product(s) and/or the Application. */ /* */ /*==============================================================================================*/ /* Environment: PM plus (V6.30) */ /* RA78K0(V1.20) */ /* CC78K0(V2.00) */ /*==============================================================================================*/ #ifndef __FSL_USER_H_INCLUDED #define __FSL_USER_H_INCLUDED /*==============================================================================================*/ /* constant definitions */ /*==============================================================================================*/ /* specify the CPU frequency in [Hz], only 2MHz....20MHz allowed */ #define FSL_SYSTEM_FREQUENCY 8000000 /* define whether low-voltage mode is used or not */ /* #define FSL_LOW_VOLTAGE_MODE */ /* size of the common data buffer expressed in [bytes] */ /* the data buffer is used for data-exchange between the firmware and the selflib. */ //#define FSL_DATA_BUFFER_SIZE 256 #define FSL_DATA_BUFFER_SIZE 0 /* customizable interrupt controller configuration during selfprogramming period */ /* Bit --7-------6-------5-------4-------3-------2-------1-------0---------------------- */ /* MK0L: PMK5 PMK4 PMK3 PMK2 PMK1 PMK0 LVIMK WDTIMK */ /* MK0H: SREMK0 SRMK0* STMK0* DMAMK1 DMAMK0 SREMK3 SRMK3 STMK3 */ /* MK1L: TMMK03 TMMK02 TMMK01 TMMK00 IICMK0 SREMK1 SRMK1 STMK1* */ /* MK1H: TMMK04 SREMK2 SRMK2 STMK2* KRMK RTCIMK RTCMK ADMK */ /* MK2L: PMK10 PMK9 PMK8 PMK7 PMK6 TMMK07 TMMK06 TMMK05 */ /* MK2H: 1 1 1 1 1 1 1 PMK11 */ /*------------------------------------------------------------------------------------------ */ /* */ /* Examples: */ /* ========= */ /*#define FSL_MK0L_MASK 0xF7 -> allow INTP1 interrupt during selfprogramming */ /*#define FSL_MK0H_MASK 0xEF -> allow DMA1 interrupt during selfprogramming */ /*#define FSL_MK1L_MASK 0xBF -> allow TM02 interrupt during selfprogramming */ /*#define FSL_MK1H_MASK 0xFF -> all interrupts disabled during selfprogramming */ /*#define FSL_MK2L_MASK 0xF7 -> allow INTP6 interrupt during selfprogramming */ /*#define FSL_MK2H_MASK 0xFF -> all interrupts disabled during selfprogramming */ /*------------------------------------------------------------------------------------------ */ #define FSL_MK0L_MASK 0xFF /* all interrupts disabled during selfprogramming */ #define FSL_MK0H_MASK 0xFF /* all interrupts disabled during selfprogramming */ #define FSL_MK1L_MASK 0xFF /* all interrupts disabled during selfprogramming */ #define FSL_MK1H_MASK 0xFF /* all interrupts disabled during selfprogramming */ #define FSL_MK2L_MASK 0xFF /* all interrupts disabled during selfprogramming */ #define FSL_MK2H_MASK 0xFF /* all interrupts disabled during selfprogramming */ /* FLMD0 control bit */ #ifndef _WIN32 #define FSL_FLMD0_HIGH {BECTL.7 = 1;} #define FSL_FLMD0_LOW {BECTL.7 = 0;} #else #define FSL_FLMD0_HIGH {BECTL_7 = 1;} #define FSL_FLMD0_LOW {BECTL_7 = 0;} #endif /*----------------------------------------------------------------------------------------------*/ /* switch interrupt backu functionality ON/OFF using #define/#undef */ /*----------------------------------------------------------------------------------------------*/ /* #define FSL_INT_BACKUP */ #undef FSL_INT_BACKUP #endif