Change LPC54608 to LPC546XX to include support for LPC54608/18/28

Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
pull/5268/head
Mahadevan Mahesh 2017-09-20 14:22:56 -05:00 committed by adbridge
parent fc41c055f9
commit 95b6acd095
114 changed files with 184 additions and 144 deletions

View File

@ -45,11 +45,11 @@
/* TEXT BELOW IS USED AS SETTING FOR THE CLOCKS TOOL *****************************
!!ClocksProfile
product: Clocks v1.0
processor: LPC54608J512
package_id: LPC54608J512ET180
processor: LPC54618J512
package_id: LPC54618J512ET180
mcu_data: ksdk2_0
processor_version: 0.0.0
board: LPCXpresso54608
board: LPCXpresso54618
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR THE CLOCKS TOOL **/
#include "fsl_power.h"

View File

@ -1,7 +1,7 @@
/*
** ###################################################################
** Processors: LPC54608J512BD208
** LPC54608J512ET180
** Processors: LPC54618J512BD208
** LPC54618J512ET180
**
** Compilers: Keil ARM C/C++ Compiler
** GNU C Compiler
@ -13,7 +13,7 @@
** Build: b170214
**
** Abstract:
** CMSIS Peripheral Access Layer for LPC54608
** CMSIS Peripheral Access Layer for LPC54618
**
** Copyright 1997-2016 Freescale Semiconductor, Inc.
** Copyright 2016-2017 NXP
@ -56,16 +56,16 @@
*/
/*!
* @file LPC54608.h
* @file LPC54618.h
* @version 1.1
* @date 2016-11-25
* @brief CMSIS Peripheral Access Layer for LPC54608
* @brief CMSIS Peripheral Access Layer for LPC54618
*
* CMSIS Peripheral Access Layer for LPC54608
* CMSIS Peripheral Access Layer for LPC54618
*/
#ifndef _LPC54608_H_
#define _LPC54608_H_ /**< Symbol preventing repeated inclusion */
#ifndef _LPC54618_H_
#define _LPC54618_H_ /**< Symbol preventing repeated inclusion */
/** Memory map major version (memory maps with equal major version number are
* compatible) */
@ -181,7 +181,7 @@ typedef enum IRQn {
#define __FPU_PRESENT 1 /**< Defines if an FPU is present or not */
#include "core_cm4.h" /* Core Peripheral Access Layer */
#include "system_LPC54608.h" /* Device specific configuration file */
#include "system_LPC54618.h" /* Device specific configuration file */
/*!
* @}
@ -713,7 +713,8 @@ typedef struct {
/** CAN - Register Layout Typedef */
typedef struct {
uint8_t RESERVED_0[16];
uint8_t RESERVED_0[12];
__IO uint32_t DBTP; /**< Data Bit Timing Prescaler Register, offset: 0xC */
__IO uint32_t TEST; /**< Test Register, offset: 0x10 */
uint8_t RESERVED_1[4];
__IO uint32_t CCCR; /**< CC Control Register, offset: 0x18 */
@ -779,6 +780,23 @@ typedef struct {
* @{
*/
/*! @name DBTP - Data Bit Timing Prescaler Register */
#define CAN_DBTP_DSJW_MASK (0xFU)
#define CAN_DBTP_DSJW_SHIFT (0U)
#define CAN_DBTP_DSJW(x) (((uint32_t)(((uint32_t)(x)) << CAN_DBTP_DSJW_SHIFT)) & CAN_DBTP_DSJW_MASK)
#define CAN_DBTP_DTSEG2_MASK (0xF0U)
#define CAN_DBTP_DTSEG2_SHIFT (4U)
#define CAN_DBTP_DTSEG2(x) (((uint32_t)(((uint32_t)(x)) << CAN_DBTP_DTSEG2_SHIFT)) & CAN_DBTP_DTSEG2_MASK)
#define CAN_DBTP_DTSEG1_MASK (0x1F00U)
#define CAN_DBTP_DTSEG1_SHIFT (8U)
#define CAN_DBTP_DTSEG1(x) (((uint32_t)(((uint32_t)(x)) << CAN_DBTP_DTSEG1_SHIFT)) & CAN_DBTP_DTSEG1_MASK)
#define CAN_DBTP_DBRP_MASK (0x1F0000U)
#define CAN_DBTP_DBRP_SHIFT (16U)
#define CAN_DBTP_DBRP(x) (((uint32_t)(((uint32_t)(x)) << CAN_DBTP_DBRP_SHIFT)) & CAN_DBTP_DBRP_MASK)
#define CAN_DBTP_TDC_MASK (0x800000U)
#define CAN_DBTP_TDC_SHIFT (23U)
#define CAN_DBTP_TDC(x) (((uint32_t)(((uint32_t)(x)) << CAN_DBTP_TDC_SHIFT)) & CAN_DBTP_TDC_MASK)
/*! @name TEST - Test Register */
#define CAN_TEST_LBCK_MASK (0x10U)
#define CAN_TEST_LBCK_SHIFT (4U)
@ -815,6 +833,12 @@ typedef struct {
#define CAN_CCCR_TEST_MASK (0x80U)
#define CAN_CCCR_TEST_SHIFT (7U)
#define CAN_CCCR_TEST(x) (((uint32_t)(((uint32_t)(x)) << CAN_CCCR_TEST_SHIFT)) & CAN_CCCR_TEST_MASK)
#define CAN_CCCR_FDOE_MASK (0x100U)
#define CAN_CCCR_FDOE_SHIFT (8U)
#define CAN_CCCR_FDOE(x) (((uint32_t)(((uint32_t)(x)) << CAN_CCCR_FDOE_SHIFT)) & CAN_CCCR_FDOE_MASK)
#define CAN_CCCR_BRSE_MASK (0x200U)
#define CAN_CCCR_BRSE_SHIFT (9U)
#define CAN_CCCR_BRSE(x) (((uint32_t)(((uint32_t)(x)) << CAN_CCCR_BRSE_SHIFT)) & CAN_CCCR_BRSE_MASK)
#define CAN_CCCR_PXHD_MASK (0x1000U)
#define CAN_CCCR_PXHD_SHIFT (12U)
#define CAN_CCCR_PXHD(x) (((uint32_t)(((uint32_t)(x)) << CAN_CCCR_PXHD_SHIFT)) & CAN_CCCR_PXHD_MASK)
@ -824,6 +848,9 @@ typedef struct {
#define CAN_CCCR_TXP_MASK (0x4000U)
#define CAN_CCCR_TXP_SHIFT (14U)
#define CAN_CCCR_TXP(x) (((uint32_t)(((uint32_t)(x)) << CAN_CCCR_TXP_SHIFT)) & CAN_CCCR_TXP_MASK)
#define CAN_CCCR_NISO_MASK (0x8000U)
#define CAN_CCCR_NISO_SHIFT (15U)
#define CAN_CCCR_NISO(x) (((uint32_t)(((uint32_t)(x)) << CAN_CCCR_NISO_SHIFT)) & CAN_CCCR_NISO_MASK)
/*! @name NBTP - Nominal Bit Timing and Prescaler Register */
#define CAN_NBTP_NTSEG2_MASK (0x7FU)
@ -898,6 +925,18 @@ typedef struct {
#define CAN_PSR_BO_MASK (0x80U)
#define CAN_PSR_BO_SHIFT (7U)
#define CAN_PSR_BO(x) (((uint32_t)(((uint32_t)(x)) << CAN_PSR_BO_SHIFT)) & CAN_PSR_BO_MASK)
#define CAN_PSR_DLEC_MASK (0x700U)
#define CAN_PSR_DLEC_SHIFT (8U)
#define CAN_PSR_DLEC(x) (((uint32_t)(((uint32_t)(x)) << CAN_PSR_DLEC_SHIFT)) & CAN_PSR_DLEC_MASK)
#define CAN_PSR_RESI_MASK (0x800U)
#define CAN_PSR_RESI_SHIFT (11U)
#define CAN_PSR_RESI(x) (((uint32_t)(((uint32_t)(x)) << CAN_PSR_RESI_SHIFT)) & CAN_PSR_RESI_MASK)
#define CAN_PSR_RBRS_MASK (0x1000U)
#define CAN_PSR_RBRS_SHIFT (12U)
#define CAN_PSR_RBRS(x) (((uint32_t)(((uint32_t)(x)) << CAN_PSR_RBRS_SHIFT)) & CAN_PSR_RBRS_MASK)
#define CAN_PSR_RFDF_MASK (0x2000U)
#define CAN_PSR_RFDF_SHIFT (13U)
#define CAN_PSR_RFDF(x) (((uint32_t)(((uint32_t)(x)) << CAN_PSR_RFDF_SHIFT)) & CAN_PSR_RFDF_MASK)
#define CAN_PSR_PXE_MASK (0x4000U)
#define CAN_PSR_PXE_SHIFT (14U)
#define CAN_PSR_PXE(x) (((uint32_t)(((uint32_t)(x)) << CAN_PSR_PXE_SHIFT)) & CAN_PSR_PXE_MASK)
@ -12367,5 +12406,5 @@ typedef struct {
*/ /* end of group SDK_Compatibility_Symbols */
#endif /* _LPC54608_H_ */
#endif /* _LPC54618_H_ */

View File

@ -46,8 +46,8 @@
** ###################################################################
*/
#ifndef _LPC54608_FEATURES_H_
#define _LPC54608_FEATURES_H_
#ifndef _LPC54618_FEATURES_H_
#define _LPC54618_FEATURES_H_
/* SOC module features */
@ -133,7 +133,7 @@
/* CAN module features */
/* @brief Support CANFD or not */
#define FSL_FEATURE_CAN_SUPPORT_CANFD (0)
#define FSL_FEATURE_CAN_SUPPORT_CANFD (1)
/* DMA module features */
@ -227,5 +227,5 @@
/* @brief Base address of the USB dedicated RAM */
#define FSL_FEATURE_USBHSH_USB_RAM_BASE_ADDRESS (0x40100000)
#endif /* _LPC54608_FEATURES_H_ */
#endif /* _LPC54618_FEATURES_H_ */

View File

@ -1,8 +1,8 @@
#! armcc -E
/*
** ###################################################################
** Processors: LPC54608J512BD208
** LPC54608J512ET180
** Processors: LPC54618J512BD208
** LPC54618J512ET180
**
** Compiler: Keil ARM C/C++ Compiler
** Reference manual: LPC54S60x/LPC5460x User manual Rev.0.9 7 Nov 2016

View File

@ -1,7 +1,7 @@
;/*****************************************************************************
; * @file: startup_LPC54608.s
; * @file: startup_LPC54618.s
; * @purpose: CMSIS Cortex-M4 Core Device Startup File for the
; * LPC54608
; * LPC54618
; * @version: 1.1
; * @date: 2016-11-25
; *

View File

@ -1,61 +1,28 @@
/*
** ###################################################################
** Processors: LPC54608J512
** Processors: LPC54618J512
**
** Compiler: GNU C Compiler
** Reference manual: LPC54608 Series Reference Manual, Rev. 0 , 06/2017
** Reference manual: LPC54618 Series Reference Manual, Rev. 0 , 06/2017
** Version: rev. 1.0, 2017-6-06
** Build: b161214
**
** Abstract:
** Linker file for the GNU C Compiler
**
** Copyright (c) 2016 Freescale Semiconductor, Inc.
** Copyright (c) 2016 - 2017 , NXP
** All rights reserved.
**
** Copyright 2016 Freescale Semiconductor, Inc.
** Copyright 2016-2017 NXP
** Redistribution and use in source and binary forms, with or without modification,
** are permitted provided that the following conditions are met:
**
** o Redistributions of source code must retain the above copyright notice, this list
** 1. Redistributions of source code must retain the above copyright notice, this list
** of conditions and the following disclaimer.
**
** o Redistributions in binary form must reproduce the above copyright notice, this
** 2. Redistributions in binary form must reproduce the above copyright notice, this
** list of conditions and the following disclaimer in the documentation and/or
** other materials provided with the distribution.
**
** o Neither the name of copyright holder nor the names of its
** contributors may be used to endorse or promote products derived from this
** software without specific prior written permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
** http: www.freescale.com
** mail: support@freescale.com
**
** Copyright (c) 2016 NXP Semiconductors, Inc.
** All rights reserved.
**
** Redistribution and use in source and binary forms, with or without modification,
** are permitted provided that the following conditions are met:
**
** o Redistributions of source code must retain the above copyright notice, this list
** of conditions and the following disclaimer.
**
** o Redistributions in binary form must reproduce the above copyright notice, this
** list of conditions and the following disclaimer in the documentation and/or
** other materials provided with the distribution.
**
** o Neither the name of NXP Semiconductors, Inc. nor the names of its
** 3. Neither the name of the copyright holder nor the names of its
** contributors may be used to endorse or promote products derived from this
** software without specific prior written permission.
**
@ -97,8 +64,6 @@ MEMORY
m_data (RW) : ORIGIN = 0x20000000, LENGTH = 0x00028000
m_sramx (RW) : ORIGIN = 0x04000000, LENGTH = 0x00008000
m_usb_sram (RW) : ORIGIN = 0x40100000, LENGTH = 0x00002000
}
/* Define output sections */

View File

@ -1,54 +1,25 @@
/* ---------------------------------------------------------------------------------------*/
/* @file: startup_LPC54608.S */
/* @file: startup_LPC54618.S */
/* @purpose: CMSIS Cortex-M4 Core Device Startup File */
/* LPC54608 */
/* LPC54618 */
/* @version: 1.0 */
/* @date: 2017-6-6 */
/* @build: b161214 */
/* ---------------------------------------------------------------------------------------*/
/* */
/* Copyright (c) 1997 - 2016 , Freescale Semiconductor, Inc. */
/* Copyright (c) 2016 - 2017 , NXP */
/* */
/* Copyright 1997-2016 Freescale Semiconductor, Inc. */
/* Copyright 2016-2017 NXP */
/* Redistribution and use in source and binary forms, with or without modification, */
/* are permitted provided that the following conditions are met: */
/* */
/* o Redistributions of source code must retain the above copyright notice, this list */
/* 1. Redistributions of source code must retain the above copyright notice, this list */
/* of conditions and the following disclaimer. */
/* */
/* o Redistributions in binary form must reproduce the above copyright notice, this */
/* 2. Redistributions in binary form must reproduce the above copyright notice, this */
/* list of conditions and the following disclaimer in the documentation and/or */
/* other materials provided with the distribution. */
/* */
/* o Neither the name of copyright holder nor the names of its */
/* contributors may be used to endorse or promote products derived from this */
/* software without specific prior written permission. */
/* */
/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND */
/* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED */
/* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR */
/* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */
/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */
/* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */
/* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */
/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
/* */
/* Copyright (c) 2016 , NXP Semiconductors, Inc. */
/* All rights reserved. */
/* */
/* Redistribution and use in source and binary forms, with or without modification, */
/* are permitted provided that the following conditions are met: */
/* */
/* o Redistributions of source code must retain the above copyright notice, this list */
/* of conditions and the following disclaimer. */
/* */
/* o Redistributions in binary form must reproduce the above copyright notice, this */
/* list of conditions and the following disclaimer in the documentation and/or */
/* other materials provided with the distribution. */
/* */
/* o Neither the name of NXP Semiconductors, Inc. nor the names of its */
/* 3. Neither the name of the copyright holder nor the names of its */
/* contributors may be used to endorse or promote products derived from this */
/* software without specific prior written permission. */
/* */

View File

@ -1,7 +1,7 @@
/*
** ###################################################################
** Processors: LPC54608J512BD208
** LPC54608J512ET180
** Processors: LPC54618J512BD208
** LPC54618J512ET180
**
** Compiler: IAR ANSI C/C++ Compiler for ARM
** Reference manual: LPC54S60x/LPC5460x User manual Rev.0.9 7 Nov 2016

View File

@ -1,7 +1,7 @@
;/*****************************************************************************
; * @file: startup_LPC54608.s
; * @file: startup_LPC54618.s
; * @purpose: CMSIS Cortex-M4 Core Device Startup File
; * LPC54608
; * LPC54618
; * @version: 1.1
; * @date: 2016-11-25
; *----------------------------------------------------------------------------

View File

@ -36,14 +36,14 @@
*
* The CPU macro should be declared in the project or makefile.
*/
#if (defined(CPU_LPC54608J512BD208) || defined(CPU_LPC54608J512ET180))
#if (defined(CPU_LPC54618J512BD208) || defined(CPU_LPC54618J512ET180))
#define LPC54608_SERIES
#define LPC54618_SERIES
/* CMSIS-style register definitions */
#include "LPC54608.h"
#include "LPC54618.h"
/* CPU specific feature definitions */
#include "LPC54608_features.h"
#include "LPC54618_features.h"
#else
#error "No valid CPU defined!"

View File

@ -1,7 +1,7 @@
/*
** ###################################################################
** Processors: LPC54608J512BD208
** LPC54608J512ET180
** Processors: LPC54618J512BD208
** LPC54618J512ET180
**
** Compilers: Keil ARM C/C++ Compiler
** GNU C Compiler
@ -58,10 +58,10 @@
*/
/*!
* @file LPC54608
* @file LPC54618
* @version 1.1
* @date 2016-11-25
* @brief Device specific configuration file for LPC54608 (implementation file)
* @brief Device specific configuration file for LPC54618 (implementation file)
*
* Provides a system configuration function and a global variable that contains
* the system frequency. It configures the device and initializes the oscillator

View File

@ -1,7 +1,7 @@
/*
** ###################################################################
** Processors: LPC54608J512BD208
** LPC54608J512ET180
** Processors: LPC54618J512BD208
** LPC54618J512ET180
**
** Compilers: Keil ARM C/C++ Compiler
** GNU C Compiler
@ -58,18 +58,18 @@
*/
/*!
* @file LPC54608
* @file LPC54618
* @version 1.1
* @date 2016-11-25
* @brief Device specific configuration file for LPC54608 (header file)
* @brief Device specific configuration file for LPC54618 (header file)
*
* Provides a system configuration function and a global variable that contains
* the system frequency. It configures the device and initializes the oscillator
* (PLL) that is part of the microcontroller device.
*/
#ifndef _SYSTEM_LPC54608_H_
#define _SYSTEM_LPC54608_H_ /**< Symbol preventing repeated inclusion */
#ifndef _SYSTEM_LPC54618_H_
#define _SYSTEM_LPC54618_H_ /**< Symbol preventing repeated inclusion */
#ifdef __cplusplus
extern "C" {
@ -118,4 +118,4 @@ void SystemCoreClockUpdate (void);
}
#endif
#endif /* _SYSTEM_LPC54608_H_ */
#endif /* _SYSTEM_LPC54618_H_ */

View File

@ -984,8 +984,13 @@ static uint32_t FindGreatestCommonDivisor(uint32_t m, uint32_t n)
return m;
}
/* Set PLL output based on desired output rate */
static pll_error_t CLOCK_GetPllConfig(
/*
* Set PLL output based on desired output rate.
* In this function, the it calculates the PLL setting for output frequency from input clock
* frequency. The calculation would cost a few time. So it is not recommaned to use it frequently.
* the "pllctrl", "pllndec", "pllpdec", "pllmdec" would updated in this function.
*/
static pll_error_t CLOCK_GetPllConfigInternal(
uint32_t finHz, uint32_t foutHz, pll_setup_t *pSetup)
{
uint32_t nDivOutHz, fccoHz, multFccoDiv;
@ -1098,6 +1103,64 @@ static pll_error_t CLOCK_GetPllConfig(
return kStatus_PLL_Success;
}
#if (defined(CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT) && CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT)
/* Alloct the static buffer for cache. */
pll_setup_t gPllSetupCacheStruct[CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT];
uint32_t gFinHzCache[CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT] = {0};
uint32_t gFoutHzCache[CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT] = {0};
uint32_t gPllSetupCacheIdx = 0U;
#endif /* CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT */
/*
* Calculate the PLL setting values from input clock freq to output freq.
*/
static pll_error_t CLOCK_GetPllConfig(
uint32_t finHz, uint32_t foutHz, pll_setup_t *pSetup)
{
pll_error_t retErr;
#if (defined(CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT) && CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT)
uint32_t i;
for (i = 0U; i < CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT; i++)
{
if ( (finHz == gFinHzCache[i]) && (foutHz == gFoutHzCache[i]) )
{
/* Hit the target in cache buffer. */
pSetup->pllctrl = gPllSetupCacheStruct[i].pllctrl;
pSetup->pllndec = gPllSetupCacheStruct[i].pllndec;
pSetup->pllpdec = gPllSetupCacheStruct[i].pllpdec;
pSetup->pllmdec = gPllSetupCacheStruct[i].pllmdec;
retErr = kStatus_PLL_Success;
}
}
if (i < CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT)
{
return retErr;
}
#endif /* CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT */
/* No cache or did not hit the cache. */
retErr = CLOCK_GetPllConfigInternal(finHz, foutHz, pSetup);
#if (defined(CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT) && CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT)
if (kStatus_PLL_Success == retErr)
{
/* Cache the most recent calulation result into buffer. */
gFinHzCache[gPllSetupCacheIdx] = finHz;
gFoutHzCache[gPllSetupCacheIdx] = foutHz;
gPllSetupCacheStruct[gPllSetupCacheIdx].pllctrl = pSetup->pllctrl;
gPllSetupCacheStruct[gPllSetupCacheIdx].pllndec = pSetup->pllndec;
gPllSetupCacheStruct[gPllSetupCacheIdx].pllpdec = pSetup->pllpdec;
gPllSetupCacheStruct[gPllSetupCacheIdx].pllmdec = pSetup->pllmdec;
/* Update the index for next available buffer. */
gPllSetupCacheIdx = (gPllSetupCacheIdx + 1U) % CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT;
}
#endif /* CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT */
return retErr;
}
/* Update SYSTEM PLL rate variable */
static void CLOCK_GetSystemPLLOutFromSetupUpdate(pll_setup_t *pSetup)

View File

@ -59,6 +59,18 @@
#if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL))
#define FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL 0
#endif
/*!
* @brief User-defined the size of cache for CLOCK_PllGetConfig() function.
*
* Once define this MACRO to be non-zero value, CLOCK_PllGetConfig() function
* would cache the recent calulation and accelerate the execution to get the
* right settings.
*/
#ifndef CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT
#define CLOCK_USR_CFG_PLL_CONFIG_CACHE_COUNT 2U
#endif
/*! @brief Clock ip name array for ROM. */
#define ADC_CLOCKS \
{ \
@ -656,7 +668,7 @@ typedef enum _clock_attach_id
kSYS_PLL_to_SDIO_CLK = MUX_A(CM_SDIOCLKSEL, 1),
kUSB_PLL_to_SDIO_CLK = MUX_A(CM_SDIOCLKSEL, 2),
kFRO_HF_to_SDIO_CLK = MUX_A(CM_SDIOCLKSEL, 3),
kAUDIO_PLL_to_SDIO_CLK = MUX_A(CM_SDIOCLKSEL, 3),
kAUDIO_PLL_to_SDIO_CLK = MUX_A(CM_SDIOCLKSEL, 4),
kNONE_to_SDIO_CLK = MUX_A(CM_SDIOCLKSEL, 7),
kMCLK_to_LCD_CLK = MUX_A(CM_LCDCLKSEL, 0),

View File

@ -575,7 +575,7 @@ void I2S_DMACallback(dma_handle_t *handle, void *userData, bool transferDone, ui
i2s_dma_handle_t *i2sHandle = privateHandle->handle;
I2S_Type *base = privateHandle->base;
if (!transferDone || (i2sHandle->state == kI2S_DmaStateIdle))
if ((!transferDone) || (i2sHandle->state == kI2S_DmaStateIdle))
{
return;
}

View File

@ -1,6 +1,5 @@
/*
* Copyright (c) 2016, Freescale Semiconductor, Inc.
* Copyright (c) 2016, NXP
* Copyright (c) 2013-2016, NXP Semiconductors.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,

View File

@ -230,15 +230,6 @@ void POWER_EnterDeepPowerDown(uint64_t exclude_from_pd);
*/
void POWER_SetVoltageForFreq(uint32_t freq);
/*!
* @brief Power Library API to choose normal regulation and set the voltage for the desired operating frequency.
*
* @param freq - The desired frequency at which the part would like to operate,
* note that the voltage and flash wait states should be set before changing frequency
* @return none
*/
void POWER_SetVoltageForFreq(uint32_t freq);
/*!
* @brief Power Library API to return the library version.
*

Some files were not shown because too many files have changed in this diff Show More