mirror of https://github.com/ARMmbed/mbed-os.git
PSOC6: remove PSA targets
parent
1926ba8e18
commit
5cc66282dd
|
@ -11,9 +11,6 @@
|
|||
}
|
||||
},
|
||||
"target_overrides": {
|
||||
"CY8CKIT_062_WIFI_BT_M0_PSA": {
|
||||
"storage_type": "TDB_INTERNAL"
|
||||
},
|
||||
"K66F": {
|
||||
"storage_type": "TDB_INTERNAL"
|
||||
},
|
||||
|
|
|
@ -11,10 +11,6 @@
|
|||
}
|
||||
},
|
||||
"target_overrides": {
|
||||
"CY8CKIT_062_WIFI_BT_M0_PSA": {
|
||||
"internal_size": "0x8000",
|
||||
"internal_base_address": "0x10038000"
|
||||
},
|
||||
"LPC55S69_S": {
|
||||
"internal_size": "0x8000",
|
||||
"internal_base_address": "0x00028000"
|
||||
|
|
|
@ -49,18 +49,6 @@
|
|||
"area_1_size": 16384,
|
||||
"area_2_address": "0x100FC000",
|
||||
"area_2_size": 16384
|
||||
},
|
||||
"CY8CKIT_062_WIFI_BT_M0": {
|
||||
"area_1_address": "0x10078000",
|
||||
"area_1_size": 16384,
|
||||
"area_2_address": "0x1007C000",
|
||||
"area_2_size": 16384
|
||||
},
|
||||
"CY8CKIT_062_WIFI_BT_PSA": {
|
||||
"enabled" : false
|
||||
},
|
||||
"CY8CKIT_062_WIFI_BT_M0_PSA": {
|
||||
"enabled" : false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* File Name: cycfg.c
|
||||
*
|
||||
* Description:
|
||||
* Wrapper function to initialize all generated code.
|
||||
* This file was automatically generated and should not be modified.
|
||||
*
|
||||
********************************************************************************
|
||||
* Copyright 2017-2019 Cypress Semiconductor Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
********************************************************************************/
|
||||
|
||||
#include "cycfg.h"
|
||||
|
||||
void init_cycfg_all(void)
|
||||
{
|
||||
init_cycfg_clocks();
|
||||
init_cycfg_peripherals();
|
||||
init_cycfg_pins();
|
||||
init_cycfg_platform();
|
||||
init_cycfg_routing();
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* File Name: cycfg.h
|
||||
*
|
||||
* Description:
|
||||
* Simple wrapper header containing all generated files.
|
||||
* This file was automatically generated and should not be modified.
|
||||
*
|
||||
********************************************************************************
|
||||
* Copyright 2017-2019 Cypress Semiconductor Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
********************************************************************************/
|
||||
|
||||
#if !defined(CYCFG_H)
|
||||
#define CYCFG_H
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "cycfg_notices.h"
|
||||
#include "cycfg_clocks.h"
|
||||
#include "cycfg_peripherals.h"
|
||||
#include "cycfg_pins.h"
|
||||
#include "cycfg_platform.h"
|
||||
#include "cycfg_routing.h"
|
||||
|
||||
void init_cycfg_all(void);
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* CYCFG_H */
|
|
@ -1,49 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* File Name: cycfg_clocks.c
|
||||
*
|
||||
* Description:
|
||||
* Clock configuration
|
||||
* This file was automatically generated and should not be modified.
|
||||
*
|
||||
********************************************************************************
|
||||
* Copyright 2017-2019 Cypress Semiconductor Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
********************************************************************************/
|
||||
|
||||
#include "cycfg_clocks.h"
|
||||
|
||||
|
||||
void init_cycfg_clocks(void)
|
||||
{
|
||||
Cy_SysClk_PeriphDisableDivider(CY_SYSCLK_DIV_16_BIT, 0U);
|
||||
Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_16_BIT, 0U, 999U);
|
||||
Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_16_BIT, 0U);
|
||||
|
||||
Cy_SysClk_PeriphDisableDivider(CY_SYSCLK_DIV_8_BIT, 1U);
|
||||
Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_8_BIT, 1U, 7U);
|
||||
Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_8_BIT, 1U);
|
||||
|
||||
Cy_SysClk_PeriphDisableDivider(CY_SYSCLK_DIV_8_BIT, 2U);
|
||||
Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_8_BIT, 2U, 108U);
|
||||
Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_8_BIT, 2U);
|
||||
|
||||
Cy_SysClk_PeriphDisableDivider(CY_SYSCLK_DIV_8_BIT, 3U);
|
||||
Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_8_BIT, 3U, 1U);
|
||||
Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_8_BIT, 3U);
|
||||
|
||||
Cy_SysClk_PeriphDisableDivider(CY_SYSCLK_DIV_8_BIT, 4U);
|
||||
Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_8_BIT, 4U, 255U);
|
||||
Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_8_BIT, 4U);
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* File Name: cycfg_clocks.h
|
||||
*
|
||||
* Description:
|
||||
* Clock configuration
|
||||
* This file was automatically generated and should not be modified.
|
||||
*
|
||||
********************************************************************************
|
||||
* Copyright 2017-2019 Cypress Semiconductor Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
********************************************************************************/
|
||||
|
||||
#if !defined(CYCFG_CLOCKS_H)
|
||||
#define CYCFG_CLOCKS_H
|
||||
|
||||
#include "cycfg_notices.h"
|
||||
#include "cy_sysclk.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define peri_0_div_16_0_HW CY_SYSCLK_DIV_16_BIT
|
||||
#define peri_0_div_16_0_NUM 0U
|
||||
#define peri_0_div_8_1_HW CY_SYSCLK_DIV_8_BIT
|
||||
#define peri_0_div_8_1_NUM 1U
|
||||
#define peri_0_div_8_2_HW CY_SYSCLK_DIV_8_BIT
|
||||
#define peri_0_div_8_2_NUM 2U
|
||||
#define peri_0_div_8_3_HW CY_SYSCLK_DIV_8_BIT
|
||||
#define peri_0_div_8_3_NUM 3U
|
||||
#define peri_0_div_8_4_HW CY_SYSCLK_DIV_8_BIT
|
||||
#define peri_0_div_8_4_NUM 4U
|
||||
|
||||
void init_cycfg_clocks(void);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* CYCFG_CLOCKS_H */
|
|
@ -1,30 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* File Name: cycfg_notices.h
|
||||
*
|
||||
* Description:
|
||||
* Contains warnings and errors that occurred while generating code for the
|
||||
* design.
|
||||
* This file was automatically generated and should not be modified.
|
||||
*
|
||||
********************************************************************************
|
||||
* Copyright 2017-2019 Cypress Semiconductor Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
********************************************************************************/
|
||||
|
||||
#if !defined(CYCFG_NOTICES_H)
|
||||
#define CYCFG_NOTICES_H
|
||||
|
||||
|
||||
#endif /* CYCFG_NOTICES_H */
|
|
@ -1,219 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* File Name: cycfg_peripherals.c
|
||||
*
|
||||
* Description:
|
||||
* Peripheral Hardware Block configuration
|
||||
* This file was automatically generated and should not be modified.
|
||||
*
|
||||
********************************************************************************
|
||||
* Copyright 2017-2019 Cypress Semiconductor Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
********************************************************************************/
|
||||
|
||||
#include "cycfg_peripherals.h"
|
||||
|
||||
#define PWM_INPUT_DISABLED 0x7U
|
||||
#define USBUART_INTR_LVL_SEL (CY_USBFS_DEV_DRV_SET_SOF_LVL(0x2U) | \
|
||||
CY_USBFS_DEV_DRV_SET_BUS_RESET_LVL(0x2U) | \
|
||||
CY_USBFS_DEV_DRV_SET_EP0_LVL(0x2U) | \
|
||||
CY_USBFS_DEV_DRV_SET_LPM_LVL(0x0U) | \
|
||||
CY_USBFS_DEV_DRV_SET_ARB_EP_LVL(0x0U) | \
|
||||
CY_USBFS_DEV_DRV_SET_EP1_LVL(0x2U) | \
|
||||
CY_USBFS_DEV_DRV_SET_EP2_LVL(0x2U) | \
|
||||
CY_USBFS_DEV_DRV_SET_EP3_LVL(0x1U) | \
|
||||
CY_USBFS_DEV_DRV_SET_EP4_LVL(0x1U) | \
|
||||
CY_USBFS_DEV_DRV_SET_EP5_LVL(0x1U) | \
|
||||
CY_USBFS_DEV_DRV_SET_EP6_LVL(0x1U) | \
|
||||
CY_USBFS_DEV_DRV_SET_EP7_LVL(0x1U) | \
|
||||
CY_USBFS_DEV_DRV_SET_EP8_LVL(0x1U))
|
||||
|
||||
cy_stc_csd_context_t cy_csd_0_context =
|
||||
{
|
||||
.lockKey = CY_CSD_NONE_KEY,
|
||||
};
|
||||
const cy_stc_scb_uart_config_t BT_UART_config =
|
||||
{
|
||||
.uartMode = CY_SCB_UART_STANDARD,
|
||||
.enableMutliProcessorMode = false,
|
||||
.smartCardRetryOnNack = false,
|
||||
.irdaInvertRx = false,
|
||||
.irdaEnableLowPowerReceiver = false,
|
||||
.oversample = 8,
|
||||
.enableMsbFirst = false,
|
||||
.dataWidth = 8UL,
|
||||
.parity = CY_SCB_UART_PARITY_NONE,
|
||||
.stopBits = CY_SCB_UART_STOP_BITS_1,
|
||||
.enableInputFilter = false,
|
||||
.breakWidth = 11UL,
|
||||
.dropOnFrameError = false,
|
||||
.dropOnParityError = false,
|
||||
.receiverAddress = 0x0UL,
|
||||
.receiverAddressMask = 0x0UL,
|
||||
.acceptAddrInFifo = false,
|
||||
.enableCts = true,
|
||||
.ctsPolarity = CY_SCB_UART_ACTIVE_LOW,
|
||||
.rtsRxFifoLevel = 63,
|
||||
.rtsPolarity = CY_SCB_UART_ACTIVE_LOW,
|
||||
.rxFifoTriggerLevel = 63UL,
|
||||
.rxFifoIntEnableMask = 0UL,
|
||||
.txFifoTriggerLevel = 63UL,
|
||||
.txFifoIntEnableMask = 0UL,
|
||||
};
|
||||
const cy_stc_scb_ezi2c_config_t CSD_COMM_config =
|
||||
{
|
||||
.numberOfAddresses = CY_SCB_EZI2C_ONE_ADDRESS,
|
||||
.slaveAddress1 = 8U,
|
||||
.slaveAddress2 = 0U,
|
||||
.subAddressSize = CY_SCB_EZI2C_SUB_ADDR16_BITS,
|
||||
.enableWakeFromSleep = false,
|
||||
};
|
||||
const cy_stc_scb_uart_config_t KITPROG_UART_config =
|
||||
{
|
||||
.uartMode = CY_SCB_UART_STANDARD,
|
||||
.enableMutliProcessorMode = false,
|
||||
.smartCardRetryOnNack = false,
|
||||
.irdaInvertRx = false,
|
||||
.irdaEnableLowPowerReceiver = false,
|
||||
.oversample = 8,
|
||||
.enableMsbFirst = false,
|
||||
.dataWidth = 8UL,
|
||||
.parity = CY_SCB_UART_PARITY_NONE,
|
||||
.stopBits = CY_SCB_UART_STOP_BITS_1,
|
||||
.enableInputFilter = false,
|
||||
.breakWidth = 11UL,
|
||||
.dropOnFrameError = false,
|
||||
.dropOnParityError = false,
|
||||
.receiverAddress = 0x0UL,
|
||||
.receiverAddressMask = 0x0UL,
|
||||
.acceptAddrInFifo = false,
|
||||
.enableCts = false,
|
||||
.ctsPolarity = CY_SCB_UART_ACTIVE_LOW,
|
||||
.rtsRxFifoLevel = 0UL,
|
||||
.rtsPolarity = CY_SCB_UART_ACTIVE_LOW,
|
||||
.rxFifoTriggerLevel = 63UL,
|
||||
.rxFifoIntEnableMask = 0UL,
|
||||
.txFifoTriggerLevel = 63UL,
|
||||
.txFifoIntEnableMask = 0UL,
|
||||
};
|
||||
cy_en_sd_host_card_capacity_t SDIO_cardCapacity = CY_SD_HOST_SDSC;
|
||||
cy_en_sd_host_card_type_t SDIO_cardType = CY_SD_HOST_EMMC;
|
||||
uint32_t SDIO_rca = 0u;
|
||||
const cy_stc_sd_host_init_config_t SDIO_config =
|
||||
{
|
||||
.emmc = true,
|
||||
.dmaType = CY_SD_HOST_DMA_SDMA,
|
||||
.enableLedControl = false,
|
||||
};
|
||||
cy_stc_sd_host_sd_card_config_t SDIO_card_cfg =
|
||||
{
|
||||
.lowVoltageSignaling = false,
|
||||
.busWidth = CY_SD_HOST_BUS_WIDTH_4_BIT,
|
||||
.cardType = &SDIO_cardType,
|
||||
.rca = &SDIO_rca,
|
||||
.cardCapacity = &SDIO_cardCapacity,
|
||||
};
|
||||
const cy_stc_smif_config_t QSPI_config =
|
||||
{
|
||||
.mode = (uint32_t)CY_SMIF_NORMAL,
|
||||
.deselectDelay = QSPI_DESELECT_DELAY,
|
||||
.rxClockSel = (uint32_t)CY_SMIF_SEL_INV_INTERNAL_CLK,
|
||||
.blockEvent = (uint32_t)CY_SMIF_BUS_ERROR,
|
||||
};
|
||||
const cy_stc_mcwdt_config_t MCWDT0_config =
|
||||
{
|
||||
.c0Match = 32768U,
|
||||
.c1Match = 32768U,
|
||||
.c0Mode = CY_MCWDT_MODE_NONE,
|
||||
.c1Mode = CY_MCWDT_MODE_NONE,
|
||||
.c2ToggleBit = 16U,
|
||||
.c2Mode = CY_MCWDT_MODE_NONE,
|
||||
.c0ClearOnMatch = false,
|
||||
.c1ClearOnMatch = false,
|
||||
.c0c1Cascade = true,
|
||||
.c1c2Cascade = false,
|
||||
};
|
||||
const cy_stc_rtc_config_t RTC_config =
|
||||
{
|
||||
.sec = 0U,
|
||||
.min = 0U,
|
||||
.hour = 12U,
|
||||
.amPm = CY_RTC_AM,
|
||||
.hrFormat = CY_RTC_24_HOURS,
|
||||
.dayOfWeek = CY_RTC_SUNDAY,
|
||||
.date = 1U,
|
||||
.month = CY_RTC_JANUARY,
|
||||
.year = 0U,
|
||||
};
|
||||
const cy_stc_tcpwm_pwm_config_t PWM_config =
|
||||
{
|
||||
.pwmMode = CY_TCPWM_PWM_MODE_PWM,
|
||||
.clockPrescaler = CY_TCPWM_PWM_PRESCALER_DIVBY_1,
|
||||
.pwmAlignment = CY_TCPWM_PWM_LEFT_ALIGN,
|
||||
.deadTimeClocks = 0,
|
||||
.runMode = CY_TCPWM_PWM_CONTINUOUS,
|
||||
.period0 = 32000,
|
||||
.period1 = 32768,
|
||||
.enablePeriodSwap = false,
|
||||
.compare0 = 16384,
|
||||
.compare1 = 16384,
|
||||
.enableCompareSwap = false,
|
||||
.interruptSources = CY_TCPWM_INT_NONE,
|
||||
.invertPWMOut = CY_TCPWM_PWM_INVERT_DISABLE,
|
||||
.invertPWMOutN = CY_TCPWM_PWM_INVERT_DISABLE,
|
||||
.killMode = CY_TCPWM_PWM_STOP_ON_KILL,
|
||||
.swapInputMode = PWM_INPUT_DISABLED & 0x3U,
|
||||
.swapInput = CY_TCPWM_INPUT_0,
|
||||
.reloadInputMode = PWM_INPUT_DISABLED & 0x3U,
|
||||
.reloadInput = CY_TCPWM_INPUT_0,
|
||||
.startInputMode = PWM_INPUT_DISABLED & 0x3U,
|
||||
.startInput = CY_TCPWM_INPUT_0,
|
||||
.killInputMode = PWM_INPUT_DISABLED & 0x3U,
|
||||
.killInput = CY_TCPWM_INPUT_0,
|
||||
.countInputMode = PWM_INPUT_DISABLED & 0x3U,
|
||||
.countInput = CY_TCPWM_INPUT_1,
|
||||
};
|
||||
const cy_stc_usbfs_dev_drv_config_t USBUART_config =
|
||||
{
|
||||
.mode = CY_USBFS_DEV_DRV_EP_MANAGEMENT_CPU,
|
||||
.epAccess = CY_USBFS_DEV_DRV_USE_8_BITS_DR,
|
||||
.epBuffer = NULL,
|
||||
.epBufferSize = 0U,
|
||||
.dmaConfig[0] = NULL,
|
||||
.dmaConfig[1] = NULL,
|
||||
.dmaConfig[2] = NULL,
|
||||
.dmaConfig[3] = NULL,
|
||||
.dmaConfig[4] = NULL,
|
||||
.dmaConfig[5] = NULL,
|
||||
.dmaConfig[6] = NULL,
|
||||
.dmaConfig[7] = NULL,
|
||||
.enableLpm = false,
|
||||
.intrLevelSel = USBUART_INTR_LVL_SEL,
|
||||
};
|
||||
|
||||
|
||||
void init_cycfg_peripherals(void)
|
||||
{
|
||||
Cy_SysClk_PeriphAssignDivider(PCLK_CSD_CLOCK, CY_SYSCLK_DIV_8_BIT, 4U);
|
||||
|
||||
Cy_SysClk_PeriphAssignDivider(PCLK_SCB2_CLOCK, CY_SYSCLK_DIV_8_BIT, 2U);
|
||||
|
||||
Cy_SysClk_PeriphAssignDivider(PCLK_SCB3_CLOCK, CY_SYSCLK_DIV_8_BIT, 1U);
|
||||
|
||||
Cy_SysClk_PeriphAssignDivider(PCLK_SCB5_CLOCK, CY_SYSCLK_DIV_8_BIT, 2U);
|
||||
|
||||
Cy_SysClk_PeriphAssignDivider(PCLK_TCPWM1_CLOCKS1, CY_SYSCLK_DIV_8_BIT, 3U);
|
||||
|
||||
Cy_SysClk_PeriphAssignDivider(PCLK_USB_CLOCK_DEV_BRS, CY_SYSCLK_DIV_16_BIT, 0U);
|
||||
}
|
|
@ -1,148 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* File Name: cycfg_peripherals.h
|
||||
*
|
||||
* Description:
|
||||
* Peripheral Hardware Block configuration
|
||||
* This file was automatically generated and should not be modified.
|
||||
*
|
||||
********************************************************************************
|
||||
* Copyright 2017-2019 Cypress Semiconductor Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
********************************************************************************/
|
||||
|
||||
#if !defined(CYCFG_PERIPHERALS_H)
|
||||
#define CYCFG_PERIPHERALS_H
|
||||
|
||||
#include "cycfg_notices.h"
|
||||
#include "cy_sysclk.h"
|
||||
#include "cy_csd.h"
|
||||
#include "cy_scb_uart.h"
|
||||
#include "cy_scb_ezi2c.h"
|
||||
#include "cy_sd_host.h"
|
||||
#include "cy_smif.h"
|
||||
#include "cy_mcwdt.h"
|
||||
#include "cy_rtc.h"
|
||||
#include "cy_tcpwm_pwm.h"
|
||||
#include "cycfg_routing.h"
|
||||
#include "cy_usbfs_dev_drv.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define CY_CAPSENSE_CORE 4u
|
||||
#define CY_CAPSENSE_CPU_CLK 100000000u
|
||||
#define CY_CAPSENSE_PERI_CLK 100000000u
|
||||
#define CY_CAPSENSE_VDDA_MV 3300u
|
||||
#define CY_CAPSENSE_PERI_DIV_TYPE CY_SYSCLK_DIV_8_BIT
|
||||
#define CY_CAPSENSE_PERI_DIV_INDEX 4u
|
||||
#define Cmod_PORT GPIO_PRT7
|
||||
#define CintA_PORT GPIO_PRT7
|
||||
#define CintB_PORT GPIO_PRT7
|
||||
#define Button0_Rx0_PORT GPIO_PRT8
|
||||
#define Button0_Tx_PORT GPIO_PRT1
|
||||
#define Button1_Rx0_PORT GPIO_PRT8
|
||||
#define Button1_Tx_PORT GPIO_PRT1
|
||||
#define LinearSlider0_Sns0_PORT GPIO_PRT8
|
||||
#define LinearSlider0_Sns1_PORT GPIO_PRT8
|
||||
#define LinearSlider0_Sns2_PORT GPIO_PRT8
|
||||
#define LinearSlider0_Sns3_PORT GPIO_PRT8
|
||||
#define LinearSlider0_Sns4_PORT GPIO_PRT8
|
||||
#define Cmod_PIN 7u
|
||||
#define CintA_PIN 1u
|
||||
#define CintB_PIN 2u
|
||||
#define Button0_Rx0_PIN 1u
|
||||
#define Button0_Tx_PIN 0u
|
||||
#define Button1_Rx0_PIN 2u
|
||||
#define Button1_Tx_PIN 0u
|
||||
#define LinearSlider0_Sns0_PIN 3u
|
||||
#define LinearSlider0_Sns1_PIN 4u
|
||||
#define LinearSlider0_Sns2_PIN 5u
|
||||
#define LinearSlider0_Sns3_PIN 6u
|
||||
#define LinearSlider0_Sns4_PIN 7u
|
||||
#define Cmod_PORT_NUM 7u
|
||||
#define CintA_PORT_NUM 7u
|
||||
#define CintB_PORT_NUM 7u
|
||||
#define CapSense_HW CSD0
|
||||
#define CapSense_IRQ csd_interrupt_IRQn
|
||||
#define BT_UART_HW SCB2
|
||||
#define BT_UART_IRQ scb_2_interrupt_IRQn
|
||||
#define CSD_COMM_HW SCB3
|
||||
#define CSD_COMM_IRQ scb_3_interrupt_IRQn
|
||||
#define KITPROG_UART_HW SCB5
|
||||
#define KITPROG_UART_IRQ scb_5_interrupt_IRQn
|
||||
#define SDIO_HW SDHC0
|
||||
#define SDIO_IRQ sdhc_0_interrupt_general_IRQn
|
||||
#define QSPI_HW SMIF0
|
||||
#define QSPI_IRQ smif_interrupt_IRQn
|
||||
#define QSPI_MEMORY_MODE_ALIGMENT_ERROR (0UL)
|
||||
#define QSPI_RX_DATA_FIFO_UNDERFLOW (0UL)
|
||||
#define QSPI_TX_COMMAND_FIFO_OVERFLOW (0UL)
|
||||
#define QSPI_TX_DATA_FIFO_OVERFLOW (0UL)
|
||||
#define QSPI_RX_FIFO_TRIGEER_LEVEL (0UL)
|
||||
#define QSPI_TX_FIFO_TRIGEER_LEVEL (0UL)
|
||||
#define QSPI_DATALINES0_1 (1UL)
|
||||
#define QSPI_DATALINES2_3 (1UL)
|
||||
#define QSPI_DATALINES4_5 (0UL)
|
||||
#define QSPI_DATALINES6_7 (0UL)
|
||||
#define QSPI_SS0 (1UL)
|
||||
#define QSPI_SS1 (0UL)
|
||||
#define QSPI_SS2 (0UL)
|
||||
#define QSPI_SS3 (0UL)
|
||||
#define QSPI_DESELECT_DELAY 7
|
||||
#define MCWDT0_HW MCWDT_STRUCT0
|
||||
#define RTC_10_MONTH_OFFSET (28U)
|
||||
#define RTC_MONTH_OFFSET (24U)
|
||||
#define RTC_10_DAY_OFFSET (20U)
|
||||
#define RTC_DAY_OFFSET (16U)
|
||||
#define RTC_1000_YEAR_OFFSET (12U)
|
||||
#define RTC_100_YEAR_OFFSET (8U)
|
||||
#define RTC_10_YEAR_OFFSET (4U)
|
||||
#define RTC_YEAR_OFFSET (0U)
|
||||
#define PWM_HW TCPWM1
|
||||
#define PWM_NUM 1UL
|
||||
#define PWM_MASK (1UL << 1)
|
||||
#define USBUART_ACTIVE_ENDPOINTS_MASK 7U
|
||||
#define USBUART_ENDPOINTS_BUFFER_SIZE 140U
|
||||
#define USBUART_ENDPOINTS_ACCESS_TYPE 0U
|
||||
#define USBUART_USB_CORE 4U
|
||||
#define USBUART_HW USBFS0
|
||||
#define USBUART_HI_IRQ usb_interrupt_hi_IRQn
|
||||
#define USBUART_MED_IRQ usb_interrupt_med_IRQn
|
||||
#define USBUART_LO_IRQ usb_interrupt_lo_IRQn
|
||||
|
||||
extern cy_stc_csd_context_t cy_csd_0_context;
|
||||
extern const cy_stc_scb_uart_config_t BT_UART_config;
|
||||
extern const cy_stc_scb_ezi2c_config_t CSD_COMM_config;
|
||||
extern const cy_stc_scb_uart_config_t KITPROG_UART_config;
|
||||
extern cy_en_sd_host_card_capacity_t SDIO_cardCapacity;
|
||||
extern cy_en_sd_host_card_type_t SDIO_cardType;
|
||||
extern uint32_t SDIO_rca;
|
||||
extern const cy_stc_sd_host_init_config_t SDIO_config;
|
||||
extern cy_stc_sd_host_sd_card_config_t SDIO_card_cfg;
|
||||
extern const cy_stc_smif_config_t QSPI_config;
|
||||
extern const cy_stc_mcwdt_config_t MCWDT0_config;
|
||||
extern const cy_stc_rtc_config_t RTC_config;
|
||||
extern const cy_stc_tcpwm_pwm_config_t PWM_config;
|
||||
extern const cy_stc_usbfs_dev_drv_config_t USBUART_config;
|
||||
|
||||
void init_cycfg_peripherals(void);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* CYCFG_PERIPHERALS_H */
|
|
@ -1,883 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* File Name: cycfg_pins.c
|
||||
*
|
||||
* Description:
|
||||
* Pin configuration
|
||||
* This file was automatically generated and should not be modified.
|
||||
*
|
||||
********************************************************************************
|
||||
* Copyright 2017-2019 Cypress Semiconductor Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
********************************************************************************/
|
||||
|
||||
#include "cycfg_pins.h"
|
||||
|
||||
const cy_stc_gpio_pin_config_t WCO_IN_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
.hsiom = WCO_IN_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t WCO_OUT_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
.hsiom = WCO_OUT_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t LED_RED_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_STRONG_IN_OFF,
|
||||
.hsiom = LED_RED_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t SW2_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_PULLUP,
|
||||
.hsiom = SW2_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t LED_BLUE_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_STRONG_IN_OFF,
|
||||
.hsiom = LED_BLUE_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t QSPI_SS0_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_STRONG_IN_OFF,
|
||||
.hsiom = QSPI_SS0_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t QSPI_DATA3_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_STRONG,
|
||||
.hsiom = QSPI_DATA3_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t QSPI_DATA2_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_STRONG,
|
||||
.hsiom = QSPI_DATA2_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t QSPI_DATA1_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_STRONG,
|
||||
.hsiom = QSPI_DATA1_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t QSPI_DATA0_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_STRONG,
|
||||
.hsiom = QSPI_DATA0_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t QSPI_SPI_CLOCK_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_STRONG_IN_OFF,
|
||||
.hsiom = QSPI_SPI_CLOCK_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t LED9_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_STRONG_IN_OFF,
|
||||
.hsiom = LED9_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t ioss_0_port_14_pin_0_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
.hsiom = ioss_0_port_14_pin_0_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t ioss_0_port_14_pin_1_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
.hsiom = ioss_0_port_14_pin_1_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t CSD_TX_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
.hsiom = CSD_TX_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t LED_GREEN_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_STRONG_IN_OFF,
|
||||
.hsiom = LED_GREEN_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t LED8_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_STRONG_IN_OFF,
|
||||
.hsiom = LED8_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t SDHC0_DAT0_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_STRONG,
|
||||
.hsiom = SDHC0_DAT0_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t SDHC0_DAT1_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_STRONG,
|
||||
.hsiom = SDHC0_DAT1_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t SDHC0_DAT2_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_STRONG,
|
||||
.hsiom = SDHC0_DAT2_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t SDHC0_DAT3_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_STRONG,
|
||||
.hsiom = SDHC0_DAT3_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t SDHC0_CMD_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_STRONG,
|
||||
.hsiom = SDHC0_CMD_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t SDHC0_CLK_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_STRONG,
|
||||
.hsiom = SDHC0_CLK_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t ENABLE_WIFI_config =
|
||||
{
|
||||
.outVal = 0,
|
||||
.driveMode = CY_GPIO_DM_STRONG_IN_OFF,
|
||||
.hsiom = ENABLE_WIFI_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t BT_UART_RX_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_HIGHZ,
|
||||
.hsiom = BT_UART_RX_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t BT_UART_TX_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_STRONG_IN_OFF,
|
||||
.hsiom = BT_UART_TX_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t BT_UART_RTS_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_STRONG_IN_OFF,
|
||||
.hsiom = BT_UART_RTS_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t BT_UART_CTS_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_HIGHZ,
|
||||
.hsiom = BT_UART_CTS_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t BT_POWER_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_OD_DRIVESHIGH_IN_OFF,
|
||||
.hsiom = BT_POWER_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t BT_HOST_WAKE_config =
|
||||
{
|
||||
.outVal = 0,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
.hsiom = BT_HOST_WAKE_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t BT_DEVICE_WAKE_config =
|
||||
{
|
||||
.outVal = 0,
|
||||
.driveMode = CY_GPIO_DM_STRONG_IN_OFF,
|
||||
.hsiom = BT_DEVICE_WAKE_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t UART_RX_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_HIGHZ,
|
||||
.hsiom = UART_RX_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t UART_TX_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_STRONG_IN_OFF,
|
||||
.hsiom = UART_TX_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t EZI2C_SCL_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_OD_DRIVESLOW,
|
||||
.hsiom = EZI2C_SCL_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t EZI2C_SDA_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_OD_DRIVESLOW,
|
||||
.hsiom = EZI2C_SDA_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t SWO_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_STRONG_IN_OFF,
|
||||
.hsiom = SWO_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t SWDIO_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_PULLUP,
|
||||
.hsiom = SWDIO_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t SWDCK_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_PULLDOWN,
|
||||
.hsiom = SWDCK_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t CINA_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
.hsiom = CINA_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t CINB_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
.hsiom = CINB_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t CMOD_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
.hsiom = CMOD_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t CSD_BTN0_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
.hsiom = CSD_BTN0_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t CSD_BTN1_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
.hsiom = CSD_BTN1_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t CSD_SLD0_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
.hsiom = CSD_SLD0_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t CSD_SLD1_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
.hsiom = CSD_SLD1_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t CSD_SLD2_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
.hsiom = CSD_SLD2_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t CSD_SLD3_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
.hsiom = CSD_SLD3_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
const cy_stc_gpio_pin_config_t CSD_SLD4_config =
|
||||
{
|
||||
.outVal = 1,
|
||||
.driveMode = CY_GPIO_DM_ANALOG,
|
||||
.hsiom = CSD_SLD4_HSIOM,
|
||||
.intEdge = CY_GPIO_INTR_DISABLE,
|
||||
.intMask = 0UL,
|
||||
.vtrip = CY_GPIO_VTRIP_CMOS,
|
||||
.slewRate = CY_GPIO_SLEW_FAST,
|
||||
.driveSel = CY_GPIO_DRIVE_FULL,
|
||||
.vregEn = 0UL,
|
||||
.ibufMode = 0UL,
|
||||
.vtripSel = 0UL,
|
||||
.vrefSel = 0UL,
|
||||
.vohSel = 0UL,
|
||||
};
|
||||
|
||||
|
||||
void init_cycfg_pins(void)
|
||||
{
|
||||
Cy_GPIO_Pin_Init(WCO_IN_PORT, WCO_IN_PIN, &WCO_IN_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(WCO_OUT_PORT, WCO_OUT_PIN, &WCO_OUT_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(LED_RED_PORT, LED_RED_PIN, &LED_RED_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(SW2_PORT, SW2_PIN, &SW2_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(LED_BLUE_PORT, LED_BLUE_PIN, &LED_BLUE_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(QSPI_SS0_PORT, QSPI_SS0_PIN, &QSPI_SS0_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(QSPI_DATA3_PORT, QSPI_DATA3_PIN, &QSPI_DATA3_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(QSPI_DATA2_PORT, QSPI_DATA2_PIN, &QSPI_DATA2_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(QSPI_DATA1_PORT, QSPI_DATA1_PIN, &QSPI_DATA1_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(QSPI_DATA0_PORT, QSPI_DATA0_PIN, &QSPI_DATA0_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(QSPI_SPI_CLOCK_PORT, QSPI_SPI_CLOCK_PIN, &QSPI_SPI_CLOCK_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(LED9_PORT, LED9_PIN, &LED9_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(ioss_0_port_14_pin_0_PORT, ioss_0_port_14_pin_0_PIN, &ioss_0_port_14_pin_0_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(ioss_0_port_14_pin_1_PORT, ioss_0_port_14_pin_1_PIN, &ioss_0_port_14_pin_1_config);
|
||||
|
||||
|
||||
Cy_GPIO_Pin_Init(LED_GREEN_PORT, LED_GREEN_PIN, &LED_GREEN_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(LED8_PORT, LED8_PIN, &LED8_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(SDHC0_DAT0_PORT, SDHC0_DAT0_PIN, &SDHC0_DAT0_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(SDHC0_DAT1_PORT, SDHC0_DAT1_PIN, &SDHC0_DAT1_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(SDHC0_DAT2_PORT, SDHC0_DAT2_PIN, &SDHC0_DAT2_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(SDHC0_DAT3_PORT, SDHC0_DAT3_PIN, &SDHC0_DAT3_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(SDHC0_CMD_PORT, SDHC0_CMD_PIN, &SDHC0_CMD_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(SDHC0_CLK_PORT, SDHC0_CLK_PIN, &SDHC0_CLK_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(ENABLE_WIFI_PORT, ENABLE_WIFI_PIN, &ENABLE_WIFI_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(BT_UART_RX_PORT, BT_UART_RX_PIN, &BT_UART_RX_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(BT_UART_TX_PORT, BT_UART_TX_PIN, &BT_UART_TX_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(BT_UART_RTS_PORT, BT_UART_RTS_PIN, &BT_UART_RTS_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(BT_UART_CTS_PORT, BT_UART_CTS_PIN, &BT_UART_CTS_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(BT_POWER_PORT, BT_POWER_PIN, &BT_POWER_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(BT_HOST_WAKE_PORT, BT_HOST_WAKE_PIN, &BT_HOST_WAKE_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(BT_DEVICE_WAKE_PORT, BT_DEVICE_WAKE_PIN, &BT_DEVICE_WAKE_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(UART_RX_PORT, UART_RX_PIN, &UART_RX_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(UART_TX_PORT, UART_TX_PIN, &UART_TX_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(EZI2C_SCL_PORT, EZI2C_SCL_PIN, &EZI2C_SCL_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(EZI2C_SDA_PORT, EZI2C_SDA_PIN, &EZI2C_SDA_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(SWO_PORT, SWO_PIN, &SWO_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(SWDIO_PORT, SWDIO_PIN, &SWDIO_config);
|
||||
|
||||
Cy_GPIO_Pin_Init(SWDCK_PORT, SWDCK_PIN, &SWDCK_config);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,571 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* File Name: cycfg_pins.h
|
||||
*
|
||||
* Description:
|
||||
* Pin configuration
|
||||
* This file was automatically generated and should not be modified.
|
||||
*
|
||||
********************************************************************************
|
||||
* Copyright 2017-2019 Cypress Semiconductor Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
********************************************************************************/
|
||||
|
||||
#if !defined(CYCFG_PINS_H)
|
||||
#define CYCFG_PINS_H
|
||||
|
||||
#include "cycfg_notices.h"
|
||||
#include "cy_gpio.h"
|
||||
#include "cycfg_routing.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define WCO_IN_PORT GPIO_PRT0
|
||||
#define WCO_IN_PIN 0U
|
||||
#define WCO_IN_NUM 0U
|
||||
#define WCO_IN_DRIVEMODE CY_GPIO_DM_ANALOG
|
||||
#define WCO_IN_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_0_pin_0_HSIOM
|
||||
#define ioss_0_port_0_pin_0_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define WCO_IN_HSIOM ioss_0_port_0_pin_0_HSIOM
|
||||
#define WCO_IN_IRQ ioss_interrupts_gpio_0_IRQn
|
||||
#define WCO_OUT_PORT GPIO_PRT0
|
||||
#define WCO_OUT_PIN 1U
|
||||
#define WCO_OUT_NUM 1U
|
||||
#define WCO_OUT_DRIVEMODE CY_GPIO_DM_ANALOG
|
||||
#define WCO_OUT_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_0_pin_1_HSIOM
|
||||
#define ioss_0_port_0_pin_1_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define WCO_OUT_HSIOM ioss_0_port_0_pin_1_HSIOM
|
||||
#define WCO_OUT_IRQ ioss_interrupts_gpio_0_IRQn
|
||||
#define LED_RED_PORT GPIO_PRT0
|
||||
#define LED_RED_PIN 3U
|
||||
#define LED_RED_NUM 3U
|
||||
#define LED_RED_DRIVEMODE CY_GPIO_DM_STRONG_IN_OFF
|
||||
#define LED_RED_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_0_pin_3_HSIOM
|
||||
#define ioss_0_port_0_pin_3_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define LED_RED_HSIOM ioss_0_port_0_pin_3_HSIOM
|
||||
#define LED_RED_IRQ ioss_interrupts_gpio_0_IRQn
|
||||
#define SW2_PORT GPIO_PRT0
|
||||
#define SW2_PIN 4U
|
||||
#define SW2_NUM 4U
|
||||
#define SW2_DRIVEMODE CY_GPIO_DM_PULLUP
|
||||
#define SW2_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_0_pin_4_HSIOM
|
||||
#define ioss_0_port_0_pin_4_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define SW2_HSIOM ioss_0_port_0_pin_4_HSIOM
|
||||
#define SW2_IRQ ioss_interrupts_gpio_0_IRQn
|
||||
#define LED_BLUE_PORT GPIO_PRT11
|
||||
#define LED_BLUE_PIN 1U
|
||||
#define LED_BLUE_NUM 1U
|
||||
#define LED_BLUE_DRIVEMODE CY_GPIO_DM_STRONG_IN_OFF
|
||||
#define LED_BLUE_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_11_pin_1_HSIOM
|
||||
#define ioss_0_port_11_pin_1_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define LED_BLUE_HSIOM ioss_0_port_11_pin_1_HSIOM
|
||||
#define LED_BLUE_IRQ ioss_interrupts_gpio_11_IRQn
|
||||
#define QSPI_SS0_PORT GPIO_PRT11
|
||||
#define QSPI_SS0_PIN 2U
|
||||
#define QSPI_SS0_NUM 2U
|
||||
#define QSPI_SS0_DRIVEMODE CY_GPIO_DM_STRONG_IN_OFF
|
||||
#define QSPI_SS0_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_11_pin_2_HSIOM
|
||||
#define ioss_0_port_11_pin_2_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define QSPI_SS0_HSIOM ioss_0_port_11_pin_2_HSIOM
|
||||
#define QSPI_SS0_IRQ ioss_interrupts_gpio_11_IRQn
|
||||
#define QSPI_DATA3_PORT GPIO_PRT11
|
||||
#define QSPI_DATA3_PIN 3U
|
||||
#define QSPI_DATA3_NUM 3U
|
||||
#define QSPI_DATA3_DRIVEMODE CY_GPIO_DM_STRONG
|
||||
#define QSPI_DATA3_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_11_pin_3_HSIOM
|
||||
#define ioss_0_port_11_pin_3_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define QSPI_DATA3_HSIOM ioss_0_port_11_pin_3_HSIOM
|
||||
#define QSPI_DATA3_IRQ ioss_interrupts_gpio_11_IRQn
|
||||
#define QSPI_DATA2_PORT GPIO_PRT11
|
||||
#define QSPI_DATA2_PIN 4U
|
||||
#define QSPI_DATA2_NUM 4U
|
||||
#define QSPI_DATA2_DRIVEMODE CY_GPIO_DM_STRONG
|
||||
#define QSPI_DATA2_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_11_pin_4_HSIOM
|
||||
#define ioss_0_port_11_pin_4_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define QSPI_DATA2_HSIOM ioss_0_port_11_pin_4_HSIOM
|
||||
#define QSPI_DATA2_IRQ ioss_interrupts_gpio_11_IRQn
|
||||
#define QSPI_DATA1_PORT GPIO_PRT11
|
||||
#define QSPI_DATA1_PIN 5U
|
||||
#define QSPI_DATA1_NUM 5U
|
||||
#define QSPI_DATA1_DRIVEMODE CY_GPIO_DM_STRONG
|
||||
#define QSPI_DATA1_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_11_pin_5_HSIOM
|
||||
#define ioss_0_port_11_pin_5_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define QSPI_DATA1_HSIOM ioss_0_port_11_pin_5_HSIOM
|
||||
#define QSPI_DATA1_IRQ ioss_interrupts_gpio_11_IRQn
|
||||
#define QSPI_DATA0_PORT GPIO_PRT11
|
||||
#define QSPI_DATA0_PIN 6U
|
||||
#define QSPI_DATA0_NUM 6U
|
||||
#define QSPI_DATA0_DRIVEMODE CY_GPIO_DM_STRONG
|
||||
#define QSPI_DATA0_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_11_pin_6_HSIOM
|
||||
#define ioss_0_port_11_pin_6_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define QSPI_DATA0_HSIOM ioss_0_port_11_pin_6_HSIOM
|
||||
#define QSPI_DATA0_IRQ ioss_interrupts_gpio_11_IRQn
|
||||
#define QSPI_SPI_CLOCK_PORT GPIO_PRT11
|
||||
#define QSPI_SPI_CLOCK_PIN 7U
|
||||
#define QSPI_SPI_CLOCK_NUM 7U
|
||||
#define QSPI_SPI_CLOCK_DRIVEMODE CY_GPIO_DM_STRONG_IN_OFF
|
||||
#define QSPI_SPI_CLOCK_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_11_pin_7_HSIOM
|
||||
#define ioss_0_port_11_pin_7_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define QSPI_SPI_CLOCK_HSIOM ioss_0_port_11_pin_7_HSIOM
|
||||
#define QSPI_SPI_CLOCK_IRQ ioss_interrupts_gpio_11_IRQn
|
||||
#define LED9_PORT GPIO_PRT13
|
||||
#define LED9_PIN 7U
|
||||
#define LED9_NUM 7U
|
||||
#define LED9_DRIVEMODE CY_GPIO_DM_STRONG_IN_OFF
|
||||
#define LED9_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_13_pin_7_HSIOM
|
||||
#define ioss_0_port_13_pin_7_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define LED9_HSIOM ioss_0_port_13_pin_7_HSIOM
|
||||
#define LED9_IRQ ioss_interrupts_gpio_13_IRQn
|
||||
#define ioss_0_port_14_pin_0_PORT GPIO_PRT14
|
||||
#define ioss_0_port_14_pin_0_PIN 0U
|
||||
#define ioss_0_port_14_pin_0_NUM 0U
|
||||
#define ioss_0_port_14_pin_0_DRIVEMODE CY_GPIO_DM_ANALOG
|
||||
#define ioss_0_port_14_pin_0_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_14_pin_0_HSIOM
|
||||
#define ioss_0_port_14_pin_0_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define ioss_0_port_14_pin_0_IRQ ioss_interrupts_gpio_14_IRQn
|
||||
#define ioss_0_port_14_pin_1_PORT GPIO_PRT14
|
||||
#define ioss_0_port_14_pin_1_PIN 1U
|
||||
#define ioss_0_port_14_pin_1_NUM 1U
|
||||
#define ioss_0_port_14_pin_1_DRIVEMODE CY_GPIO_DM_ANALOG
|
||||
#define ioss_0_port_14_pin_1_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_14_pin_1_HSIOM
|
||||
#define ioss_0_port_14_pin_1_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define ioss_0_port_14_pin_1_IRQ ioss_interrupts_gpio_14_IRQn
|
||||
#define CSD_TX_PORT GPIO_PRT1
|
||||
#define CSD_TX_PIN 0U
|
||||
#define CSD_TX_NUM 0U
|
||||
#define CSD_TX_DRIVEMODE CY_GPIO_DM_ANALOG
|
||||
#define CSD_TX_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_1_pin_0_HSIOM
|
||||
#define ioss_0_port_1_pin_0_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define CSD_TX_HSIOM ioss_0_port_1_pin_0_HSIOM
|
||||
#define CSD_TX_IRQ ioss_interrupts_gpio_1_IRQn
|
||||
#define LED_GREEN_PORT GPIO_PRT1
|
||||
#define LED_GREEN_PIN 1U
|
||||
#define LED_GREEN_NUM 1U
|
||||
#define LED_GREEN_DRIVEMODE CY_GPIO_DM_STRONG_IN_OFF
|
||||
#define LED_GREEN_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_1_pin_1_HSIOM
|
||||
#define ioss_0_port_1_pin_1_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define LED_GREEN_HSIOM ioss_0_port_1_pin_1_HSIOM
|
||||
#define LED_GREEN_IRQ ioss_interrupts_gpio_1_IRQn
|
||||
#define LED8_PORT GPIO_PRT1
|
||||
#define LED8_PIN 5U
|
||||
#define LED8_NUM 5U
|
||||
#define LED8_DRIVEMODE CY_GPIO_DM_STRONG_IN_OFF
|
||||
#define LED8_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_1_pin_5_HSIOM
|
||||
#define ioss_0_port_1_pin_5_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define LED8_HSIOM ioss_0_port_1_pin_5_HSIOM
|
||||
#define LED8_IRQ ioss_interrupts_gpio_1_IRQn
|
||||
#define SDHC0_DAT0_PORT GPIO_PRT2
|
||||
#define SDHC0_DAT0_PIN 0U
|
||||
#define SDHC0_DAT0_NUM 0U
|
||||
#define SDHC0_DAT0_DRIVEMODE CY_GPIO_DM_STRONG
|
||||
#define SDHC0_DAT0_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_2_pin_0_HSIOM
|
||||
#define ioss_0_port_2_pin_0_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define SDHC0_DAT0_HSIOM ioss_0_port_2_pin_0_HSIOM
|
||||
#define SDHC0_DAT0_IRQ ioss_interrupts_gpio_2_IRQn
|
||||
#define SDHC0_DAT1_PORT GPIO_PRT2
|
||||
#define SDHC0_DAT1_PIN 1U
|
||||
#define SDHC0_DAT1_NUM 1U
|
||||
#define SDHC0_DAT1_DRIVEMODE CY_GPIO_DM_STRONG
|
||||
#define SDHC0_DAT1_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_2_pin_1_HSIOM
|
||||
#define ioss_0_port_2_pin_1_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define SDHC0_DAT1_HSIOM ioss_0_port_2_pin_1_HSIOM
|
||||
#define SDHC0_DAT1_IRQ ioss_interrupts_gpio_2_IRQn
|
||||
#define SDHC0_DAT2_PORT GPIO_PRT2
|
||||
#define SDHC0_DAT2_PIN 2U
|
||||
#define SDHC0_DAT2_NUM 2U
|
||||
#define SDHC0_DAT2_DRIVEMODE CY_GPIO_DM_STRONG
|
||||
#define SDHC0_DAT2_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_2_pin_2_HSIOM
|
||||
#define ioss_0_port_2_pin_2_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define SDHC0_DAT2_HSIOM ioss_0_port_2_pin_2_HSIOM
|
||||
#define SDHC0_DAT2_IRQ ioss_interrupts_gpio_2_IRQn
|
||||
#define SDHC0_DAT3_PORT GPIO_PRT2
|
||||
#define SDHC0_DAT3_PIN 3U
|
||||
#define SDHC0_DAT3_NUM 3U
|
||||
#define SDHC0_DAT3_DRIVEMODE CY_GPIO_DM_STRONG
|
||||
#define SDHC0_DAT3_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_2_pin_3_HSIOM
|
||||
#define ioss_0_port_2_pin_3_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define SDHC0_DAT3_HSIOM ioss_0_port_2_pin_3_HSIOM
|
||||
#define SDHC0_DAT3_IRQ ioss_interrupts_gpio_2_IRQn
|
||||
#define SDHC0_CMD_PORT GPIO_PRT2
|
||||
#define SDHC0_CMD_PIN 4U
|
||||
#define SDHC0_CMD_NUM 4U
|
||||
#define SDHC0_CMD_DRIVEMODE CY_GPIO_DM_STRONG
|
||||
#define SDHC0_CMD_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_2_pin_4_HSIOM
|
||||
#define ioss_0_port_2_pin_4_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define SDHC0_CMD_HSIOM ioss_0_port_2_pin_4_HSIOM
|
||||
#define SDHC0_CMD_IRQ ioss_interrupts_gpio_2_IRQn
|
||||
#define SDHC0_CLK_PORT GPIO_PRT2
|
||||
#define SDHC0_CLK_PIN 5U
|
||||
#define SDHC0_CLK_NUM 5U
|
||||
#define SDHC0_CLK_DRIVEMODE CY_GPIO_DM_STRONG
|
||||
#define SDHC0_CLK_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_2_pin_5_HSIOM
|
||||
#define ioss_0_port_2_pin_5_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define SDHC0_CLK_HSIOM ioss_0_port_2_pin_5_HSIOM
|
||||
#define SDHC0_CLK_IRQ ioss_interrupts_gpio_2_IRQn
|
||||
#define ENABLE_WIFI_PORT GPIO_PRT2
|
||||
#define ENABLE_WIFI_PIN 6U
|
||||
#define ENABLE_WIFI_NUM 6U
|
||||
#define ENABLE_WIFI_DRIVEMODE CY_GPIO_DM_STRONG_IN_OFF
|
||||
#define ENABLE_WIFI_INIT_DRIVESTATE 0
|
||||
#ifndef ioss_0_port_2_pin_6_HSIOM
|
||||
#define ioss_0_port_2_pin_6_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define ENABLE_WIFI_HSIOM ioss_0_port_2_pin_6_HSIOM
|
||||
#define ENABLE_WIFI_IRQ ioss_interrupts_gpio_2_IRQn
|
||||
#define BT_UART_RX_PORT GPIO_PRT3
|
||||
#define BT_UART_RX_PIN 0U
|
||||
#define BT_UART_RX_NUM 0U
|
||||
#define BT_UART_RX_DRIVEMODE CY_GPIO_DM_HIGHZ
|
||||
#define BT_UART_RX_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_3_pin_0_HSIOM
|
||||
#define ioss_0_port_3_pin_0_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define BT_UART_RX_HSIOM ioss_0_port_3_pin_0_HSIOM
|
||||
#define BT_UART_RX_IRQ ioss_interrupts_gpio_3_IRQn
|
||||
#define BT_UART_TX_PORT GPIO_PRT3
|
||||
#define BT_UART_TX_PIN 1U
|
||||
#define BT_UART_TX_NUM 1U
|
||||
#define BT_UART_TX_DRIVEMODE CY_GPIO_DM_STRONG_IN_OFF
|
||||
#define BT_UART_TX_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_3_pin_1_HSIOM
|
||||
#define ioss_0_port_3_pin_1_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define BT_UART_TX_HSIOM ioss_0_port_3_pin_1_HSIOM
|
||||
#define BT_UART_TX_IRQ ioss_interrupts_gpio_3_IRQn
|
||||
#define BT_UART_RTS_PORT GPIO_PRT3
|
||||
#define BT_UART_RTS_PIN 2U
|
||||
#define BT_UART_RTS_NUM 2U
|
||||
#define BT_UART_RTS_DRIVEMODE CY_GPIO_DM_STRONG_IN_OFF
|
||||
#define BT_UART_RTS_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_3_pin_2_HSIOM
|
||||
#define ioss_0_port_3_pin_2_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define BT_UART_RTS_HSIOM ioss_0_port_3_pin_2_HSIOM
|
||||
#define BT_UART_RTS_IRQ ioss_interrupts_gpio_3_IRQn
|
||||
#define BT_UART_CTS_PORT GPIO_PRT3
|
||||
#define BT_UART_CTS_PIN 3U
|
||||
#define BT_UART_CTS_NUM 3U
|
||||
#define BT_UART_CTS_DRIVEMODE CY_GPIO_DM_HIGHZ
|
||||
#define BT_UART_CTS_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_3_pin_3_HSIOM
|
||||
#define ioss_0_port_3_pin_3_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define BT_UART_CTS_HSIOM ioss_0_port_3_pin_3_HSIOM
|
||||
#define BT_UART_CTS_IRQ ioss_interrupts_gpio_3_IRQn
|
||||
#define BT_POWER_PORT GPIO_PRT3
|
||||
#define BT_POWER_PIN 4U
|
||||
#define BT_POWER_NUM 4U
|
||||
#define BT_POWER_DRIVEMODE CY_GPIO_DM_OD_DRIVESHIGH_IN_OFF
|
||||
#define BT_POWER_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_3_pin_4_HSIOM
|
||||
#define ioss_0_port_3_pin_4_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define BT_POWER_HSIOM ioss_0_port_3_pin_4_HSIOM
|
||||
#define BT_POWER_IRQ ioss_interrupts_gpio_3_IRQn
|
||||
#define BT_HOST_WAKE_PORT GPIO_PRT3
|
||||
#define BT_HOST_WAKE_PIN 5U
|
||||
#define BT_HOST_WAKE_NUM 5U
|
||||
#define BT_HOST_WAKE_DRIVEMODE CY_GPIO_DM_ANALOG
|
||||
#define BT_HOST_WAKE_INIT_DRIVESTATE 0
|
||||
#ifndef ioss_0_port_3_pin_5_HSIOM
|
||||
#define ioss_0_port_3_pin_5_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define BT_HOST_WAKE_HSIOM ioss_0_port_3_pin_5_HSIOM
|
||||
#define BT_HOST_WAKE_IRQ ioss_interrupts_gpio_3_IRQn
|
||||
#define BT_DEVICE_WAKE_PORT GPIO_PRT4
|
||||
#define BT_DEVICE_WAKE_PIN 0U
|
||||
#define BT_DEVICE_WAKE_NUM 0U
|
||||
#define BT_DEVICE_WAKE_DRIVEMODE CY_GPIO_DM_STRONG_IN_OFF
|
||||
#define BT_DEVICE_WAKE_INIT_DRIVESTATE 0
|
||||
#ifndef ioss_0_port_4_pin_0_HSIOM
|
||||
#define ioss_0_port_4_pin_0_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define BT_DEVICE_WAKE_HSIOM ioss_0_port_4_pin_0_HSIOM
|
||||
#define BT_DEVICE_WAKE_IRQ ioss_interrupts_gpio_4_IRQn
|
||||
#define UART_RX_PORT GPIO_PRT5
|
||||
#define UART_RX_PIN 0U
|
||||
#define UART_RX_NUM 0U
|
||||
#define UART_RX_DRIVEMODE CY_GPIO_DM_HIGHZ
|
||||
#define UART_RX_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_5_pin_0_HSIOM
|
||||
#define ioss_0_port_5_pin_0_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define UART_RX_HSIOM ioss_0_port_5_pin_0_HSIOM
|
||||
#define UART_RX_IRQ ioss_interrupts_gpio_5_IRQn
|
||||
#define UART_TX_PORT GPIO_PRT5
|
||||
#define UART_TX_PIN 1U
|
||||
#define UART_TX_NUM 1U
|
||||
#define UART_TX_DRIVEMODE CY_GPIO_DM_STRONG_IN_OFF
|
||||
#define UART_TX_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_5_pin_1_HSIOM
|
||||
#define ioss_0_port_5_pin_1_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define UART_TX_HSIOM ioss_0_port_5_pin_1_HSIOM
|
||||
#define UART_TX_IRQ ioss_interrupts_gpio_5_IRQn
|
||||
#define EZI2C_SCL_PORT GPIO_PRT6
|
||||
#define EZI2C_SCL_PIN 0U
|
||||
#define EZI2C_SCL_NUM 0U
|
||||
#define EZI2C_SCL_DRIVEMODE CY_GPIO_DM_OD_DRIVESLOW
|
||||
#define EZI2C_SCL_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_6_pin_0_HSIOM
|
||||
#define ioss_0_port_6_pin_0_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define EZI2C_SCL_HSIOM ioss_0_port_6_pin_0_HSIOM
|
||||
#define EZI2C_SCL_IRQ ioss_interrupts_gpio_6_IRQn
|
||||
#define EZI2C_SDA_PORT GPIO_PRT6
|
||||
#define EZI2C_SDA_PIN 1U
|
||||
#define EZI2C_SDA_NUM 1U
|
||||
#define EZI2C_SDA_DRIVEMODE CY_GPIO_DM_OD_DRIVESLOW
|
||||
#define EZI2C_SDA_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_6_pin_1_HSIOM
|
||||
#define ioss_0_port_6_pin_1_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define EZI2C_SDA_HSIOM ioss_0_port_6_pin_1_HSIOM
|
||||
#define EZI2C_SDA_IRQ ioss_interrupts_gpio_6_IRQn
|
||||
#define SWO_PORT GPIO_PRT6
|
||||
#define SWO_PIN 4U
|
||||
#define SWO_NUM 4U
|
||||
#define SWO_DRIVEMODE CY_GPIO_DM_STRONG_IN_OFF
|
||||
#define SWO_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_6_pin_4_HSIOM
|
||||
#define ioss_0_port_6_pin_4_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define SWO_HSIOM ioss_0_port_6_pin_4_HSIOM
|
||||
#define SWO_IRQ ioss_interrupts_gpio_6_IRQn
|
||||
#define SWDIO_PORT GPIO_PRT6
|
||||
#define SWDIO_PIN 6U
|
||||
#define SWDIO_NUM 6U
|
||||
#define SWDIO_DRIVEMODE CY_GPIO_DM_PULLUP
|
||||
#define SWDIO_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_6_pin_6_HSIOM
|
||||
#define ioss_0_port_6_pin_6_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define SWDIO_HSIOM ioss_0_port_6_pin_6_HSIOM
|
||||
#define SWDIO_IRQ ioss_interrupts_gpio_6_IRQn
|
||||
#define SWDCK_PORT GPIO_PRT6
|
||||
#define SWDCK_PIN 7U
|
||||
#define SWDCK_NUM 7U
|
||||
#define SWDCK_DRIVEMODE CY_GPIO_DM_PULLDOWN
|
||||
#define SWDCK_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_6_pin_7_HSIOM
|
||||
#define ioss_0_port_6_pin_7_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define SWDCK_HSIOM ioss_0_port_6_pin_7_HSIOM
|
||||
#define SWDCK_IRQ ioss_interrupts_gpio_6_IRQn
|
||||
#define CINA_PORT GPIO_PRT7
|
||||
#define CINA_PIN 1U
|
||||
#define CINA_NUM 1U
|
||||
#define CINA_DRIVEMODE CY_GPIO_DM_ANALOG
|
||||
#define CINA_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_7_pin_1_HSIOM
|
||||
#define ioss_0_port_7_pin_1_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define CINA_HSIOM ioss_0_port_7_pin_1_HSIOM
|
||||
#define CINA_IRQ ioss_interrupts_gpio_7_IRQn
|
||||
#define CINB_PORT GPIO_PRT7
|
||||
#define CINB_PIN 2U
|
||||
#define CINB_NUM 2U
|
||||
#define CINB_DRIVEMODE CY_GPIO_DM_ANALOG
|
||||
#define CINB_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_7_pin_2_HSIOM
|
||||
#define ioss_0_port_7_pin_2_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define CINB_HSIOM ioss_0_port_7_pin_2_HSIOM
|
||||
#define CINB_IRQ ioss_interrupts_gpio_7_IRQn
|
||||
#define CMOD_PORT GPIO_PRT7
|
||||
#define CMOD_PIN 7U
|
||||
#define CMOD_NUM 7U
|
||||
#define CMOD_DRIVEMODE CY_GPIO_DM_ANALOG
|
||||
#define CMOD_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_7_pin_7_HSIOM
|
||||
#define ioss_0_port_7_pin_7_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define CMOD_HSIOM ioss_0_port_7_pin_7_HSIOM
|
||||
#define CMOD_IRQ ioss_interrupts_gpio_7_IRQn
|
||||
#define CSD_BTN0_PORT GPIO_PRT8
|
||||
#define CSD_BTN0_PIN 1U
|
||||
#define CSD_BTN0_NUM 1U
|
||||
#define CSD_BTN0_DRIVEMODE CY_GPIO_DM_ANALOG
|
||||
#define CSD_BTN0_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_8_pin_1_HSIOM
|
||||
#define ioss_0_port_8_pin_1_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define CSD_BTN0_HSIOM ioss_0_port_8_pin_1_HSIOM
|
||||
#define CSD_BTN0_IRQ ioss_interrupts_gpio_8_IRQn
|
||||
#define CSD_BTN1_PORT GPIO_PRT8
|
||||
#define CSD_BTN1_PIN 2U
|
||||
#define CSD_BTN1_NUM 2U
|
||||
#define CSD_BTN1_DRIVEMODE CY_GPIO_DM_ANALOG
|
||||
#define CSD_BTN1_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_8_pin_2_HSIOM
|
||||
#define ioss_0_port_8_pin_2_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define CSD_BTN1_HSIOM ioss_0_port_8_pin_2_HSIOM
|
||||
#define CSD_BTN1_IRQ ioss_interrupts_gpio_8_IRQn
|
||||
#define CSD_SLD0_PORT GPIO_PRT8
|
||||
#define CSD_SLD0_PIN 3U
|
||||
#define CSD_SLD0_NUM 3U
|
||||
#define CSD_SLD0_DRIVEMODE CY_GPIO_DM_ANALOG
|
||||
#define CSD_SLD0_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_8_pin_3_HSIOM
|
||||
#define ioss_0_port_8_pin_3_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define CSD_SLD0_HSIOM ioss_0_port_8_pin_3_HSIOM
|
||||
#define CSD_SLD0_IRQ ioss_interrupts_gpio_8_IRQn
|
||||
#define CSD_SLD1_PORT GPIO_PRT8
|
||||
#define CSD_SLD1_PIN 4U
|
||||
#define CSD_SLD1_NUM 4U
|
||||
#define CSD_SLD1_DRIVEMODE CY_GPIO_DM_ANALOG
|
||||
#define CSD_SLD1_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_8_pin_4_HSIOM
|
||||
#define ioss_0_port_8_pin_4_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define CSD_SLD1_HSIOM ioss_0_port_8_pin_4_HSIOM
|
||||
#define CSD_SLD1_IRQ ioss_interrupts_gpio_8_IRQn
|
||||
#define CSD_SLD2_PORT GPIO_PRT8
|
||||
#define CSD_SLD2_PIN 5U
|
||||
#define CSD_SLD2_NUM 5U
|
||||
#define CSD_SLD2_DRIVEMODE CY_GPIO_DM_ANALOG
|
||||
#define CSD_SLD2_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_8_pin_5_HSIOM
|
||||
#define ioss_0_port_8_pin_5_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define CSD_SLD2_HSIOM ioss_0_port_8_pin_5_HSIOM
|
||||
#define CSD_SLD2_IRQ ioss_interrupts_gpio_8_IRQn
|
||||
#define CSD_SLD3_PORT GPIO_PRT8
|
||||
#define CSD_SLD3_PIN 6U
|
||||
#define CSD_SLD3_NUM 6U
|
||||
#define CSD_SLD3_DRIVEMODE CY_GPIO_DM_ANALOG
|
||||
#define CSD_SLD3_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_8_pin_6_HSIOM
|
||||
#define ioss_0_port_8_pin_6_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define CSD_SLD3_HSIOM ioss_0_port_8_pin_6_HSIOM
|
||||
#define CSD_SLD3_IRQ ioss_interrupts_gpio_8_IRQn
|
||||
#define CSD_SLD4_PORT GPIO_PRT8
|
||||
#define CSD_SLD4_PIN 7U
|
||||
#define CSD_SLD4_NUM 7U
|
||||
#define CSD_SLD4_DRIVEMODE CY_GPIO_DM_ANALOG
|
||||
#define CSD_SLD4_INIT_DRIVESTATE 1
|
||||
#ifndef ioss_0_port_8_pin_7_HSIOM
|
||||
#define ioss_0_port_8_pin_7_HSIOM HSIOM_SEL_GPIO
|
||||
#endif
|
||||
#define CSD_SLD4_HSIOM ioss_0_port_8_pin_7_HSIOM
|
||||
#define CSD_SLD4_IRQ ioss_interrupts_gpio_8_IRQn
|
||||
|
||||
extern const cy_stc_gpio_pin_config_t WCO_IN_config;
|
||||
extern const cy_stc_gpio_pin_config_t WCO_OUT_config;
|
||||
extern const cy_stc_gpio_pin_config_t LED_RED_config;
|
||||
extern const cy_stc_gpio_pin_config_t SW2_config;
|
||||
extern const cy_stc_gpio_pin_config_t LED_BLUE_config;
|
||||
extern const cy_stc_gpio_pin_config_t QSPI_SS0_config;
|
||||
extern const cy_stc_gpio_pin_config_t QSPI_DATA3_config;
|
||||
extern const cy_stc_gpio_pin_config_t QSPI_DATA2_config;
|
||||
extern const cy_stc_gpio_pin_config_t QSPI_DATA1_config;
|
||||
extern const cy_stc_gpio_pin_config_t QSPI_DATA0_config;
|
||||
extern const cy_stc_gpio_pin_config_t QSPI_SPI_CLOCK_config;
|
||||
extern const cy_stc_gpio_pin_config_t LED9_config;
|
||||
extern const cy_stc_gpio_pin_config_t ioss_0_port_14_pin_0_config;
|
||||
extern const cy_stc_gpio_pin_config_t ioss_0_port_14_pin_1_config;
|
||||
extern const cy_stc_gpio_pin_config_t CSD_TX_config;
|
||||
extern const cy_stc_gpio_pin_config_t LED_GREEN_config;
|
||||
extern const cy_stc_gpio_pin_config_t LED8_config;
|
||||
extern const cy_stc_gpio_pin_config_t SDHC0_DAT0_config;
|
||||
extern const cy_stc_gpio_pin_config_t SDHC0_DAT1_config;
|
||||
extern const cy_stc_gpio_pin_config_t SDHC0_DAT2_config;
|
||||
extern const cy_stc_gpio_pin_config_t SDHC0_DAT3_config;
|
||||
extern const cy_stc_gpio_pin_config_t SDHC0_CMD_config;
|
||||
extern const cy_stc_gpio_pin_config_t SDHC0_CLK_config;
|
||||
extern const cy_stc_gpio_pin_config_t ENABLE_WIFI_config;
|
||||
extern const cy_stc_gpio_pin_config_t BT_UART_RX_config;
|
||||
extern const cy_stc_gpio_pin_config_t BT_UART_TX_config;
|
||||
extern const cy_stc_gpio_pin_config_t BT_UART_RTS_config;
|
||||
extern const cy_stc_gpio_pin_config_t BT_UART_CTS_config;
|
||||
extern const cy_stc_gpio_pin_config_t BT_POWER_config;
|
||||
extern const cy_stc_gpio_pin_config_t BT_HOST_WAKE_config;
|
||||
extern const cy_stc_gpio_pin_config_t BT_DEVICE_WAKE_config;
|
||||
extern const cy_stc_gpio_pin_config_t UART_RX_config;
|
||||
extern const cy_stc_gpio_pin_config_t UART_TX_config;
|
||||
extern const cy_stc_gpio_pin_config_t EZI2C_SCL_config;
|
||||
extern const cy_stc_gpio_pin_config_t EZI2C_SDA_config;
|
||||
extern const cy_stc_gpio_pin_config_t SWO_config;
|
||||
extern const cy_stc_gpio_pin_config_t SWDIO_config;
|
||||
extern const cy_stc_gpio_pin_config_t SWDCK_config;
|
||||
extern const cy_stc_gpio_pin_config_t CINA_config;
|
||||
extern const cy_stc_gpio_pin_config_t CINB_config;
|
||||
extern const cy_stc_gpio_pin_config_t CMOD_config;
|
||||
extern const cy_stc_gpio_pin_config_t CSD_BTN0_config;
|
||||
extern const cy_stc_gpio_pin_config_t CSD_BTN1_config;
|
||||
extern const cy_stc_gpio_pin_config_t CSD_SLD0_config;
|
||||
extern const cy_stc_gpio_pin_config_t CSD_SLD1_config;
|
||||
extern const cy_stc_gpio_pin_config_t CSD_SLD2_config;
|
||||
extern const cy_stc_gpio_pin_config_t CSD_SLD3_config;
|
||||
extern const cy_stc_gpio_pin_config_t CSD_SLD4_config;
|
||||
|
||||
void init_cycfg_pins(void);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* CYCFG_PINS_H */
|
|
@ -1,567 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* File Name: cycfg_platform.c
|
||||
*
|
||||
* Description:
|
||||
* Platform configuration
|
||||
* This file was automatically generated and should not be modified.
|
||||
*
|
||||
********************************************************************************
|
||||
* Copyright 2017-2019 Cypress Semiconductor Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
********************************************************************************/
|
||||
|
||||
#include "cycfg_platform.h"
|
||||
|
||||
#define CY_CFG_SYSCLK_ECO_ERROR 1
|
||||
#define CY_CFG_SYSCLK_ALTHF_ERROR 2
|
||||
#define CY_CFG_SYSCLK_PLL_ERROR 3
|
||||
#define CY_CFG_SYSCLK_FLL_ERROR 4
|
||||
#define CY_CFG_SYSCLK_WCO_ERROR 5
|
||||
#define CY_CFG_SYSCLK_PLL1_AVAILABLE 1
|
||||
#define CY_CFG_SYSCLK_CLKALTSYSTICK_ENABLED 1
|
||||
#define CY_CFG_SYSCLK_CLKBAK_ENABLED 1
|
||||
#define CY_CFG_SYSCLK_CLKFAST_ENABLED 1
|
||||
#define CY_CFG_SYSCLK_FLL_ENABLED 1
|
||||
#define CY_CFG_SYSCLK_CLKHF0_ENABLED 1
|
||||
#define CY_CFG_SYSCLK_CLKHF0_FREQ_MHZ 100UL
|
||||
#define CY_CFG_SYSCLK_CLKHF0_CLKPATH CY_SYSCLK_CLKHF_IN_CLKPATH0
|
||||
#define CY_CFG_SYSCLK_CLKHF1_ENABLED 1
|
||||
#define CY_CFG_SYSCLK_CLKHF1_FREQ_MHZ 48UL
|
||||
#define CY_CFG_SYSCLK_CLKHF1_CLKPATH CY_SYSCLK_CLKHF_IN_CLKPATH1
|
||||
#define CY_CFG_SYSCLK_CLKHF2_ENABLED 1
|
||||
#define CY_CFG_SYSCLK_CLKHF2_FREQ_MHZ 50UL
|
||||
#define CY_CFG_SYSCLK_CLKHF2_CLKPATH CY_SYSCLK_CLKHF_IN_CLKPATH0
|
||||
#define CY_CFG_SYSCLK_CLKHF3_ENABLED 1
|
||||
#define CY_CFG_SYSCLK_CLKHF3_FREQ_MHZ 48UL
|
||||
#define CY_CFG_SYSCLK_CLKHF3_CLKPATH CY_SYSCLK_CLKHF_IN_CLKPATH1
|
||||
#define CY_CFG_SYSCLK_CLKHF4_ENABLED 1
|
||||
#define CY_CFG_SYSCLK_CLKHF4_FREQ_MHZ 100UL
|
||||
#define CY_CFG_SYSCLK_CLKHF4_CLKPATH CY_SYSCLK_CLKHF_IN_CLKPATH0
|
||||
#define CY_CFG_SYSCLK_ILO_ENABLED 1
|
||||
#define CY_CFG_SYSCLK_IMO_ENABLED 1
|
||||
#define CY_CFG_SYSCLK_CLKLF_ENABLED 1
|
||||
#define CY_CFG_SYSCLK_CLKPATH0_ENABLED 1
|
||||
#define CY_CFG_SYSCLK_CLKPATH0_SOURCE CY_SYSCLK_CLKPATH_IN_IMO
|
||||
#define CY_CFG_SYSCLK_CLKPATH1_ENABLED 1
|
||||
#define CY_CFG_SYSCLK_CLKPATH1_SOURCE CY_SYSCLK_CLKPATH_IN_IMO
|
||||
#define CY_CFG_SYSCLK_CLKPATH2_ENABLED 1
|
||||
#define CY_CFG_SYSCLK_CLKPATH2_SOURCE CY_SYSCLK_CLKPATH_IN_IMO
|
||||
#define CY_CFG_SYSCLK_CLKPATH3_ENABLED 1
|
||||
#define CY_CFG_SYSCLK_CLKPATH3_SOURCE CY_SYSCLK_CLKPATH_IN_IMO
|
||||
#define CY_CFG_SYSCLK_CLKPATH4_ENABLED 1
|
||||
#define CY_CFG_SYSCLK_CLKPATH4_SOURCE CY_SYSCLK_CLKPATH_IN_IMO
|
||||
#define CY_CFG_SYSCLK_CLKPERI_ENABLED 1
|
||||
#define CY_CFG_SYSCLK_PLL0_ENABLED 1
|
||||
#define CY_CFG_SYSCLK_CLKSLOW_ENABLED 1
|
||||
#define CY_CFG_SYSCLK_CLKTIMER_ENABLED 1
|
||||
#define CY_CFG_SYSCLK_WCO_ENABLED 1
|
||||
#define CY_CFG_PWR_ENABLED 1
|
||||
#define CY_CFG_PWR_USING_LDO 1
|
||||
#define CY_CFG_PWR_USING_PMIC 0
|
||||
#define CY_CFG_PWR_VBAC_SUPPLY CY_CFG_PWR_VBAC_SUPPLY_VDD
|
||||
#define CY_CFG_PWR_LDO_VOLTAGE CY_SYSPM_LDO_VOLTAGE_1_1V
|
||||
#define CY_CFG_PWR_USING_ULP 0
|
||||
|
||||
static const cy_stc_fll_manual_config_t srss_0_clock_0_fll_0_fllConfig =
|
||||
{
|
||||
.fllMult = 500U,
|
||||
.refDiv = 20U,
|
||||
.ccoRange = CY_SYSCLK_FLL_CCO_RANGE4,
|
||||
.enableOutputDiv = true,
|
||||
.lockTolerance = 4U,
|
||||
.igain = 9U,
|
||||
.pgain = 5U,
|
||||
.settlingCount = 8U,
|
||||
.outputMode = CY_SYSCLK_FLLPLL_OUTPUT_OUTPUT,
|
||||
.cco_Freq = 355U,
|
||||
};
|
||||
static const cy_stc_pll_manual_config_t srss_0_clock_0_pll_0_pllConfig =
|
||||
{
|
||||
.feedbackDiv = 30,
|
||||
.referenceDiv = 1,
|
||||
.outputDiv = 5,
|
||||
.lfMode = false,
|
||||
.outputMode = CY_SYSCLK_FLLPLL_OUTPUT_AUTO,
|
||||
};
|
||||
|
||||
__WEAK void cycfg_ClockStartupError(uint32_t error)
|
||||
{
|
||||
(void)error; /* Suppress the compiler warning */
|
||||
while(1);
|
||||
}
|
||||
__STATIC_INLINE void Cy_SysClk_ClkAltSysTickInit()
|
||||
{
|
||||
Cy_SysTick_SetClockSource(CY_SYSTICK_CLOCK_SOURCE_CLK_LF);
|
||||
}
|
||||
__STATIC_INLINE void Cy_SysClk_ClkBakInit()
|
||||
{
|
||||
Cy_SysClk_ClkBakSetSource(CY_SYSCLK_BAK_IN_WCO);
|
||||
}
|
||||
__STATIC_INLINE void Cy_SysClk_ClkFastInit()
|
||||
{
|
||||
Cy_SysClk_ClkFastSetDivider(0U);
|
||||
}
|
||||
__STATIC_INLINE void Cy_SysClk_FllInit()
|
||||
{
|
||||
if (CY_SYSCLK_SUCCESS != Cy_SysClk_FllManualConfigure(&srss_0_clock_0_fll_0_fllConfig))
|
||||
{
|
||||
cycfg_ClockStartupError(CY_CFG_SYSCLK_FLL_ERROR);
|
||||
}
|
||||
if (CY_SYSCLK_SUCCESS != Cy_SysClk_FllEnable(200000UL))
|
||||
{
|
||||
cycfg_ClockStartupError(CY_CFG_SYSCLK_FLL_ERROR);
|
||||
}
|
||||
}
|
||||
__STATIC_INLINE void Cy_SysClk_ClkHf0Init()
|
||||
{
|
||||
Cy_SysClk_ClkHfSetSource(0U, CY_CFG_SYSCLK_CLKHF0_CLKPATH);
|
||||
Cy_SysClk_ClkHfSetDivider(0U, CY_SYSCLK_CLKHF_NO_DIVIDE);
|
||||
}
|
||||
__STATIC_INLINE void Cy_SysClk_ClkHf1Init()
|
||||
{
|
||||
Cy_SysClk_ClkHfSetSource(1U, CY_CFG_SYSCLK_CLKHF1_CLKPATH);
|
||||
Cy_SysClk_ClkHfSetDivider(1U, CY_SYSCLK_CLKHF_NO_DIVIDE);
|
||||
Cy_SysClk_ClkHfEnable(1U);
|
||||
}
|
||||
__STATIC_INLINE void Cy_SysClk_ClkHf2Init()
|
||||
{
|
||||
Cy_SysClk_ClkHfSetSource(2U, CY_CFG_SYSCLK_CLKHF2_CLKPATH);
|
||||
Cy_SysClk_ClkHfSetDivider(2U, CY_SYSCLK_CLKHF_DIVIDE_BY_2);
|
||||
Cy_SysClk_ClkHfEnable(2U);
|
||||
}
|
||||
__STATIC_INLINE void Cy_SysClk_ClkHf3Init()
|
||||
{
|
||||
Cy_SysClk_ClkHfSetSource(3U, CY_CFG_SYSCLK_CLKHF3_CLKPATH);
|
||||
Cy_SysClk_ClkHfSetDivider(3U, CY_SYSCLK_CLKHF_NO_DIVIDE);
|
||||
Cy_SysClk_ClkHfEnable(3U);
|
||||
}
|
||||
__STATIC_INLINE void Cy_SysClk_ClkHf4Init()
|
||||
{
|
||||
Cy_SysClk_ClkHfSetSource(4U, CY_CFG_SYSCLK_CLKHF4_CLKPATH);
|
||||
Cy_SysClk_ClkHfSetDivider(4U, CY_SYSCLK_CLKHF_NO_DIVIDE);
|
||||
Cy_SysClk_ClkHfEnable(4U);
|
||||
}
|
||||
__STATIC_INLINE void Cy_SysClk_IloInit()
|
||||
{
|
||||
/* The WDT is unlocked in the default startup code */
|
||||
Cy_SysClk_IloEnable();
|
||||
Cy_SysClk_IloHibernateOn(true);
|
||||
}
|
||||
__STATIC_INLINE void Cy_SysClk_ClkLfInit()
|
||||
{
|
||||
/* The WDT is unlocked in the default startup code */
|
||||
Cy_SysClk_ClkLfSetSource(CY_SYSCLK_CLKLF_IN_WCO);
|
||||
}
|
||||
__STATIC_INLINE void Cy_SysClk_ClkPath0Init()
|
||||
{
|
||||
Cy_SysClk_ClkPathSetSource(0U, CY_CFG_SYSCLK_CLKPATH0_SOURCE);
|
||||
}
|
||||
__STATIC_INLINE void Cy_SysClk_ClkPath1Init()
|
||||
{
|
||||
Cy_SysClk_ClkPathSetSource(1U, CY_CFG_SYSCLK_CLKPATH1_SOURCE);
|
||||
}
|
||||
__STATIC_INLINE void Cy_SysClk_ClkPath2Init()
|
||||
{
|
||||
Cy_SysClk_ClkPathSetSource(2U, CY_CFG_SYSCLK_CLKPATH2_SOURCE);
|
||||
}
|
||||
__STATIC_INLINE void Cy_SysClk_ClkPath3Init()
|
||||
{
|
||||
Cy_SysClk_ClkPathSetSource(3U, CY_CFG_SYSCLK_CLKPATH3_SOURCE);
|
||||
}
|
||||
__STATIC_INLINE void Cy_SysClk_ClkPath4Init()
|
||||
{
|
||||
Cy_SysClk_ClkPathSetSource(4U, CY_CFG_SYSCLK_CLKPATH4_SOURCE);
|
||||
}
|
||||
__STATIC_INLINE void Cy_SysClk_ClkPeriInit()
|
||||
{
|
||||
Cy_SysClk_ClkPeriSetDivider(0U);
|
||||
}
|
||||
__STATIC_INLINE void Cy_SysClk_Pll0Init()
|
||||
{
|
||||
if (CY_SYSCLK_SUCCESS != Cy_SysClk_PllManualConfigure(1U, &srss_0_clock_0_pll_0_pllConfig))
|
||||
{
|
||||
cycfg_ClockStartupError(CY_CFG_SYSCLK_PLL_ERROR);
|
||||
}
|
||||
if (CY_SYSCLK_SUCCESS != Cy_SysClk_PllEnable(1U, 10000u))
|
||||
{
|
||||
cycfg_ClockStartupError(CY_CFG_SYSCLK_PLL_ERROR);
|
||||
}
|
||||
}
|
||||
__STATIC_INLINE void Cy_SysClk_ClkSlowInit()
|
||||
{
|
||||
Cy_SysClk_ClkSlowSetDivider(0U);
|
||||
}
|
||||
__STATIC_INLINE void Cy_SysClk_ClkTimerInit()
|
||||
{
|
||||
Cy_SysClk_ClkTimerDisable();
|
||||
Cy_SysClk_ClkTimerSetSource(CY_SYSCLK_CLKTIMER_IN_IMO);
|
||||
Cy_SysClk_ClkTimerSetDivider(0U);
|
||||
Cy_SysClk_ClkTimerEnable();
|
||||
}
|
||||
__STATIC_INLINE void Cy_SysClk_WcoInit()
|
||||
{
|
||||
(void)Cy_GPIO_Pin_FastInit(GPIO_PRT0, 0U, 0x00U, 0x00U, HSIOM_SEL_GPIO);
|
||||
(void)Cy_GPIO_Pin_FastInit(GPIO_PRT0, 1U, 0x00U, 0x00U, HSIOM_SEL_GPIO);
|
||||
if (CY_SYSCLK_SUCCESS != Cy_SysClk_WcoEnable(1000000UL))
|
||||
{
|
||||
cycfg_ClockStartupError(CY_CFG_SYSCLK_WCO_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void init_cycfg_platform(void)
|
||||
{
|
||||
/* Set worst case memory wait states (! ultra low power, 150 MHz), will update at the end */
|
||||
Cy_SysLib_SetWaitStates(false, 150UL);
|
||||
#if (CY_CFG_PWR_VBAC_SUPPLY == CY_CFG_PWR_VBAC_SUPPLY_VDD)
|
||||
if (0u == Cy_SysLib_GetResetReason() /* POR, XRES, or BOD */)
|
||||
{
|
||||
Cy_SysLib_ResetBackupDomain();
|
||||
Cy_SysClk_IloDisable();
|
||||
Cy_SysClk_IloInit();
|
||||
}
|
||||
#endif
|
||||
#ifdef CY_CFG_PWR_ENABLED
|
||||
/* Configure power mode */
|
||||
#if CY_CFG_PWR_USING_LDO
|
||||
Cy_SysPm_LdoSetVoltage(CY_CFG_PWR_LDO_VOLTAGE);
|
||||
#else
|
||||
Cy_SysPm_BuckEnable(CY_CFG_PWR_BUCK_VOLTAGE);
|
||||
#endif
|
||||
/* Configure PMIC */
|
||||
Cy_SysPm_UnlockPmic();
|
||||
#if CY_CFG_PWR_USING_PMIC
|
||||
Cy_SysPm_PmicEnableOutput();
|
||||
#else
|
||||
Cy_SysPm_PmicDisableOutput();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Reset the core clock path to default and disable all the FLLs/PLLs */
|
||||
Cy_SysClk_ClkHfSetDivider(0U, CY_SYSCLK_CLKHF_NO_DIVIDE);
|
||||
Cy_SysClk_ClkFastSetDivider(0U);
|
||||
Cy_SysClk_ClkPeriSetDivider(1U);
|
||||
Cy_SysClk_ClkSlowSetDivider(0U);
|
||||
Cy_SysClk_PllDisable(CY_SYSCLK_CLKHF_IN_CLKPATH1);
|
||||
Cy_SysClk_ClkPathSetSource(CY_SYSCLK_CLKHF_IN_CLKPATH1, CY_SYSCLK_CLKPATH_IN_IMO);
|
||||
|
||||
if ((CY_SYSCLK_CLKHF_IN_CLKPATH0 == Cy_SysClk_ClkHfGetSource(0UL)) &&
|
||||
(CY_SYSCLK_CLKPATH_IN_WCO == Cy_SysClk_ClkPathGetSource(CY_SYSCLK_CLKHF_IN_CLKPATH0)))
|
||||
{
|
||||
Cy_SysClk_ClkHfSetSource(0U, CY_SYSCLK_CLKHF_IN_CLKPATH1);
|
||||
}
|
||||
|
||||
Cy_SysClk_FllDisable();
|
||||
Cy_SysClk_ClkPathSetSource(CY_SYSCLK_CLKHF_IN_CLKPATH0, CY_SYSCLK_CLKPATH_IN_IMO);
|
||||
Cy_SysClk_ClkHfSetSource(0UL, CY_SYSCLK_CLKHF_IN_CLKPATH0);
|
||||
#ifdef CY_IP_MXBLESS
|
||||
(void)Cy_BLE_EcoReset();
|
||||
#endif
|
||||
|
||||
#ifdef CY_CFG_SYSCLK_PLL1_AVAILABLE
|
||||
(void)Cy_SysClk_PllDisable(CY_SYSCLK_CLKHF_IN_CLKPATH2);
|
||||
#endif
|
||||
|
||||
#ifdef CY_CFG_SYSCLK_PLL2_AVAILABLE
|
||||
(void)Cy_SysClk_PllDisable(CY_SYSCLK_CLKHF_IN_CLKPATH3);
|
||||
#endif
|
||||
|
||||
#ifdef CY_CFG_SYSCLK_PLL3_AVAILABLE
|
||||
(void)Cy_SysClk_PllDisable(CY_SYSCLK_CLKHF_IN_CLKPATH4);
|
||||
#endif
|
||||
|
||||
#ifdef CY_CFG_SYSCLK_PLL4_AVAILABLE
|
||||
(void)Cy_SysClk_PllDisable(CY_SYSCLK_CLKHF_IN_CLKPATH5);
|
||||
#endif
|
||||
|
||||
#ifdef CY_CFG_SYSCLK_PLL5_AVAILABLE
|
||||
(void)Cy_SysClk_PllDisable(CY_SYSCLK_CLKHF_IN_CLKPATH6);
|
||||
#endif
|
||||
|
||||
#ifdef CY_CFG_SYSCLK_PLL6_AVAILABLE
|
||||
(void)Cy_SysClk_PllDisable(CY_SYSCLK_CLKHF_IN_CLKPATH7);
|
||||
#endif
|
||||
|
||||
#ifdef CY_CFG_SYSCLK_PLL7_AVAILABLE
|
||||
(void)Cy_SysClk_PllDisable(CY_SYSCLK_CLKHF_IN_CLKPATH8);
|
||||
#endif
|
||||
|
||||
#ifdef CY_CFG_SYSCLK_PLL8_AVAILABLE
|
||||
(void)Cy_SysClk_PllDisable(CY_SYSCLK_CLKHF_IN_CLKPATH9);
|
||||
#endif
|
||||
|
||||
#ifdef CY_CFG_SYSCLK_PLL9_AVAILABLE
|
||||
(void)Cy_SysClk_PllDisable(CY_SYSCLK_CLKHF_IN_CLKPATH10);
|
||||
#endif
|
||||
|
||||
#ifdef CY_CFG_SYSCLK_PLL10_AVAILABLE
|
||||
(void)Cy_SysClk_PllDisable(CY_SYSCLK_CLKHF_IN_CLKPATH11);
|
||||
#endif
|
||||
|
||||
#ifdef CY_CFG_SYSCLK_PLL11_AVAILABLE
|
||||
(void)Cy_SysClk_PllDisable(CY_SYSCLK_CLKHF_IN_CLKPATH12);
|
||||
#endif
|
||||
|
||||
#ifdef CY_CFG_SYSCLK_PLL12_AVAILABLE
|
||||
(void)Cy_SysClk_PllDisable(CY_SYSCLK_CLKHF_IN_CLKPATH13);
|
||||
#endif
|
||||
|
||||
#ifdef CY_CFG_SYSCLK_PLL13_AVAILABLE
|
||||
(void)Cy_SysClk_PllDisable(CY_SYSCLK_CLKHF_IN_CLKPATH14);
|
||||
#endif
|
||||
|
||||
#ifdef CY_CFG_SYSCLK_PLL14_AVAILABLE
|
||||
(void)Cy_SysClk_PllDisable(CY_SYSCLK_CLKHF_IN_CLKPATH15);
|
||||
#endif
|
||||
|
||||
/* Enable all source clocks */
|
||||
#ifdef CY_CFG_SYSCLK_PILO_ENABLED
|
||||
Cy_SysClk_PiloInit();
|
||||
#endif
|
||||
|
||||
#ifdef CY_CFG_SYSCLK_WCO_ENABLED
|
||||
Cy_SysClk_WcoInit();
|
||||
#endif
|
||||
|
||||
#ifdef CY_CFG_SYSCLK_CLKLF_ENABLED
|
||||
Cy_SysClk_ClkLfInit();
|
||||
#endif
|
||||
|
||||
#ifdef CY_CFG_SYSCLK_ALTHF_ENABLED
|
||||
Cy_SysClk_AltHfInit();
|
||||
#endif
|
||||
|
||||
#ifdef CY_CFG_SYSCLK_ECO_ENABLED
|
||||
Cy_SysClk_EcoInit();
|
||||
#endif
|
||||
|
||||
#ifdef CY_CFG_SYSCLK_EXTCLK_ENABLED
|
||||
Cy_SysClk_ExtClkInit();
|
||||
#endif
|
||||
|
||||
/* Configure CPU clock dividers */
|
||||
#ifdef CY_CFG_SYSCLK_CLKFAST_ENABLED
|
||||
Cy_SysClk_ClkFastInit();
|
||||
#endif
|
||||
|
||||
#ifdef CY_CFG_SYSCLK_CLKPERI_ENABLED
|
||||
Cy_SysClk_ClkPeriInit();
|
||||
#endif
|
||||
|
||||
#ifdef CY_CFG_SYSCLK_CLKSLOW_ENABLED
|
||||
Cy_SysClk_ClkSlowInit();
|
||||
#endif
|
||||
|
||||
#if ((CY_CFG_SYSCLK_CLKPATH0_SOURCE == CY_SYSCLK_CLKPATH_IN_WCO) && (CY_CFG_SYSCLK_CLKHF0_CLKPATH == CY_SYSCLK_CLKHF_IN_CLKPATH0))
|
||||
/* Configure HFCLK0 to temporarily run from IMO to initialize other clocks */
|
||||
Cy_SysClk_ClkPathSetSource(1UL, CY_SYSCLK_CLKPATH_IN_IMO);
|
||||
Cy_SysClk_ClkHfSetSource(0UL, CY_SYSCLK_CLKHF_IN_CLKPATH1);
|
||||
#else
|
||||
#ifdef CY_CFG_SYSCLK_CLKPATH1_ENABLED
|
||||
Cy_SysClk_ClkPath1Init();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Configure Path Clocks */
|
||||
#ifdef CY_CFG_SYSCLK_CLKPATH0_ENABLED
|
||||
Cy_SysClk_ClkPath0Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKPATH2_ENABLED
|
||||
Cy_SysClk_ClkPath2Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKPATH3_ENABLED
|
||||
Cy_SysClk_ClkPath3Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKPATH4_ENABLED
|
||||
Cy_SysClk_ClkPath4Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKPATH5_ENABLED
|
||||
Cy_SysClk_ClkPath5Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKPATH6_ENABLED
|
||||
Cy_SysClk_ClkPath6Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKPATH7_ENABLED
|
||||
Cy_SysClk_ClkPath7Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKPATH8_ENABLED
|
||||
Cy_SysClk_ClkPath8Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKPATH9_ENABLED
|
||||
Cy_SysClk_ClkPath9Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKPATH10_ENABLED
|
||||
Cy_SysClk_ClkPath10Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKPATH11_ENABLED
|
||||
Cy_SysClk_ClkPath11Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKPATH12_ENABLED
|
||||
Cy_SysClk_ClkPath12Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKPATH13_ENABLED
|
||||
Cy_SysClk_ClkPath13Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKPATH14_ENABLED
|
||||
Cy_SysClk_ClkPath14Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKPATH15_ENABLED
|
||||
Cy_SysClk_ClkPath15Init();
|
||||
#endif
|
||||
|
||||
/* Configure and enable FLL */
|
||||
#ifdef CY_CFG_SYSCLK_FLL_ENABLED
|
||||
Cy_SysClk_FllInit();
|
||||
#endif
|
||||
|
||||
Cy_SysClk_ClkHf0Init();
|
||||
|
||||
#if ((CY_CFG_SYSCLK_CLKPATH0_SOURCE == CY_SYSCLK_CLKPATH_IN_WCO) && (CY_CFG_SYSCLK_CLKHF0_CLKPATH == CY_SYSCLK_CLKHF_IN_CLKPATH0))
|
||||
#ifdef CY_CFG_SYSCLK_CLKPATH1_ENABLED
|
||||
/* Apply the ClkPath1 user setting */
|
||||
Cy_SysClk_ClkPath1Init();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Configure and enable PLLs */
|
||||
#ifdef CY_CFG_SYSCLK_PLL0_ENABLED
|
||||
Cy_SysClk_Pll0Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_PLL1_ENABLED
|
||||
Cy_SysClk_Pll1Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_PLL2_ENABLED
|
||||
Cy_SysClk_Pll2Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_PLL3_ENABLED
|
||||
Cy_SysClk_Pll3Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_PLL4_ENABLED
|
||||
Cy_SysClk_Pll4Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_PLL5_ENABLED
|
||||
Cy_SysClk_Pll5Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_PLL6_ENABLED
|
||||
Cy_SysClk_Pll6Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_PLL7_ENABLED
|
||||
Cy_SysClk_Pll7Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_PLL8_ENABLED
|
||||
Cy_SysClk_Pll8Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_PLL9_ENABLED
|
||||
Cy_SysClk_Pll9Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_PLL10_ENABLED
|
||||
Cy_SysClk_Pll10Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_PLL11_ENABLED
|
||||
Cy_SysClk_Pll11Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_PLL12_ENABLED
|
||||
Cy_SysClk_Pll12Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_PLL13_ENABLED
|
||||
Cy_SysClk_Pll13Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_PLL14_ENABLED
|
||||
Cy_SysClk_Pll14Init();
|
||||
#endif
|
||||
|
||||
/* Configure HF clocks */
|
||||
#ifdef CY_CFG_SYSCLK_CLKHF1_ENABLED
|
||||
Cy_SysClk_ClkHf1Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKHF2_ENABLED
|
||||
Cy_SysClk_ClkHf2Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKHF3_ENABLED
|
||||
Cy_SysClk_ClkHf3Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKHF4_ENABLED
|
||||
Cy_SysClk_ClkHf4Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKHF5_ENABLED
|
||||
Cy_SysClk_ClkHf5Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKHF6_ENABLED
|
||||
Cy_SysClk_ClkHf6Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKHF7_ENABLED
|
||||
Cy_SysClk_ClkHf7Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKHF8_ENABLED
|
||||
Cy_SysClk_ClkHf8Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKHF9_ENABLED
|
||||
Cy_SysClk_ClkHf9Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKHF10_ENABLED
|
||||
Cy_SysClk_ClkHf10Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKHF11_ENABLED
|
||||
Cy_SysClk_ClkHf11Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKHF12_ENABLED
|
||||
Cy_SysClk_ClkHf12Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKHF13_ENABLED
|
||||
Cy_SysClk_ClkHf13Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKHF14_ENABLED
|
||||
Cy_SysClk_ClkHf14Init();
|
||||
#endif
|
||||
#ifdef CY_CFG_SYSCLK_CLKHF15_ENABLED
|
||||
Cy_SysClk_ClkHf15Init();
|
||||
#endif
|
||||
|
||||
/* Configure miscellaneous clocks */
|
||||
#ifdef CY_CFG_SYSCLK_CLKTIMER_ENABLED
|
||||
Cy_SysClk_ClkTimerInit();
|
||||
#endif
|
||||
|
||||
#ifdef CY_CFG_SYSCLK_CLKALTSYSTICK_ENABLED
|
||||
Cy_SysClk_ClkAltSysTickInit();
|
||||
#endif
|
||||
|
||||
#ifdef CY_CFG_SYSCLK_CLKPUMP_ENABLED
|
||||
Cy_SysClk_ClkPumpInit();
|
||||
#endif
|
||||
|
||||
#ifdef CY_CFG_SYSCLK_CLKBAK_ENABLED
|
||||
Cy_SysClk_ClkBakInit();
|
||||
#endif
|
||||
|
||||
/* Configure default enabled clocks */
|
||||
#ifdef CY_CFG_SYSCLK_ILO_ENABLED
|
||||
Cy_SysClk_IloInit();
|
||||
#else
|
||||
Cy_SysClk_IloDisable();
|
||||
#endif
|
||||
|
||||
#ifndef CY_CFG_SYSCLK_IMO_ENABLED
|
||||
#error the IMO must be enabled for proper chip operation
|
||||
#endif
|
||||
|
||||
/* Set accurate flash wait states */
|
||||
#if (defined (CY_CFG_PWR_ENABLED) && defined (CY_CFG_SYSCLK_CLKHF0_ENABLED))
|
||||
Cy_SysLib_SetWaitStates(CY_CFG_PWR_USING_ULP != 0, CY_CFG_SYSCLK_CLKHF0_FREQ_MHZ);
|
||||
#endif
|
||||
|
||||
/* Update System Core Clock values for correct Cy_SysLib_Delay functioning */
|
||||
SystemCoreClockUpdate();
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* File Name: cycfg_platform.h
|
||||
*
|
||||
* Description:
|
||||
* Platform configuration
|
||||
* This file was automatically generated and should not be modified.
|
||||
*
|
||||
********************************************************************************
|
||||
* Copyright 2017-2019 Cypress Semiconductor Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
********************************************************************************/
|
||||
|
||||
#if !defined(CYCFG_PLATFORM_H)
|
||||
#define CYCFG_PLATFORM_H
|
||||
|
||||
#include "cycfg_notices.h"
|
||||
#include "cy_sysclk.h"
|
||||
#include "cy_systick.h"
|
||||
#include "cy_gpio.h"
|
||||
#include "cy_syspm.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define CY_CFG_SYSCLK_CLKLF_FREQ_HZ 32768
|
||||
#define CY_CFG_PWR_VDDA_MV 3300
|
||||
#define CY_CFG_PWR_VDDD_MV 3300
|
||||
#define CY_CFG_PWR_VBACKUP_MV 3300
|
||||
#define CY_CFG_PWR_VDD_NS_MV 3300
|
||||
#define CY_CFG_PWR_VDDIO0_MV 3300
|
||||
#define CY_CFG_PWR_VDDIO1_MV 3300
|
||||
|
||||
void init_cycfg_platform(void);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* CYCFG_PLATFORM_H */
|
|
@ -1,39 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* File Name: cycfg_routing.c
|
||||
*
|
||||
* Description:
|
||||
* Establishes all necessary connections between hardware elements.
|
||||
* This file was automatically generated and should not be modified.
|
||||
*
|
||||
********************************************************************************
|
||||
* Copyright 2017-2019 Cypress Semiconductor Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
********************************************************************************/
|
||||
|
||||
#include "cycfg_routing.h"
|
||||
|
||||
#include "cy_device_headers.h"
|
||||
|
||||
void init_cycfg_routing(void)
|
||||
{
|
||||
HSIOM->AMUX_SPLIT_CTL[2] = HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_AA_SL_Msk |
|
||||
HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_AA_SR_Msk |
|
||||
HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_BB_SL_Msk |
|
||||
HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_BB_SR_Msk;
|
||||
HSIOM->AMUX_SPLIT_CTL[4] = HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_AA_SL_Msk |
|
||||
HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_AA_SR_Msk |
|
||||
HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_BB_SL_Msk |
|
||||
HSIOM_V2_AMUX_SPLIT_CTL_SWITCH_BB_SR_Msk;
|
||||
}
|
|
@ -1,76 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* File Name: cycfg_routing.h
|
||||
*
|
||||
* Description:
|
||||
* Establishes all necessary connections between hardware elements.
|
||||
* This file was automatically generated and should not be modified.
|
||||
*
|
||||
********************************************************************************
|
||||
* Copyright 2017-2019 Cypress Semiconductor Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
********************************************************************************/
|
||||
|
||||
#if !defined(CYCFG_ROUTING_H)
|
||||
#define CYCFG_ROUTING_H
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "cycfg_notices.h"
|
||||
void init_cycfg_routing(void);
|
||||
#define init_cycfg_connectivity() init_cycfg_routing()
|
||||
#define ioss_0_port_11_pin_1_HSIOM P11_1_TCPWM1_LINE_COMPL1
|
||||
#define ioss_0_port_11_pin_2_HSIOM P11_2_SMIF_SPI_SELECT0
|
||||
#define ioss_0_port_11_pin_3_HSIOM P11_3_SMIF_SPI_DATA3
|
||||
#define ioss_0_port_11_pin_4_HSIOM P11_4_SMIF_SPI_DATA2
|
||||
#define ioss_0_port_11_pin_5_HSIOM P11_5_SMIF_SPI_DATA1
|
||||
#define ioss_0_port_11_pin_6_HSIOM P11_6_SMIF_SPI_DATA0
|
||||
#define ioss_0_port_11_pin_7_HSIOM P11_7_SMIF_SPI_CLK
|
||||
#define ioss_0_port_1_pin_0_HSIOM HSIOM_SEL_AMUXB
|
||||
#define ioss_0_port_2_pin_0_HSIOM P2_0_SDHC0_CARD_DAT_3TO00
|
||||
#define ioss_0_port_2_pin_1_HSIOM P2_1_SDHC0_CARD_DAT_3TO01
|
||||
#define ioss_0_port_2_pin_2_HSIOM P2_2_SDHC0_CARD_DAT_3TO02
|
||||
#define ioss_0_port_2_pin_3_HSIOM P2_3_SDHC0_CARD_DAT_3TO03
|
||||
#define ioss_0_port_2_pin_4_HSIOM P2_4_SDHC0_CARD_CMD
|
||||
#define ioss_0_port_2_pin_5_HSIOM P2_5_SDHC0_CLK_CARD
|
||||
#define ioss_0_port_3_pin_0_HSIOM P3_0_SCB2_UART_RX
|
||||
#define ioss_0_port_3_pin_1_HSIOM P3_1_SCB2_UART_TX
|
||||
#define ioss_0_port_3_pin_2_HSIOM P3_2_SCB2_UART_RTS
|
||||
#define ioss_0_port_3_pin_3_HSIOM P3_3_SCB2_UART_CTS
|
||||
#define ioss_0_port_5_pin_0_HSIOM P5_0_SCB5_UART_RX
|
||||
#define ioss_0_port_5_pin_1_HSIOM P5_1_SCB5_UART_TX
|
||||
#define ioss_0_port_6_pin_0_HSIOM P6_0_SCB3_I2C_SCL
|
||||
#define ioss_0_port_6_pin_1_HSIOM P6_1_SCB3_I2C_SDA
|
||||
#define ioss_0_port_6_pin_4_HSIOM P6_4_CPUSS_SWJ_SWO_TDO
|
||||
#define ioss_0_port_6_pin_6_HSIOM P6_6_CPUSS_SWJ_SWDIO_TMS
|
||||
#define ioss_0_port_6_pin_7_HSIOM P6_7_CPUSS_SWJ_SWCLK_TCLK
|
||||
#define ioss_0_port_7_pin_1_HSIOM HSIOM_SEL_AMUXB
|
||||
#define ioss_0_port_7_pin_2_HSIOM HSIOM_SEL_AMUXB
|
||||
#define ioss_0_port_7_pin_7_HSIOM HSIOM_SEL_AMUXB
|
||||
#define ioss_0_port_8_pin_1_HSIOM HSIOM_SEL_AMUXB
|
||||
#define ioss_0_port_8_pin_2_HSIOM HSIOM_SEL_AMUXB
|
||||
#define ioss_0_port_8_pin_3_HSIOM HSIOM_SEL_AMUXB
|
||||
#define ioss_0_port_8_pin_4_HSIOM HSIOM_SEL_AMUXB
|
||||
#define ioss_0_port_8_pin_5_HSIOM HSIOM_SEL_AMUXB
|
||||
#define ioss_0_port_8_pin_6_HSIOM HSIOM_SEL_AMUXB
|
||||
#define ioss_0_port_8_pin_7_HSIOM HSIOM_SEL_AMUXB
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* CYCFG_ROUTING_H */
|
|
@ -1,123 +0,0 @@
|
|||
/*
|
||||
* mbed Microcontroller Library
|
||||
* Copyright (c) 2017-2018 Future Electronics
|
||||
* Copyright (c) 2019 Cypress Semiconductor Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef MBED_PERIPHERALNAMES_H
|
||||
#define MBED_PERIPHERALNAMES_H
|
||||
|
||||
#include "cmsis.h"
|
||||
#include "PinNames.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
UART_0 = (int)SCB0_BASE,
|
||||
UART_1 = (int)SCB1_BASE,
|
||||
UART_2 = (int)SCB2_BASE,
|
||||
UART_3 = (int)SCB3_BASE,
|
||||
UART_4 = (int)SCB4_BASE,
|
||||
UART_5 = (int)SCB5_BASE,
|
||||
UART_6 = (int)SCB6_BASE,
|
||||
UART_7 = (int)SCB7_BASE,
|
||||
/* SCB_8 does not support UART mode */
|
||||
UART_9 = (int)SCB9_BASE,
|
||||
UART_10 = (int)SCB10_BASE,
|
||||
UART_11 = (int)SCB11_BASE,
|
||||
UART_12 = (int)SCB12_BASE,
|
||||
} UARTName;
|
||||
|
||||
|
||||
typedef enum {
|
||||
SPI_0 = (int)SCB0_BASE,
|
||||
SPI_1 = (int)SCB1_BASE,
|
||||
SPI_2 = (int)SCB2_BASE,
|
||||
SPI_3 = (int)SCB3_BASE,
|
||||
SPI_4 = (int)SCB4_BASE,
|
||||
SPI_5 = (int)SCB5_BASE,
|
||||
SPI_6 = (int)SCB6_BASE,
|
||||
SPI_7 = (int)SCB7_BASE,
|
||||
SPI_8 = (int)SCB8_BASE,
|
||||
/* SCB_9 - SCB_12 does not support UART mode */
|
||||
} SPIName;
|
||||
|
||||
typedef enum {
|
||||
I2C_0 = (int)SCB0_BASE,
|
||||
I2C_1 = (int)SCB1_BASE,
|
||||
I2C_2 = (int)SCB2_BASE,
|
||||
I2C_3 = (int)SCB3_BASE,
|
||||
I2C_4 = (int)SCB4_BASE,
|
||||
I2C_5 = (int)SCB5_BASE,
|
||||
I2C_6 = (int)SCB6_BASE,
|
||||
I2C_7 = (int)SCB7_BASE,
|
||||
I2C_8 = (int)SCB8_BASE,
|
||||
I2C_9 = (int)SCB9_BASE,
|
||||
I2C_10 = (int)SCB10_BASE,
|
||||
I2C_11 = (int)SCB11_BASE,
|
||||
I2C_12 = (int)SCB12_BASE,
|
||||
} I2CName;
|
||||
|
||||
typedef enum {
|
||||
PWM_32b_0 = TCPWM0_BASE,
|
||||
PWM_32b_1,
|
||||
PWM_32b_2,
|
||||
PWM_32b_3,
|
||||
PWM_32b_4,
|
||||
PWM_32b_5,
|
||||
PWM_32b_6,
|
||||
PWM_32b_7,
|
||||
PWM_16b_0 = TCPWM1_BASE,
|
||||
PWM_16b_1,
|
||||
PWM_16b_2,
|
||||
PWM_16b_3,
|
||||
PWM_16b_4,
|
||||
PWM_16b_5,
|
||||
PWM_16b_6,
|
||||
PWM_16b_7,
|
||||
PWM_16b_8,
|
||||
PWM_16b_9,
|
||||
PWM_16b_10,
|
||||
PWM_16b_11,
|
||||
PWM_16b_12,
|
||||
PWM_16b_13,
|
||||
PWM_16b_14,
|
||||
PWM_16b_15,
|
||||
PWM_16b_16,
|
||||
PWM_16b_17,
|
||||
PWM_16b_18,
|
||||
PWM_16b_19,
|
||||
PWM_16b_20,
|
||||
PWM_16b_21,
|
||||
PWM_16b_22,
|
||||
PWM_16b_23,
|
||||
} PWMName;
|
||||
|
||||
typedef enum {
|
||||
ADC_0 = (int)SAR_BASE,
|
||||
} ADCName;
|
||||
|
||||
typedef enum {
|
||||
SMIF_0 = (int)SMIF0_BASE,
|
||||
} SMIFName;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,494 +0,0 @@
|
|||
/*
|
||||
* mbed Microcontroller Library
|
||||
* Copyright (c) 2017-2018 Future Electronics
|
||||
* Copyright (c) 2019 Cypress Semiconductor Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "PeripheralNames.h"
|
||||
#include "PeripheralPins.h"
|
||||
#include "pinmap.h"
|
||||
|
||||
#if DEVICE_SERIAL
|
||||
//*** SERIAL ***
|
||||
const PinMap PinMap_UART_RX[] = {
|
||||
{P0_2, UART_0, CY_PIN_IN_FUNCTION( P0_2_SCB0_UART_RX, PCLK_SCB0_CLOCK)},
|
||||
{P1_0, UART_7, CY_PIN_IN_FUNCTION( P1_0_SCB7_UART_RX, PCLK_SCB7_CLOCK)},
|
||||
{P2_0, UART_1, CY_PIN_IN_FUNCTION( P2_0_SCB1_UART_RX, PCLK_SCB1_CLOCK)},
|
||||
{P2_4, UART_9, CY_PIN_IN_FUNCTION( P2_4_SCB9_UART_RX, PCLK_SCB9_CLOCK)},
|
||||
{P3_0, UART_2, CY_PIN_IN_FUNCTION( P3_0_SCB2_UART_RX, PCLK_SCB2_CLOCK)},
|
||||
{P4_0, UART_7, CY_PIN_IN_FUNCTION( P4_0_SCB7_UART_RX, PCLK_SCB7_CLOCK)},
|
||||
{P5_0, UART_5, CY_PIN_IN_FUNCTION( P5_0_SCB5_UART_RX, PCLK_SCB5_CLOCK)},
|
||||
{P5_4, UART_10, CY_PIN_IN_FUNCTION( P5_4_SCB10_UART_RX, PCLK_SCB10_CLOCK)},
|
||||
{P6_0, UART_3, CY_PIN_IN_FUNCTION( P6_0_SCB3_UART_RX, PCLK_SCB3_CLOCK)},
|
||||
{P6_4, UART_6, CY_PIN_IN_FUNCTION( P6_4_SCB6_UART_RX, PCLK_SCB6_CLOCK)},
|
||||
{P7_0, UART_4, CY_PIN_IN_FUNCTION( P7_0_SCB4_UART_RX, PCLK_SCB4_CLOCK)},
|
||||
{P8_0, UART_4, CY_PIN_IN_FUNCTION( P8_0_SCB4_UART_RX, PCLK_SCB4_CLOCK)},
|
||||
{P8_4, UART_11, CY_PIN_IN_FUNCTION( P8_4_SCB11_UART_RX, PCLK_SCB11_CLOCK)},
|
||||
{P9_0, UART_2, CY_PIN_IN_FUNCTION( P9_0_SCB2_UART_RX, PCLK_SCB2_CLOCK)},
|
||||
{P10_0, UART_1, CY_PIN_IN_FUNCTION( P10_0_SCB1_UART_RX, PCLK_SCB1_CLOCK)},
|
||||
{P11_0, UART_5, CY_PIN_IN_FUNCTION( P11_0_SCB5_UART_RX, PCLK_SCB5_CLOCK)},
|
||||
{P12_0, UART_6, CY_PIN_IN_FUNCTION( P12_0_SCB6_UART_RX, PCLK_SCB6_CLOCK)},
|
||||
{P13_0, UART_6, CY_PIN_IN_FUNCTION( P13_0_SCB6_UART_RX, PCLK_SCB6_CLOCK)},
|
||||
{P13_4, UART_12, CY_PIN_IN_FUNCTION( P13_4_SCB12_UART_RX, PCLK_SCB12_CLOCK)},
|
||||
{NC, NC, 0}
|
||||
};
|
||||
const PinMap PinMap_UART_TX[] = {
|
||||
{P0_3, UART_0, CY_PIN_OUT_FUNCTION( P0_3_SCB0_UART_TX, PCLK_SCB0_CLOCK)},
|
||||
{P1_1, UART_7, CY_PIN_OUT_FUNCTION( P1_1_SCB7_UART_TX, PCLK_SCB7_CLOCK)},
|
||||
{P2_1, UART_1, CY_PIN_OUT_FUNCTION( P2_1_SCB1_UART_TX, PCLK_SCB1_CLOCK)},
|
||||
{P2_5, UART_9, CY_PIN_OUT_FUNCTION( P2_5_SCB9_UART_TX, PCLK_SCB9_CLOCK)},
|
||||
{P3_1, UART_2, CY_PIN_OUT_FUNCTION( P3_1_SCB2_UART_TX, PCLK_SCB2_CLOCK)},
|
||||
{P4_1, UART_7, CY_PIN_OUT_FUNCTION( P4_1_SCB7_UART_TX, PCLK_SCB7_CLOCK)},
|
||||
{P5_1, UART_5, CY_PIN_OUT_FUNCTION( P5_1_SCB5_UART_TX, PCLK_SCB5_CLOCK)},
|
||||
{P5_5, UART_10, CY_PIN_OUT_FUNCTION( P5_5_SCB10_UART_TX, PCLK_SCB10_CLOCK)},
|
||||
{P6_1, UART_3, CY_PIN_OUT_FUNCTION( P6_1_SCB3_UART_TX, PCLK_SCB3_CLOCK)},
|
||||
{P6_5, UART_6, CY_PIN_OUT_FUNCTION( P6_5_SCB6_UART_TX, PCLK_SCB6_CLOCK)},
|
||||
{P7_1, UART_4, CY_PIN_OUT_FUNCTION( P7_1_SCB4_UART_TX, PCLK_SCB4_CLOCK)},
|
||||
{P8_1, UART_4, CY_PIN_OUT_FUNCTION( P8_1_SCB4_UART_TX, PCLK_SCB4_CLOCK)},
|
||||
{P8_5, UART_11, CY_PIN_OUT_FUNCTION( P8_5_SCB11_UART_TX, PCLK_SCB11_CLOCK)},
|
||||
{P9_1, UART_2, CY_PIN_OUT_FUNCTION( P9_1_SCB2_UART_TX, PCLK_SCB2_CLOCK)},
|
||||
{P10_1, UART_1, CY_PIN_OUT_FUNCTION( P10_1_SCB1_UART_TX, PCLK_SCB1_CLOCK)},
|
||||
{P11_1, UART_5, CY_PIN_OUT_FUNCTION( P11_1_SCB5_UART_TX, PCLK_SCB5_CLOCK)},
|
||||
{P12_1, UART_6, CY_PIN_OUT_FUNCTION( P12_1_SCB6_UART_TX, PCLK_SCB6_CLOCK)},
|
||||
{P13_1, UART_6, CY_PIN_OUT_FUNCTION( P13_1_SCB6_UART_TX, PCLK_SCB6_CLOCK)},
|
||||
{P13_5, UART_12, CY_PIN_OUT_FUNCTION( P13_5_SCB12_UART_TX, PCLK_SCB12_CLOCK)},
|
||||
{NC, NC, 0}
|
||||
};
|
||||
const PinMap PinMap_UART_RTS[] = {
|
||||
{P0_4, UART_0, CY_PIN_OUT_FUNCTION( P0_4_SCB0_UART_RTS, PCLK_SCB0_CLOCK)},
|
||||
{P1_2, UART_7, CY_PIN_OUT_FUNCTION( P1_2_SCB7_UART_RTS, PCLK_SCB7_CLOCK)},
|
||||
{P2_2, UART_1, CY_PIN_OUT_FUNCTION( P2_2_SCB1_UART_RTS, PCLK_SCB1_CLOCK)},
|
||||
{P2_6, UART_9, CY_PIN_OUT_FUNCTION( P2_6_SCB9_UART_RTS, PCLK_SCB9_CLOCK)},
|
||||
{P3_2, UART_2, CY_PIN_OUT_FUNCTION( P3_2_SCB2_UART_RTS, PCLK_SCB2_CLOCK)},
|
||||
{P5_2, UART_5, CY_PIN_OUT_FUNCTION( P5_2_SCB5_UART_RTS, PCLK_SCB5_CLOCK)},
|
||||
{P5_6, UART_10, CY_PIN_OUT_FUNCTION( P5_6_SCB10_UART_RTS, PCLK_SCB10_CLOCK)},
|
||||
{P6_2, UART_3, CY_PIN_OUT_FUNCTION( P6_2_SCB3_UART_RTS, PCLK_SCB3_CLOCK)},
|
||||
{P6_6, UART_6, CY_PIN_OUT_FUNCTION( P6_6_SCB6_UART_RTS, PCLK_SCB6_CLOCK)},
|
||||
{P7_2, UART_4, CY_PIN_OUT_FUNCTION( P7_2_SCB4_UART_RTS, PCLK_SCB4_CLOCK)},
|
||||
{P8_2, UART_4, CY_PIN_OUT_FUNCTION( P8_2_SCB4_UART_RTS, PCLK_SCB4_CLOCK)},
|
||||
{P8_6, UART_11, CY_PIN_OUT_FUNCTION( P8_6_SCB11_UART_RTS, PCLK_SCB11_CLOCK)},
|
||||
{P9_2, UART_2, CY_PIN_OUT_FUNCTION( P9_2_SCB2_UART_RTS, PCLK_SCB2_CLOCK)},
|
||||
{P10_2, UART_1, CY_PIN_OUT_FUNCTION( P10_2_SCB1_UART_RTS, PCLK_SCB1_CLOCK)},
|
||||
{P11_2, UART_5, CY_PIN_OUT_FUNCTION( P11_2_SCB5_UART_RTS, PCLK_SCB5_CLOCK)},
|
||||
{P12_2, UART_6, CY_PIN_OUT_FUNCTION( P12_2_SCB6_UART_RTS, PCLK_SCB6_CLOCK)},
|
||||
{P13_2, UART_6, CY_PIN_OUT_FUNCTION( P13_2_SCB6_UART_RTS, PCLK_SCB6_CLOCK)},
|
||||
{P13_6, UART_12, CY_PIN_OUT_FUNCTION( P13_6_SCB12_UART_RTS, PCLK_SCB12_CLOCK)},
|
||||
{NC, NC, 0}
|
||||
};
|
||||
const PinMap PinMap_UART_CTS[] = {
|
||||
{P0_5, UART_0, CY_PIN_IN_FUNCTION( P0_5_SCB0_UART_CTS, PCLK_SCB0_CLOCK)},
|
||||
{P1_3, UART_7, CY_PIN_IN_FUNCTION( P1_3_SCB7_UART_CTS, PCLK_SCB7_CLOCK)},
|
||||
{P2_3, UART_1, CY_PIN_IN_FUNCTION( P2_3_SCB1_UART_CTS, PCLK_SCB1_CLOCK)},
|
||||
{P2_7, UART_9, CY_PIN_IN_FUNCTION( P2_7_SCB9_UART_CTS, PCLK_SCB9_CLOCK)},
|
||||
{P3_3, UART_2, CY_PIN_IN_FUNCTION( P3_3_SCB2_UART_CTS, PCLK_SCB2_CLOCK)},
|
||||
{P5_3, UART_5, CY_PIN_IN_FUNCTION( P5_3_SCB5_UART_CTS, PCLK_SCB5_CLOCK)},
|
||||
{P5_7, UART_10, CY_PIN_IN_FUNCTION( P5_7_SCB10_UART_CTS, PCLK_SCB10_CLOCK)},
|
||||
{P6_3, UART_3, CY_PIN_IN_FUNCTION( P6_3_SCB3_UART_CTS, PCLK_SCB3_CLOCK)},
|
||||
{P6_7, UART_6, CY_PIN_IN_FUNCTION( P6_7_SCB6_UART_CTS, PCLK_SCB6_CLOCK)},
|
||||
{P7_3, UART_4, CY_PIN_IN_FUNCTION( P7_3_SCB4_UART_CTS, PCLK_SCB4_CLOCK)},
|
||||
{P8_3, UART_4, CY_PIN_IN_FUNCTION( P8_3_SCB4_UART_CTS, PCLK_SCB4_CLOCK)},
|
||||
{P8_7, UART_11, CY_PIN_IN_FUNCTION( P8_7_SCB11_UART_CTS, PCLK_SCB11_CLOCK)},
|
||||
{P9_3, UART_2, CY_PIN_IN_FUNCTION( P9_3_SCB2_UART_CTS, PCLK_SCB2_CLOCK)},
|
||||
{P10_3, UART_1, CY_PIN_IN_FUNCTION( P10_3_SCB1_UART_CTS, PCLK_SCB1_CLOCK)},
|
||||
{P11_3, UART_5, CY_PIN_IN_FUNCTION( P11_3_SCB5_UART_CTS, PCLK_SCB5_CLOCK)},
|
||||
{P12_3, UART_6, CY_PIN_IN_FUNCTION( P12_3_SCB6_UART_CTS, PCLK_SCB6_CLOCK)},
|
||||
{P13_3, UART_6, CY_PIN_IN_FUNCTION( P13_3_SCB6_UART_CTS, PCLK_SCB6_CLOCK)},
|
||||
{P13_7, UART_12, CY_PIN_IN_FUNCTION( P13_7_SCB12_UART_CTS, PCLK_SCB12_CLOCK)},
|
||||
{NC, NC, 0}
|
||||
};
|
||||
#endif // DEVICE_SERIAL
|
||||
|
||||
|
||||
#if DEVICE_I2C
|
||||
//*** I2C ***
|
||||
const PinMap PinMap_I2C_SCL[] = {
|
||||
{P0_2, I2C_0, CY_PIN_OD_FUNCTION( P0_2_SCB0_I2C_SCL, PCLK_SCB0_CLOCK)},
|
||||
{P1_0, I2C_7, CY_PIN_OD_FUNCTION( P1_0_SCB7_I2C_SCL, PCLK_SCB7_CLOCK)},
|
||||
{P2_0, I2C_1, CY_PIN_OD_FUNCTION( P2_0_SCB1_I2C_SCL, PCLK_SCB1_CLOCK)},
|
||||
{P2_4, I2C_9, CY_PIN_OD_FUNCTION( P2_4_SCB9_I2C_SCL, PCLK_SCB9_CLOCK)},
|
||||
{P3_0, I2C_2, CY_PIN_OD_FUNCTION( P3_0_SCB2_I2C_SCL, PCLK_SCB2_CLOCK)},
|
||||
{P4_0, I2C_7, CY_PIN_OD_FUNCTION( P4_0_SCB7_I2C_SCL, PCLK_SCB7_CLOCK)},
|
||||
{P5_0, I2C_5, CY_PIN_OD_FUNCTION( P5_0_SCB5_I2C_SCL, PCLK_SCB5_CLOCK)},
|
||||
{P5_4, I2C_10, CY_PIN_OD_FUNCTION( P5_4_SCB10_I2C_SCL, PCLK_SCB10_CLOCK)},
|
||||
{P6_0, I2C_3, CY_PIN_OD_FUNCTION( P6_0_SCB3_I2C_SCL, PCLK_SCB3_CLOCK)},
|
||||
{P6_4, I2C_6, CY_PIN_OD_FUNCTION( P6_4_SCB6_I2C_SCL, PCLK_SCB6_CLOCK)},
|
||||
{P7_0, I2C_4, CY_PIN_OD_FUNCTION( P7_0_SCB4_I2C_SCL, PCLK_SCB4_CLOCK)},
|
||||
{P8_0, I2C_4, CY_PIN_OD_FUNCTION( P8_0_SCB4_I2C_SCL, PCLK_SCB4_CLOCK)},
|
||||
{P8_4, I2C_11, CY_PIN_OD_FUNCTION( P8_4_SCB11_I2C_SCL, PCLK_SCB11_CLOCK)},
|
||||
{P9_0, I2C_2, CY_PIN_OD_FUNCTION( P9_0_SCB2_I2C_SCL, PCLK_SCB2_CLOCK)},
|
||||
{P10_0, I2C_1, CY_PIN_OD_FUNCTION( P10_0_SCB1_I2C_SCL, PCLK_SCB1_CLOCK)},
|
||||
{P11_0, I2C_5, CY_PIN_OD_FUNCTION( P11_0_SCB5_I2C_SCL, PCLK_SCB5_CLOCK)},
|
||||
{P12_0, I2C_6, CY_PIN_OD_FUNCTION( P12_0_SCB6_I2C_SCL, PCLK_SCB6_CLOCK)},
|
||||
{P13_0, I2C_6, CY_PIN_OD_FUNCTION( P13_0_SCB6_I2C_SCL, PCLK_SCB6_CLOCK)},
|
||||
{P13_4, I2C_12, CY_PIN_OD_FUNCTION( P13_4_SCB12_I2C_SCL, PCLK_SCB12_CLOCK)},
|
||||
{NC, NC, 0}
|
||||
};
|
||||
const PinMap PinMap_I2C_SDA[] = {
|
||||
{P0_3, I2C_0, CY_PIN_OD_FUNCTION( P0_3_SCB0_I2C_SDA, PCLK_SCB0_CLOCK)},
|
||||
{P1_1, I2C_7, CY_PIN_OD_FUNCTION( P1_1_SCB7_I2C_SDA, PCLK_SCB7_CLOCK)},
|
||||
{P2_1, I2C_1, CY_PIN_OD_FUNCTION( P2_1_SCB1_I2C_SDA, PCLK_SCB1_CLOCK)},
|
||||
{P2_5, I2C_9, CY_PIN_OD_FUNCTION( P2_5_SCB9_I2C_SDA, PCLK_SCB9_CLOCK)},
|
||||
{P3_1, I2C_2, CY_PIN_OD_FUNCTION( P3_1_SCB2_I2C_SDA, PCLK_SCB2_CLOCK)},
|
||||
{P4_1, I2C_7, CY_PIN_OD_FUNCTION( P4_1_SCB7_I2C_SDA, PCLK_SCB7_CLOCK)},
|
||||
{P5_1, I2C_5, CY_PIN_OD_FUNCTION( P5_1_SCB5_I2C_SDA, PCLK_SCB5_CLOCK)},
|
||||
{P5_5, I2C_10, CY_PIN_OD_FUNCTION( P5_5_SCB10_I2C_SDA, PCLK_SCB10_CLOCK)},
|
||||
{P6_1, I2C_3, CY_PIN_OD_FUNCTION( P6_1_SCB3_I2C_SDA, PCLK_SCB3_CLOCK)},
|
||||
{P6_5, I2C_6, CY_PIN_OD_FUNCTION( P6_5_SCB6_I2C_SDA, PCLK_SCB6_CLOCK)},
|
||||
{P7_1, I2C_4, CY_PIN_OD_FUNCTION( P7_1_SCB4_I2C_SDA, PCLK_SCB4_CLOCK)},
|
||||
{P8_1, I2C_4, CY_PIN_OD_FUNCTION( P8_1_SCB4_I2C_SDA, PCLK_SCB4_CLOCK)},
|
||||
{P8_5, I2C_11, CY_PIN_OD_FUNCTION( P8_5_SCB11_I2C_SDA, PCLK_SCB11_CLOCK)},
|
||||
{P9_1, I2C_2, CY_PIN_OD_FUNCTION( P9_1_SCB2_I2C_SDA, PCLK_SCB2_CLOCK)},
|
||||
{P10_1, I2C_1, CY_PIN_OD_FUNCTION( P10_1_SCB1_I2C_SDA, PCLK_SCB1_CLOCK)},
|
||||
{P11_1, I2C_5, CY_PIN_OD_FUNCTION( P11_1_SCB5_I2C_SDA, PCLK_SCB5_CLOCK)},
|
||||
{P12_1, I2C_6, CY_PIN_OD_FUNCTION( P12_1_SCB6_I2C_SDA, PCLK_SCB6_CLOCK)},
|
||||
{P13_1, I2C_6, CY_PIN_OD_FUNCTION( P13_1_SCB6_I2C_SDA, PCLK_SCB6_CLOCK)},
|
||||
{P13_5, I2C_12, CY_PIN_OD_FUNCTION( P13_5_SCB12_I2C_SDA, PCLK_SCB12_CLOCK)},
|
||||
{NC, NC, 0}
|
||||
};
|
||||
#endif // DEVICE_I2C
|
||||
|
||||
#if DEVICE_SPI
|
||||
//*** SPI ***
|
||||
const PinMap PinMap_SPI_MOSI[] = {
|
||||
{P0_2, SPI_0, CY_PIN_OUT_FUNCTION( P0_2_SCB0_SPI_MOSI, PCLK_SCB0_CLOCK)},
|
||||
{P1_0, SPI_7, CY_PIN_OUT_FUNCTION( P1_0_SCB7_SPI_MOSI, PCLK_SCB7_CLOCK)},
|
||||
{P2_0, SPI_1, CY_PIN_OUT_FUNCTION( P2_0_SCB1_SPI_MOSI, PCLK_SCB1_CLOCK)},
|
||||
{P3_0, SPI_2, CY_PIN_OUT_FUNCTION( P3_0_SCB2_SPI_MOSI, PCLK_SCB2_CLOCK)},
|
||||
{P4_0, SPI_7, CY_PIN_OUT_FUNCTION( P4_0_SCB7_SPI_MOSI, PCLK_SCB7_CLOCK)},
|
||||
{P5_0, SPI_5, CY_PIN_OUT_FUNCTION( P5_0_SCB5_SPI_MOSI, PCLK_SCB5_CLOCK)},
|
||||
{P6_0, SPI_3, CY_PIN_OUT_FUNCTION( P6_0_SCB3_SPI_MOSI, PCLK_SCB3_CLOCK)},
|
||||
{P6_4, SPI_6, CY_PIN_OUT_FUNCTION( P6_4_SCB6_SPI_MOSI, PCLK_SCB6_CLOCK)},
|
||||
{P7_0, SPI_4, CY_PIN_OUT_FUNCTION( P7_0_SCB4_SPI_MOSI, PCLK_SCB4_CLOCK)},
|
||||
{P8_0, SPI_4, CY_PIN_OUT_FUNCTION( P8_0_SCB4_SPI_MOSI, PCLK_SCB4_CLOCK)},
|
||||
{P9_0, SPI_2, CY_PIN_OUT_FUNCTION( P9_0_SCB2_SPI_MOSI, PCLK_SCB2_CLOCK)},
|
||||
{P10_0, SPI_1, CY_PIN_OUT_FUNCTION( P10_0_SCB1_SPI_MOSI, PCLK_SCB1_CLOCK)},
|
||||
{P11_0, SPI_5, CY_PIN_OUT_FUNCTION( P11_0_SCB5_SPI_MOSI, PCLK_SCB5_CLOCK)},
|
||||
{P12_0, SPI_6, CY_PIN_OUT_FUNCTION( P12_0_SCB6_SPI_MOSI, PCLK_SCB6_CLOCK)},
|
||||
{P13_0, SPI_6, CY_PIN_OUT_FUNCTION( P13_0_SCB6_SPI_MOSI, PCLK_SCB6_CLOCK)},
|
||||
{NC, NC, 0}
|
||||
};
|
||||
const PinMap PinMap_SPI_MISO[] = {
|
||||
{P0_3, SPI_0, CY_PIN_IN_FUNCTION( P0_3_SCB0_SPI_MISO, PCLK_SCB0_CLOCK)},
|
||||
{P1_1, SPI_7, CY_PIN_IN_FUNCTION( P1_1_SCB7_SPI_MISO, PCLK_SCB7_CLOCK)},
|
||||
{P2_1, SPI_1, CY_PIN_IN_FUNCTION( P2_1_SCB1_SPI_MISO, PCLK_SCB1_CLOCK)},
|
||||
{P3_1, SPI_2, CY_PIN_IN_FUNCTION( P3_1_SCB2_SPI_MISO, PCLK_SCB2_CLOCK)},
|
||||
{P4_1, SPI_7, CY_PIN_IN_FUNCTION( P4_1_SCB7_SPI_MISO, PCLK_SCB7_CLOCK)},
|
||||
{P5_1, SPI_5, CY_PIN_IN_FUNCTION( P5_1_SCB5_SPI_MISO, PCLK_SCB5_CLOCK)},
|
||||
{P6_1, SPI_3, CY_PIN_IN_FUNCTION( P6_1_SCB3_SPI_MISO, PCLK_SCB3_CLOCK)},
|
||||
{P6_5, SPI_6, CY_PIN_IN_FUNCTION( P6_5_SCB6_SPI_MISO, PCLK_SCB6_CLOCK)},
|
||||
{P7_1, SPI_4, CY_PIN_IN_FUNCTION( P7_1_SCB4_SPI_MISO, PCLK_SCB4_CLOCK)},
|
||||
{P8_1, SPI_4, CY_PIN_IN_FUNCTION( P8_1_SCB4_SPI_MISO, PCLK_SCB4_CLOCK)},
|
||||
{P9_1, SPI_2, CY_PIN_IN_FUNCTION( P9_1_SCB2_SPI_MISO, PCLK_SCB2_CLOCK)},
|
||||
{P10_1, SPI_1, CY_PIN_IN_FUNCTION( P10_1_SCB1_SPI_MISO, PCLK_SCB1_CLOCK)},
|
||||
{P11_1, SPI_5, CY_PIN_IN_FUNCTION( P11_1_SCB5_SPI_MISO, PCLK_SCB5_CLOCK)},
|
||||
{P12_1, SPI_6, CY_PIN_IN_FUNCTION( P12_1_SCB6_SPI_MISO, PCLK_SCB6_CLOCK)},
|
||||
{P13_1, SPI_6, CY_PIN_IN_FUNCTION( P13_1_SCB6_SPI_MISO, PCLK_SCB6_CLOCK)},
|
||||
{NC, NC, 0}
|
||||
};
|
||||
const PinMap PinMap_SPI_SCLK[] = {
|
||||
{P0_4, SPI_0, CY_PIN_OUT_FUNCTION( P0_4_SCB0_SPI_CLK, PCLK_SCB0_CLOCK)},
|
||||
{P1_2, SPI_7, CY_PIN_OUT_FUNCTION( P1_2_SCB7_SPI_CLK, PCLK_SCB7_CLOCK)},
|
||||
{P2_2, SPI_1, CY_PIN_OUT_FUNCTION( P2_2_SCB1_SPI_CLK, PCLK_SCB1_CLOCK)},
|
||||
{P3_2, SPI_2, CY_PIN_OUT_FUNCTION( P3_2_SCB2_SPI_CLK, PCLK_SCB2_CLOCK)},
|
||||
{P5_2, SPI_5, CY_PIN_OUT_FUNCTION( P5_2_SCB5_SPI_CLK, PCLK_SCB5_CLOCK)},
|
||||
{P6_2, SPI_3, CY_PIN_OUT_FUNCTION( P6_2_SCB3_SPI_CLK, PCLK_SCB3_CLOCK)},
|
||||
{P6_6, SPI_6, CY_PIN_OUT_FUNCTION( P6_6_SCB6_SPI_CLK, PCLK_SCB6_CLOCK)},
|
||||
{P7_2, SPI_4, CY_PIN_OUT_FUNCTION( P7_2_SCB4_SPI_CLK, PCLK_SCB4_CLOCK)},
|
||||
{P8_2, SPI_4, CY_PIN_OUT_FUNCTION( P8_2_SCB4_SPI_CLK, PCLK_SCB4_CLOCK)},
|
||||
{P9_2, SPI_2, CY_PIN_OUT_FUNCTION( P9_2_SCB2_SPI_CLK, PCLK_SCB2_CLOCK)},
|
||||
{P10_2, SPI_1, CY_PIN_OUT_FUNCTION( P10_2_SCB1_SPI_CLK, PCLK_SCB1_CLOCK)},
|
||||
{P11_2, SPI_5, CY_PIN_OUT_FUNCTION( P11_2_SCB5_SPI_CLK, PCLK_SCB5_CLOCK)},
|
||||
{P12_2, SPI_6, CY_PIN_OUT_FUNCTION( P12_2_SCB6_SPI_CLK, PCLK_SCB6_CLOCK)},
|
||||
{P13_2, SPI_6, CY_PIN_OUT_FUNCTION( P13_2_SCB6_SPI_CLK, PCLK_SCB6_CLOCK)},
|
||||
{NC, NC, 0}
|
||||
};
|
||||
const PinMap PinMap_SPI_SSEL[] = {
|
||||
{P0_5, SPI_0, CY_PIN_OUT_FUNCTION( P0_5_SCB0_SPI_SELECT0, PCLK_SCB0_CLOCK)},
|
||||
{P1_3, SPI_7, CY_PIN_OUT_FUNCTION( P1_3_SCB7_SPI_SELECT0, PCLK_SCB7_CLOCK)},
|
||||
{P2_3, SPI_1, CY_PIN_OUT_FUNCTION( P2_3_SCB1_SPI_SELECT0, PCLK_SCB1_CLOCK)},
|
||||
{P3_3, SPI_2, CY_PIN_OUT_FUNCTION( P3_3_SCB2_SPI_SELECT0, PCLK_SCB2_CLOCK)},
|
||||
{P5_3, SPI_5, CY_PIN_OUT_FUNCTION( P5_3_SCB5_SPI_SELECT0, PCLK_SCB5_CLOCK)},
|
||||
{P6_3, SPI_3, CY_PIN_OUT_FUNCTION( P6_3_SCB3_SPI_SELECT0, PCLK_SCB3_CLOCK)},
|
||||
{P6_7, SPI_6, CY_PIN_OUT_FUNCTION( P6_7_SCB6_SPI_SELECT0, PCLK_SCB6_CLOCK)},
|
||||
{P7_3, SPI_4, CY_PIN_OUT_FUNCTION( P7_3_SCB4_SPI_SELECT0, PCLK_SCB4_CLOCK)},
|
||||
{P8_3, SPI_4, CY_PIN_OUT_FUNCTION( P8_3_SCB4_SPI_SELECT0, PCLK_SCB4_CLOCK)},
|
||||
{P9_3, SPI_2, CY_PIN_OUT_FUNCTION( P9_3_SCB2_SPI_SELECT0, PCLK_SCB2_CLOCK)},
|
||||
{P10_3, SPI_1, CY_PIN_OUT_FUNCTION( P10_3_SCB1_SPI_SELECT0, PCLK_SCB1_CLOCK)},
|
||||
{P11_3, SPI_5, CY_PIN_OUT_FUNCTION( P11_3_SCB5_SPI_SELECT0, PCLK_SCB5_CLOCK)},
|
||||
{P12_3, SPI_6, CY_PIN_OUT_FUNCTION( P12_3_SCB6_SPI_SELECT0, PCLK_SCB6_CLOCK)},
|
||||
{P13_3, SPI_6, CY_PIN_OUT_FUNCTION( P13_3_SCB6_SPI_SELECT0, PCLK_SCB6_CLOCK)},
|
||||
{NC, NC, 0}
|
||||
};
|
||||
#endif // DEVICE_SPI
|
||||
|
||||
#if DEVICE_PWMOUT
|
||||
//*** PWM ***
|
||||
const PinMap PinMap_PWM_OUT[] = {
|
||||
// 16-bit PWM outputs
|
||||
{P0_0, PWM_16b_0, CY_PIN_OUT_FUNCTION(P0_0_TCPWM1_LINE0, PCLK_TCPWM1_CLOCKS0)},
|
||||
{P0_2, PWM_16b_1, CY_PIN_OUT_FUNCTION(P0_2_TCPWM1_LINE1, PCLK_TCPWM1_CLOCKS1)},
|
||||
{P0_4, PWM_16b_2, CY_PIN_OUT_FUNCTION(P0_4_TCPWM1_LINE2, PCLK_TCPWM1_CLOCKS2)},
|
||||
{P1_0, PWM_16b_3, CY_PIN_OUT_FUNCTION(P1_0_TCPWM1_LINE3, PCLK_TCPWM1_CLOCKS3)},
|
||||
{P1_2, PWM_16b_12, CY_PIN_OUT_FUNCTION(P1_2_TCPWM1_LINE12, PCLK_TCPWM1_CLOCKS12)},
|
||||
{P1_4, PWM_16b_13, CY_PIN_OUT_FUNCTION(P1_4_TCPWM1_LINE13, PCLK_TCPWM1_CLOCKS13)},
|
||||
{P2_0, PWM_16b_15, CY_PIN_OUT_FUNCTION(P2_0_TCPWM1_LINE15, PCLK_TCPWM1_CLOCKS15)},
|
||||
{P2_2, PWM_16b_16, CY_PIN_OUT_FUNCTION(P2_2_TCPWM1_LINE16, PCLK_TCPWM1_CLOCKS16)},
|
||||
{P2_4, PWM_16b_17, CY_PIN_OUT_FUNCTION(P2_4_TCPWM1_LINE17, PCLK_TCPWM1_CLOCKS17)},
|
||||
{P2_6, PWM_16b_18, CY_PIN_OUT_FUNCTION(P2_6_TCPWM1_LINE18, PCLK_TCPWM1_CLOCKS18)},
|
||||
{P3_0, PWM_16b_19, CY_PIN_OUT_FUNCTION(P3_0_TCPWM1_LINE19, PCLK_TCPWM1_CLOCKS19)},
|
||||
{P3_2, PWM_16b_20, CY_PIN_OUT_FUNCTION(P3_2_TCPWM1_LINE20, PCLK_TCPWM1_CLOCKS20)},
|
||||
{P3_4, PWM_16b_21, CY_PIN_OUT_FUNCTION(P3_4_TCPWM1_LINE21, PCLK_TCPWM1_CLOCKS21)},
|
||||
{P4_0, PWM_16b_22, CY_PIN_OUT_FUNCTION(P4_0_TCPWM1_LINE22, PCLK_TCPWM1_CLOCKS22)},
|
||||
{P5_0, PWM_16b_4, CY_PIN_OUT_FUNCTION(P5_0_TCPWM1_LINE4, PCLK_TCPWM1_CLOCKS4)},
|
||||
{P5_2, PWM_16b_5, CY_PIN_OUT_FUNCTION(P5_2_TCPWM1_LINE5, PCLK_TCPWM1_CLOCKS5)},
|
||||
{P5_4, PWM_16b_6, CY_PIN_OUT_FUNCTION(P5_4_TCPWM1_LINE6, PCLK_TCPWM1_CLOCKS6)},
|
||||
{P5_6, PWM_16b_7, CY_PIN_OUT_FUNCTION(P5_6_TCPWM1_LINE7, PCLK_TCPWM1_CLOCKS7)},
|
||||
{P6_0, PWM_16b_8, CY_PIN_OUT_FUNCTION(P6_0_TCPWM1_LINE8, PCLK_TCPWM1_CLOCKS8)},
|
||||
{P6_2, PWM_16b_9, CY_PIN_OUT_FUNCTION(P6_2_TCPWM1_LINE9, PCLK_TCPWM1_CLOCKS9)},
|
||||
{P6_4, PWM_16b_10, CY_PIN_OUT_FUNCTION(P6_4_TCPWM1_LINE10, PCLK_TCPWM1_CLOCKS10)},
|
||||
{P6_6, PWM_16b_11, CY_PIN_OUT_FUNCTION(P6_6_TCPWM1_LINE11, PCLK_TCPWM1_CLOCKS11)},
|
||||
{P7_0, PWM_16b_12, CY_PIN_OUT_FUNCTION(P7_0_TCPWM1_LINE12, PCLK_TCPWM1_CLOCKS12)},
|
||||
{P7_2, PWM_16b_13, CY_PIN_OUT_FUNCTION(P7_2_TCPWM1_LINE13, PCLK_TCPWM1_CLOCKS13)},
|
||||
{P7_4, PWM_16b_14, CY_PIN_OUT_FUNCTION(P7_4_TCPWM1_LINE14, PCLK_TCPWM1_CLOCKS14)},
|
||||
{P7_6, PWM_16b_15, CY_PIN_OUT_FUNCTION(P7_6_TCPWM1_LINE15, PCLK_TCPWM1_CLOCKS15)},
|
||||
{P8_0, PWM_16b_16, CY_PIN_OUT_FUNCTION(P8_0_TCPWM1_LINE16, PCLK_TCPWM1_CLOCKS16)},
|
||||
{P8_2, PWM_16b_17, CY_PIN_OUT_FUNCTION(P8_2_TCPWM1_LINE17, PCLK_TCPWM1_CLOCKS17)},
|
||||
{P8_4, PWM_16b_18, CY_PIN_OUT_FUNCTION(P8_4_TCPWM1_LINE18, PCLK_TCPWM1_CLOCKS18)},
|
||||
{P8_6, PWM_16b_19, CY_PIN_OUT_FUNCTION(P8_6_TCPWM1_LINE19, PCLK_TCPWM1_CLOCKS19)},
|
||||
{P9_0, PWM_16b_20, CY_PIN_OUT_FUNCTION(P9_0_TCPWM1_LINE20, PCLK_TCPWM1_CLOCKS20)},
|
||||
{P9_2, PWM_16b_21, CY_PIN_OUT_FUNCTION(P9_2_TCPWM1_LINE21, PCLK_TCPWM1_CLOCKS21)},
|
||||
{P9_4, PWM_16b_0, CY_PIN_OUT_FUNCTION(P9_4_TCPWM1_LINE0, PCLK_TCPWM1_CLOCKS0)},
|
||||
{P9_6, PWM_16b_1, CY_PIN_OUT_FUNCTION(P9_6_TCPWM1_LINE1, PCLK_TCPWM1_CLOCKS1)},
|
||||
{P10_0, PWM_16b_22, CY_PIN_OUT_FUNCTION(P10_0_TCPWM1_LINE22, PCLK_TCPWM1_CLOCKS22)},
|
||||
{P10_2, PWM_16b_23, CY_PIN_OUT_FUNCTION(P10_2_TCPWM1_LINE23, PCLK_TCPWM1_CLOCKS23)},
|
||||
{P10_4, PWM_16b_0, CY_PIN_OUT_FUNCTION(P10_4_TCPWM1_LINE0, PCLK_TCPWM1_CLOCKS0)},
|
||||
{P10_6, PWM_16b_2, CY_PIN_OUT_FUNCTION(P10_6_TCPWM1_LINE2, PCLK_TCPWM1_CLOCKS2)},
|
||||
{P11_0, PWM_16b_1, CY_PIN_OUT_FUNCTION(P11_0_TCPWM1_LINE1, PCLK_TCPWM1_CLOCKS1)},
|
||||
{P11_2, PWM_16b_2, CY_PIN_OUT_FUNCTION(P11_2_TCPWM1_LINE2, PCLK_TCPWM1_CLOCKS2)},
|
||||
{P11_4, PWM_16b_3, CY_PIN_OUT_FUNCTION(P11_4_TCPWM1_LINE3, PCLK_TCPWM1_CLOCKS3)},
|
||||
{P12_0, PWM_16b_4, CY_PIN_OUT_FUNCTION(P12_0_TCPWM1_LINE4, PCLK_TCPWM1_CLOCKS4)},
|
||||
{P12_2, PWM_16b_5, CY_PIN_OUT_FUNCTION(P12_2_TCPWM1_LINE5, PCLK_TCPWM1_CLOCKS5)},
|
||||
{P12_4, PWM_16b_6, CY_PIN_OUT_FUNCTION(P12_4_TCPWM1_LINE6, PCLK_TCPWM1_CLOCKS6)},
|
||||
{P12_6, PWM_16b_7, CY_PIN_OUT_FUNCTION(P12_6_TCPWM1_LINE7, PCLK_TCPWM1_CLOCKS7)},
|
||||
{P13_0, PWM_16b_8, CY_PIN_OUT_FUNCTION(P13_0_TCPWM1_LINE8, PCLK_TCPWM1_CLOCKS8)},
|
||||
{P13_2, PWM_16b_9, CY_PIN_OUT_FUNCTION(P13_2_TCPWM1_LINE9, PCLK_TCPWM1_CLOCKS9)},
|
||||
{P13_4, PWM_16b_10, CY_PIN_OUT_FUNCTION(P13_4_TCPWM1_LINE10, PCLK_TCPWM1_CLOCKS10)},
|
||||
{P13_6, PWM_16b_11, CY_PIN_OUT_FUNCTION(P13_6_TCPWM1_LINE11, PCLK_TCPWM1_CLOCKS11)},
|
||||
// 16-bit PWM inverted outputs
|
||||
{P0_1, PWM_16b_0, CY_PIN_OUT_FUNCTION(P0_1_TCPWM1_LINE_COMPL0, PCLK_TCPWM1_CLOCKS0)},
|
||||
{P0_3, PWM_16b_1, CY_PIN_OUT_FUNCTION(P0_3_TCPWM1_LINE_COMPL1, PCLK_TCPWM1_CLOCKS1)},
|
||||
{P0_5, PWM_16b_2, CY_PIN_OUT_FUNCTION(P0_5_TCPWM1_LINE_COMPL2, PCLK_TCPWM1_CLOCKS2)},
|
||||
{P1_1, PWM_16b_3, CY_PIN_OUT_FUNCTION(P1_1_TCPWM1_LINE_COMPL3, PCLK_TCPWM1_CLOCKS3)},
|
||||
{P1_3, PWM_16b_12, CY_PIN_OUT_FUNCTION(P1_3_TCPWM1_LINE_COMPL12, PCLK_TCPWM1_CLOCKS12)},
|
||||
{P1_5, PWM_16b_14, CY_PIN_OUT_FUNCTION(P1_5_TCPWM1_LINE_COMPL14, PCLK_TCPWM1_CLOCKS14)},
|
||||
{P2_1, PWM_16b_15, CY_PIN_OUT_FUNCTION(P2_1_TCPWM1_LINE_COMPL15, PCLK_TCPWM1_CLOCKS15)},
|
||||
{P2_3, PWM_16b_16, CY_PIN_OUT_FUNCTION(P2_3_TCPWM1_LINE_COMPL16, PCLK_TCPWM1_CLOCKS16)},
|
||||
{P2_5, PWM_16b_17, CY_PIN_OUT_FUNCTION(P2_5_TCPWM1_LINE_COMPL17, PCLK_TCPWM1_CLOCKS17)},
|
||||
{P2_7, PWM_16b_18, CY_PIN_OUT_FUNCTION(P2_7_TCPWM1_LINE_COMPL18, PCLK_TCPWM1_CLOCKS18)},
|
||||
{P3_1, PWM_16b_19, CY_PIN_OUT_FUNCTION(P3_1_TCPWM1_LINE_COMPL19, PCLK_TCPWM1_CLOCKS19)},
|
||||
{P3_3, PWM_16b_20, CY_PIN_OUT_FUNCTION(P3_3_TCPWM1_LINE_COMPL20, PCLK_TCPWM1_CLOCKS20)},
|
||||
{P3_5, PWM_16b_21, CY_PIN_OUT_FUNCTION(P3_5_TCPWM1_LINE_COMPL21, PCLK_TCPWM1_CLOCKS21)},
|
||||
{P4_1, PWM_16b_22, CY_PIN_OUT_FUNCTION(P4_1_TCPWM1_LINE_COMPL22, PCLK_TCPWM1_CLOCKS22)},
|
||||
{P5_1, PWM_16b_4, CY_PIN_OUT_FUNCTION(P5_1_TCPWM1_LINE_COMPL4, PCLK_TCPWM1_CLOCKS4)},
|
||||
{P5_3, PWM_16b_5, CY_PIN_OUT_FUNCTION(P5_3_TCPWM1_LINE_COMPL5, PCLK_TCPWM1_CLOCKS5)},
|
||||
{P5_5, PWM_16b_6, CY_PIN_OUT_FUNCTION(P5_5_TCPWM1_LINE_COMPL6, PCLK_TCPWM1_CLOCKS6)},
|
||||
{P5_7, PWM_16b_7, CY_PIN_OUT_FUNCTION(P5_7_TCPWM1_LINE_COMPL7, PCLK_TCPWM1_CLOCKS7)},
|
||||
{P6_1, PWM_16b_8, CY_PIN_OUT_FUNCTION(P6_1_TCPWM1_LINE_COMPL8, PCLK_TCPWM1_CLOCKS8)},
|
||||
{P6_3, PWM_16b_9, CY_PIN_OUT_FUNCTION(P6_3_TCPWM1_LINE_COMPL9, PCLK_TCPWM1_CLOCKS9)},
|
||||
{P6_5, PWM_16b_10, CY_PIN_OUT_FUNCTION(P6_5_TCPWM1_LINE_COMPL10, PCLK_TCPWM1_CLOCKS10)},
|
||||
{P6_7, PWM_16b_11, CY_PIN_OUT_FUNCTION(P6_7_TCPWM1_LINE_COMPL11, PCLK_TCPWM1_CLOCKS11)},
|
||||
{P7_1, PWM_16b_12, CY_PIN_OUT_FUNCTION(P7_1_TCPWM1_LINE_COMPL12, PCLK_TCPWM1_CLOCKS12)},
|
||||
{P7_3, PWM_16b_13, CY_PIN_OUT_FUNCTION(P7_3_TCPWM1_LINE_COMPL13, PCLK_TCPWM1_CLOCKS13)},
|
||||
{P7_5, PWM_16b_14, CY_PIN_OUT_FUNCTION(P7_5_TCPWM1_LINE_COMPL14, PCLK_TCPWM1_CLOCKS14)},
|
||||
{P7_7, PWM_16b_15, CY_PIN_OUT_FUNCTION(P7_7_TCPWM1_LINE_COMPL15, PCLK_TCPWM1_CLOCKS15)},
|
||||
{P8_1, PWM_16b_16, CY_PIN_OUT_FUNCTION(P8_1_TCPWM1_LINE_COMPL16, PCLK_TCPWM1_CLOCKS16)},
|
||||
{P8_3, PWM_16b_17, CY_PIN_OUT_FUNCTION(P8_3_TCPWM1_LINE_COMPL17, PCLK_TCPWM1_CLOCKS17)},
|
||||
{P8_5, PWM_16b_18, CY_PIN_OUT_FUNCTION(P8_5_TCPWM1_LINE_COMPL18, PCLK_TCPWM1_CLOCKS18)},
|
||||
{P8_7, PWM_16b_19, CY_PIN_OUT_FUNCTION(P8_7_TCPWM1_LINE_COMPL19, PCLK_TCPWM1_CLOCKS19)},
|
||||
{P9_1, PWM_16b_20, CY_PIN_OUT_FUNCTION(P9_1_TCPWM1_LINE_COMPL20, PCLK_TCPWM1_CLOCKS20)},
|
||||
{P9_3, PWM_16b_21, CY_PIN_OUT_FUNCTION(P9_3_TCPWM1_LINE_COMPL21, PCLK_TCPWM1_CLOCKS21)},
|
||||
{P9_5, PWM_16b_0, CY_PIN_OUT_FUNCTION(P9_5_TCPWM1_LINE_COMPL0, PCLK_TCPWM1_CLOCKS0)},
|
||||
{P9_7, PWM_16b_1, CY_PIN_OUT_FUNCTION(P9_7_TCPWM1_LINE_COMPL1, PCLK_TCPWM1_CLOCKS1)},
|
||||
{P10_1, PWM_16b_22, CY_PIN_OUT_FUNCTION(P10_1_TCPWM1_LINE_COMPL22, PCLK_TCPWM1_CLOCKS22)},
|
||||
{P10_3, PWM_16b_23, CY_PIN_OUT_FUNCTION(P10_3_TCPWM1_LINE_COMPL23, PCLK_TCPWM1_CLOCKS23)},
|
||||
{P10_5, PWM_16b_0, CY_PIN_OUT_FUNCTION(P10_5_TCPWM1_LINE_COMPL0, PCLK_TCPWM1_CLOCKS0)},
|
||||
{P10_7, PWM_16b_2, CY_PIN_OUT_FUNCTION(P10_7_TCPWM1_LINE_COMPL2, PCLK_TCPWM1_CLOCKS2)},
|
||||
{P11_1, PWM_16b_1, CY_PIN_OUT_FUNCTION(P11_1_TCPWM1_LINE_COMPL1, PCLK_TCPWM1_CLOCKS1)},
|
||||
{P11_3, PWM_16b_2, CY_PIN_OUT_FUNCTION(P11_3_TCPWM1_LINE_COMPL2, PCLK_TCPWM1_CLOCKS2)},
|
||||
{P11_5, PWM_16b_3, CY_PIN_OUT_FUNCTION(P11_5_TCPWM1_LINE_COMPL3, PCLK_TCPWM1_CLOCKS3)},
|
||||
{P12_1, PWM_16b_4, CY_PIN_OUT_FUNCTION(P12_1_TCPWM1_LINE_COMPL4, PCLK_TCPWM1_CLOCKS4)},
|
||||
{P12_3, PWM_16b_5, CY_PIN_OUT_FUNCTION(P12_3_TCPWM1_LINE_COMPL5, PCLK_TCPWM1_CLOCKS5)},
|
||||
{P12_5, PWM_16b_6, CY_PIN_OUT_FUNCTION(P12_5_TCPWM1_LINE_COMPL6, PCLK_TCPWM1_CLOCKS6)},
|
||||
{P12_7, PWM_16b_7, CY_PIN_OUT_FUNCTION(P12_7_TCPWM1_LINE_COMPL7, PCLK_TCPWM1_CLOCKS7)},
|
||||
{P13_1, PWM_16b_8, CY_PIN_OUT_FUNCTION(P13_1_TCPWM1_LINE_COMPL8, PCLK_TCPWM1_CLOCKS8)},
|
||||
{P13_3, PWM_16b_9, CY_PIN_OUT_FUNCTION(P13_3_TCPWM1_LINE_COMPL9, PCLK_TCPWM1_CLOCKS9)},
|
||||
{P13_5, PWM_16b_10, CY_PIN_OUT_FUNCTION(P13_5_TCPWM1_LINE_COMPL10, PCLK_TCPWM1_CLOCKS10)},
|
||||
{P13_7, PWM_16b_11, CY_PIN_OUT_FUNCTION(P13_7_TCPWM1_LINE_COMPL11, PCLK_TCPWM1_CLOCKS11)},
|
||||
// 32-bit PWM outputs
|
||||
{PWM32(P0_0), PWM_32b_0, CY_PIN_OUT_FUNCTION(P0_0_TCPWM0_LINE0, PCLK_TCPWM0_CLOCKS0)},
|
||||
{PWM32(P0_2), PWM_32b_1, CY_PIN_OUT_FUNCTION(P0_2_TCPWM0_LINE1, PCLK_TCPWM0_CLOCKS1)},
|
||||
{PWM32(P0_4), PWM_32b_2, CY_PIN_OUT_FUNCTION(P0_4_TCPWM0_LINE2, PCLK_TCPWM0_CLOCKS2)},
|
||||
{PWM32(P1_0), PWM_32b_3, CY_PIN_OUT_FUNCTION(P1_0_TCPWM0_LINE3, PCLK_TCPWM0_CLOCKS3)},
|
||||
{PWM32(P1_2), PWM_32b_4, CY_PIN_OUT_FUNCTION(P1_2_TCPWM0_LINE4, PCLK_TCPWM0_CLOCKS4)},
|
||||
{PWM32(P1_4), PWM_32b_5, CY_PIN_OUT_FUNCTION(P1_4_TCPWM0_LINE5, PCLK_TCPWM0_CLOCKS5)},
|
||||
{PWM32(P2_0), PWM_32b_6, CY_PIN_OUT_FUNCTION(P2_0_TCPWM0_LINE6, PCLK_TCPWM0_CLOCKS6)},
|
||||
{PWM32(P2_2), PWM_32b_7, CY_PIN_OUT_FUNCTION(P2_2_TCPWM0_LINE7, PCLK_TCPWM0_CLOCKS7)},
|
||||
{PWM32(P2_4), PWM_32b_0, CY_PIN_OUT_FUNCTION(P2_4_TCPWM0_LINE0, PCLK_TCPWM0_CLOCKS0)},
|
||||
{PWM32(P2_6), PWM_32b_1, CY_PIN_OUT_FUNCTION(P2_6_TCPWM0_LINE1, PCLK_TCPWM0_CLOCKS1)},
|
||||
{PWM32(P3_0), PWM_32b_2, CY_PIN_OUT_FUNCTION(P3_0_TCPWM0_LINE2, PCLK_TCPWM0_CLOCKS2)},
|
||||
{PWM32(P3_2), PWM_32b_3, CY_PIN_OUT_FUNCTION(P3_2_TCPWM0_LINE3, PCLK_TCPWM0_CLOCKS3)},
|
||||
{PWM32(P3_4), PWM_32b_4, CY_PIN_OUT_FUNCTION(P3_4_TCPWM0_LINE4, PCLK_TCPWM0_CLOCKS4)},
|
||||
{PWM32(P4_0), PWM_32b_5, CY_PIN_OUT_FUNCTION(P4_0_TCPWM0_LINE5, PCLK_TCPWM0_CLOCKS5)},
|
||||
//{PWM32(P4_2), PWM_32b_6, CY_PIN_OUT_FUNCTION(P4_2_TCPWM0_LINE6, PCLK_TCPWM0_CLOCKS6)},
|
||||
{PWM32(P5_0), PWM_32b_4, CY_PIN_OUT_FUNCTION(P5_0_TCPWM0_LINE4, PCLK_TCPWM0_CLOCKS4)},
|
||||
{PWM32(P5_2), PWM_32b_5, CY_PIN_OUT_FUNCTION(P5_2_TCPWM0_LINE5, PCLK_TCPWM0_CLOCKS5)},
|
||||
{PWM32(P5_4), PWM_32b_6, CY_PIN_OUT_FUNCTION(P5_4_TCPWM0_LINE6, PCLK_TCPWM0_CLOCKS6)},
|
||||
{PWM32(P5_6), PWM_32b_7, CY_PIN_OUT_FUNCTION(P5_6_TCPWM0_LINE7, PCLK_TCPWM0_CLOCKS7)},
|
||||
{PWM32(P6_0), PWM_32b_0, CY_PIN_OUT_FUNCTION(P6_0_TCPWM0_LINE0, PCLK_TCPWM0_CLOCKS0)},
|
||||
{PWM32(P6_2), PWM_32b_1, CY_PIN_OUT_FUNCTION(P6_2_TCPWM0_LINE1, PCLK_TCPWM0_CLOCKS1)},
|
||||
{PWM32(P6_4), PWM_32b_2, CY_PIN_OUT_FUNCTION(P6_4_TCPWM0_LINE2, PCLK_TCPWM0_CLOCKS2)},
|
||||
{PWM32(P6_6), PWM_32b_3, CY_PIN_OUT_FUNCTION(P6_6_TCPWM0_LINE3, PCLK_TCPWM0_CLOCKS3)},
|
||||
{PWM32(P7_0), PWM_32b_4, CY_PIN_OUT_FUNCTION(P7_0_TCPWM0_LINE4, PCLK_TCPWM0_CLOCKS4)},
|
||||
{PWM32(P7_2), PWM_32b_5, CY_PIN_OUT_FUNCTION(P7_2_TCPWM0_LINE5, PCLK_TCPWM0_CLOCKS5)},
|
||||
{PWM32(P7_4), PWM_32b_6, CY_PIN_OUT_FUNCTION(P7_4_TCPWM0_LINE6, PCLK_TCPWM0_CLOCKS6)},
|
||||
{PWM32(P7_6), PWM_32b_7, CY_PIN_OUT_FUNCTION(P7_6_TCPWM0_LINE7, PCLK_TCPWM0_CLOCKS7)},
|
||||
{PWM32(P8_0), PWM_32b_0, CY_PIN_OUT_FUNCTION(P8_0_TCPWM0_LINE0, PCLK_TCPWM0_CLOCKS0)},
|
||||
{PWM32(P8_2), PWM_32b_1, CY_PIN_OUT_FUNCTION(P8_2_TCPWM0_LINE1, PCLK_TCPWM0_CLOCKS1)},
|
||||
{PWM32(P8_4), PWM_32b_2, CY_PIN_OUT_FUNCTION(P8_4_TCPWM0_LINE2, PCLK_TCPWM0_CLOCKS2)},
|
||||
{PWM32(P8_6), PWM_32b_3, CY_PIN_OUT_FUNCTION(P8_6_TCPWM0_LINE3, PCLK_TCPWM0_CLOCKS3)},
|
||||
{PWM32(P9_0), PWM_32b_4, CY_PIN_OUT_FUNCTION(P9_0_TCPWM0_LINE4, PCLK_TCPWM0_CLOCKS4)},
|
||||
{PWM32(P9_2), PWM_32b_5, CY_PIN_OUT_FUNCTION(P9_2_TCPWM0_LINE5, PCLK_TCPWM0_CLOCKS5)},
|
||||
{PWM32(P9_4), PWM_32b_7, CY_PIN_OUT_FUNCTION(P9_4_TCPWM0_LINE7, PCLK_TCPWM0_CLOCKS7)},
|
||||
{PWM32(P9_6), PWM_32b_0, CY_PIN_OUT_FUNCTION(P9_6_TCPWM0_LINE0, PCLK_TCPWM0_CLOCKS0)},
|
||||
{PWM32(P10_0), PWM_32b_6, CY_PIN_OUT_FUNCTION(P10_0_TCPWM0_LINE6, PCLK_TCPWM0_CLOCKS6)},
|
||||
{PWM32(P10_2), PWM_32b_7, CY_PIN_OUT_FUNCTION(P10_2_TCPWM0_LINE7, PCLK_TCPWM0_CLOCKS7)},
|
||||
{PWM32(P10_4), PWM_32b_0, CY_PIN_OUT_FUNCTION(P10_4_TCPWM0_LINE0, PCLK_TCPWM0_CLOCKS0)},
|
||||
{PWM32(P10_6), PWM_32b_1, CY_PIN_OUT_FUNCTION(P10_6_TCPWM0_LINE1, PCLK_TCPWM0_CLOCKS1)},
|
||||
{PWM32(P11_0), PWM_32b_1, CY_PIN_OUT_FUNCTION(P11_0_TCPWM0_LINE1, PCLK_TCPWM0_CLOCKS1)},
|
||||
{PWM32(P11_2), PWM_32b_2, CY_PIN_OUT_FUNCTION(P11_2_TCPWM0_LINE2, PCLK_TCPWM0_CLOCKS2)},
|
||||
{PWM32(P11_4), PWM_32b_3, CY_PIN_OUT_FUNCTION(P11_4_TCPWM0_LINE3, PCLK_TCPWM0_CLOCKS3)},
|
||||
{PWM32(P12_0), PWM_32b_4, CY_PIN_OUT_FUNCTION(P12_0_TCPWM0_LINE4, PCLK_TCPWM0_CLOCKS4)},
|
||||
{PWM32(P12_2), PWM_32b_5, CY_PIN_OUT_FUNCTION(P12_2_TCPWM0_LINE5, PCLK_TCPWM0_CLOCKS5)},
|
||||
{PWM32(P12_4), PWM_32b_6, CY_PIN_OUT_FUNCTION(P12_4_TCPWM0_LINE6, PCLK_TCPWM0_CLOCKS6)},
|
||||
{PWM32(P12_6), PWM_32b_7, CY_PIN_OUT_FUNCTION(P12_6_TCPWM0_LINE7, PCLK_TCPWM0_CLOCKS7)},
|
||||
{PWM32(P13_0), PWM_32b_0, CY_PIN_OUT_FUNCTION(P13_0_TCPWM0_LINE0, PCLK_TCPWM0_CLOCKS0)},
|
||||
{PWM32(P13_2), PWM_32b_1, CY_PIN_OUT_FUNCTION(P13_2_TCPWM0_LINE1, PCLK_TCPWM0_CLOCKS1)},
|
||||
{PWM32(P13_4), PWM_32b_2, CY_PIN_OUT_FUNCTION(P13_4_TCPWM0_LINE2, PCLK_TCPWM0_CLOCKS2)},
|
||||
{PWM32(P13_6), PWM_32b_3, CY_PIN_OUT_FUNCTION(P13_6_TCPWM0_LINE3, PCLK_TCPWM0_CLOCKS3)},
|
||||
// 32-bit PWM inverted outputs
|
||||
{PWM32(P0_1), PWM_32b_0, CY_PIN_OUT_FUNCTION(P0_1_TCPWM0_LINE_COMPL0, PCLK_TCPWM0_CLOCKS0)},
|
||||
{PWM32(P0_3), PWM_32b_1, CY_PIN_OUT_FUNCTION(P0_3_TCPWM0_LINE_COMPL1, PCLK_TCPWM0_CLOCKS1)},
|
||||
{PWM32(P0_5), PWM_32b_2, CY_PIN_OUT_FUNCTION(P0_5_TCPWM0_LINE_COMPL2, PCLK_TCPWM0_CLOCKS2)},
|
||||
{PWM32(P1_1), PWM_32b_3, CY_PIN_OUT_FUNCTION(P1_1_TCPWM0_LINE_COMPL3, PCLK_TCPWM0_CLOCKS3)},
|
||||
{PWM32(P1_3), PWM_32b_4, CY_PIN_OUT_FUNCTION(P1_3_TCPWM0_LINE_COMPL4, PCLK_TCPWM0_CLOCKS4)},
|
||||
{PWM32(P1_5), PWM_32b_5, CY_PIN_OUT_FUNCTION(P1_5_TCPWM0_LINE_COMPL5, PCLK_TCPWM0_CLOCKS5)},
|
||||
{PWM32(P2_1), PWM_32b_6, CY_PIN_OUT_FUNCTION(P2_1_TCPWM0_LINE_COMPL6, PCLK_TCPWM0_CLOCKS6)},
|
||||
{PWM32(P2_3), PWM_32b_7, CY_PIN_OUT_FUNCTION(P2_3_TCPWM0_LINE_COMPL7, PCLK_TCPWM0_CLOCKS7)},
|
||||
{PWM32(P2_5), PWM_32b_0, CY_PIN_OUT_FUNCTION(P2_5_TCPWM0_LINE_COMPL0, PCLK_TCPWM0_CLOCKS0)},
|
||||
{PWM32(P2_7), PWM_32b_1, CY_PIN_OUT_FUNCTION(P2_7_TCPWM0_LINE_COMPL1, PCLK_TCPWM0_CLOCKS1)},
|
||||
{PWM32(P3_1), PWM_32b_2, CY_PIN_OUT_FUNCTION(P3_1_TCPWM0_LINE_COMPL2, PCLK_TCPWM0_CLOCKS2)},
|
||||
{PWM32(P3_3), PWM_32b_3, CY_PIN_OUT_FUNCTION(P3_3_TCPWM0_LINE_COMPL3, PCLK_TCPWM0_CLOCKS3)},
|
||||
{PWM32(P3_5), PWM_32b_4, CY_PIN_OUT_FUNCTION(P3_5_TCPWM0_LINE_COMPL4, PCLK_TCPWM0_CLOCKS4)},
|
||||
{PWM32(P4_1), PWM_32b_5, CY_PIN_OUT_FUNCTION(P4_1_TCPWM0_LINE_COMPL5, PCLK_TCPWM0_CLOCKS5)},
|
||||
//{PWM32(P4_3), PWM_32b_6, CY_PIN_OUT_FUNCTION(P4_3_TCPWM0_LINE_COMPL6, PCLK_TCPWM0_CLOCKS6)},
|
||||
{PWM32(P5_1), PWM_32b_4, CY_PIN_OUT_FUNCTION(P5_1_TCPWM0_LINE_COMPL4, PCLK_TCPWM0_CLOCKS4)},
|
||||
{PWM32(P5_3), PWM_32b_5, CY_PIN_OUT_FUNCTION(P5_3_TCPWM0_LINE_COMPL5, PCLK_TCPWM0_CLOCKS5)},
|
||||
{PWM32(P5_5), PWM_32b_6, CY_PIN_OUT_FUNCTION(P5_5_TCPWM0_LINE_COMPL6, PCLK_TCPWM0_CLOCKS6)},
|
||||
{PWM32(P5_7), PWM_32b_7, CY_PIN_OUT_FUNCTION(P5_7_TCPWM0_LINE_COMPL7, PCLK_TCPWM0_CLOCKS7)},
|
||||
{PWM32(P6_1), PWM_32b_0, CY_PIN_OUT_FUNCTION(P6_1_TCPWM0_LINE_COMPL0, PCLK_TCPWM0_CLOCKS0)},
|
||||
{PWM32(P6_3), PWM_32b_1, CY_PIN_OUT_FUNCTION(P6_3_TCPWM0_LINE_COMPL1, PCLK_TCPWM0_CLOCKS1)},
|
||||
{PWM32(P6_5), PWM_32b_2, CY_PIN_OUT_FUNCTION(P6_5_TCPWM0_LINE_COMPL2, PCLK_TCPWM0_CLOCKS2)},
|
||||
{PWM32(P6_7), PWM_32b_3, CY_PIN_OUT_FUNCTION(P6_7_TCPWM0_LINE_COMPL3, PCLK_TCPWM0_CLOCKS3)},
|
||||
{PWM32(P7_1), PWM_32b_4, CY_PIN_OUT_FUNCTION(P7_1_TCPWM0_LINE_COMPL4, PCLK_TCPWM0_CLOCKS4)},
|
||||
{PWM32(P7_3), PWM_32b_5, CY_PIN_OUT_FUNCTION(P7_3_TCPWM0_LINE_COMPL5, PCLK_TCPWM0_CLOCKS5)},
|
||||
{PWM32(P7_5), PWM_32b_6, CY_PIN_OUT_FUNCTION(P7_5_TCPWM0_LINE_COMPL6, PCLK_TCPWM0_CLOCKS6)},
|
||||
{PWM32(P7_7), PWM_32b_7, CY_PIN_OUT_FUNCTION(P7_7_TCPWM0_LINE_COMPL7, PCLK_TCPWM0_CLOCKS7)},
|
||||
{PWM32(P8_1), PWM_32b_0, CY_PIN_OUT_FUNCTION(P8_1_TCPWM0_LINE_COMPL0, PCLK_TCPWM0_CLOCKS0)},
|
||||
{PWM32(P8_3), PWM_32b_1, CY_PIN_OUT_FUNCTION(P8_3_TCPWM0_LINE_COMPL1, PCLK_TCPWM0_CLOCKS1)},
|
||||
{PWM32(P8_5), PWM_32b_2, CY_PIN_OUT_FUNCTION(P8_5_TCPWM0_LINE_COMPL2, PCLK_TCPWM0_CLOCKS2)},
|
||||
{PWM32(P8_7), PWM_32b_3, CY_PIN_OUT_FUNCTION(P8_7_TCPWM0_LINE_COMPL3, PCLK_TCPWM0_CLOCKS3)},
|
||||
{PWM32(P9_1), PWM_32b_4, CY_PIN_OUT_FUNCTION(P9_1_TCPWM0_LINE_COMPL4, PCLK_TCPWM0_CLOCKS4)},
|
||||
{PWM32(P9_3), PWM_32b_5, CY_PIN_OUT_FUNCTION(P9_3_TCPWM0_LINE_COMPL5, PCLK_TCPWM0_CLOCKS5)},
|
||||
{PWM32(P9_5), PWM_32b_7, CY_PIN_OUT_FUNCTION(P9_5_TCPWM0_LINE_COMPL7, PCLK_TCPWM0_CLOCKS7)},
|
||||
{PWM32(P9_7), PWM_32b_0, CY_PIN_OUT_FUNCTION(P9_7_TCPWM0_LINE_COMPL0, PCLK_TCPWM0_CLOCKS0)},
|
||||
{PWM32(P10_1), PWM_32b_6, CY_PIN_OUT_FUNCTION(P10_1_TCPWM0_LINE_COMPL6, PCLK_TCPWM0_CLOCKS6)},
|
||||
{PWM32(P10_3), PWM_32b_7, CY_PIN_OUT_FUNCTION(P10_3_TCPWM0_LINE_COMPL7, PCLK_TCPWM0_CLOCKS7)},
|
||||
{PWM32(P10_5), PWM_32b_0, CY_PIN_OUT_FUNCTION(P10_5_TCPWM0_LINE_COMPL0, PCLK_TCPWM0_CLOCKS0)},
|
||||
{PWM32(P10_7), PWM_32b_1, CY_PIN_OUT_FUNCTION(P10_7_TCPWM0_LINE_COMPL1, PCLK_TCPWM0_CLOCKS1)},
|
||||
{PWM32(P11_1), PWM_32b_1, CY_PIN_OUT_FUNCTION(P11_1_TCPWM0_LINE_COMPL1, PCLK_TCPWM0_CLOCKS1)},
|
||||
{PWM32(P11_3), PWM_32b_2, CY_PIN_OUT_FUNCTION(P11_3_TCPWM0_LINE_COMPL2, PCLK_TCPWM0_CLOCKS2)},
|
||||
{PWM32(P11_5), PWM_32b_3, CY_PIN_OUT_FUNCTION(P11_5_TCPWM0_LINE_COMPL3, PCLK_TCPWM0_CLOCKS3)},
|
||||
{PWM32(P12_1), PWM_32b_4, CY_PIN_OUT_FUNCTION(P12_1_TCPWM0_LINE_COMPL4, PCLK_TCPWM0_CLOCKS4)},
|
||||
{PWM32(P12_3), PWM_32b_5, CY_PIN_OUT_FUNCTION(P12_3_TCPWM0_LINE_COMPL5, PCLK_TCPWM0_CLOCKS5)},
|
||||
{PWM32(P12_5), PWM_32b_6, CY_PIN_OUT_FUNCTION(P12_5_TCPWM0_LINE_COMPL6, PCLK_TCPWM0_CLOCKS6)},
|
||||
{PWM32(P12_7), PWM_32b_7, CY_PIN_OUT_FUNCTION(P12_7_TCPWM0_LINE_COMPL7, PCLK_TCPWM0_CLOCKS7)},
|
||||
{PWM32(P13_1), PWM_32b_0, CY_PIN_OUT_FUNCTION(P13_1_TCPWM0_LINE_COMPL0, PCLK_TCPWM0_CLOCKS0)},
|
||||
{PWM32(P13_3), PWM_32b_1, CY_PIN_OUT_FUNCTION(P13_3_TCPWM0_LINE_COMPL1, PCLK_TCPWM0_CLOCKS1)},
|
||||
{PWM32(P13_5), PWM_32b_2, CY_PIN_OUT_FUNCTION(P13_5_TCPWM0_LINE_COMPL2, PCLK_TCPWM0_CLOCKS2)},
|
||||
{PWM32(P13_7), PWM_32b_3, CY_PIN_OUT_FUNCTION(P13_7_TCPWM0_LINE_COMPL3, PCLK_TCPWM0_CLOCKS3)},
|
||||
{NC, NC, 0}
|
||||
};
|
||||
#endif // DEVICE_PWMOUT
|
||||
|
||||
#if DEVICE_ANALOGIN
|
||||
const PinMap PinMap_ADC[] = {
|
||||
{P9_0, ADC_0, CY_PIN_ANALOG_FUNCTION(PCLK_PASS_CLOCK_SAR)}, // The SAR ADC Vplus input connects to the P9_0 pin through the AMUXA bus
|
||||
{P9_1, ADC_0, CY_PIN_ANALOG_FUNCTION(PCLK_PASS_CLOCK_SAR)}, // The SAR ADC Vplus input connects to the P9_1 pin through the AMUXA bus
|
||||
{P9_2, ADC_0, CY_PIN_ANALOG_FUNCTION(PCLK_PASS_CLOCK_SAR)}, // The SAR ADC Vplus input connects to the P9_2 pin through the AMUXA bus
|
||||
{P9_4, ADC_0, CY_PIN_ANALOG_FUNCTION(PCLK_PASS_CLOCK_SAR)}, // The SAR ADC Vplus input connects to the P9_4 pin through the AMUXA bus
|
||||
{P9_5, ADC_0, CY_PIN_ANALOG_FUNCTION(PCLK_PASS_CLOCK_SAR)}, // The SAR ADC Vplus input connects to the P9_5 pin through the AMUXA bus
|
||||
{P9_6, ADC_0, CY_PIN_ANALOG_FUNCTION(PCLK_PASS_CLOCK_SAR)}, // The SAR ADC Vplus input connects to the P9_6 pin through the AMUXA bus
|
||||
{P10_0, ADC_0, CY_PIN_ANALOG_FUNCTION(PCLK_PASS_CLOCK_SAR)}, // The SAR ADC Vplus input has the direct connection to the P10_0 pin
|
||||
{P10_1, ADC_0, CY_PIN_ANALOG_FUNCTION(PCLK_PASS_CLOCK_SAR)}, // The SAR ADC Vplus input has the direct connection to the P10_1 pin
|
||||
{P10_2, ADC_0, CY_PIN_ANALOG_FUNCTION(PCLK_PASS_CLOCK_SAR)}, // The SAR ADC Vplus input has the direct connection to the P10_2 pin
|
||||
{P10_3, ADC_0, CY_PIN_ANALOG_FUNCTION(PCLK_PASS_CLOCK_SAR)}, // The SAR ADC Vplus input has the direct connection to the P10_3 pin
|
||||
{P10_4, ADC_0, CY_PIN_ANALOG_FUNCTION(PCLK_PASS_CLOCK_SAR)}, // The SAR ADC Vplus input has the direct connection to the P10_4 pin
|
||||
{P10_5, ADC_0, CY_PIN_ANALOG_FUNCTION(PCLK_PASS_CLOCK_SAR)}, // The SAR ADC Vplus input has the direct connection to the P10_5 pin
|
||||
{P10_6, ADC_0, CY_PIN_ANALOG_FUNCTION(PCLK_PASS_CLOCK_SAR)}, // The SAR ADC Vplus input has the direct connection to the P10_6 pin
|
||||
{P10_7, ADC_0, CY_PIN_ANALOG_FUNCTION(PCLK_PASS_CLOCK_SAR)}, // The SAR ADC Vplus input has the direct connection to the P10_7 pin
|
||||
{NC, NC, 0}
|
||||
};
|
||||
#endif // DEVICE_ANALOGIN
|
||||
|
||||
#if DEVICE_QSPI
|
||||
const PinMap PinMap_QSPI_SCLK[] = { // does not use PERI clock, uses HFCLK2
|
||||
{P11_7, SMIF_0, CY_PIN_OUT_FUNCTION(P11_7_SMIF_SPI_CLK, 0)},
|
||||
{NC, NC, 0}
|
||||
};
|
||||
|
||||
// Ensure that the spi_data pins are defined in the order 0 to 7
|
||||
const PinMap PinMap_QSPI_DATA[] = { // does not use PERI clock, uses HFCLK2
|
||||
{P11_6, SMIF_0, CY_PIN_OUT_FUNCTION(P11_6_SMIF_SPI_DATA0, 0)}, // spi_data0
|
||||
{P11_5, SMIF_0, CY_PIN_OUT_FUNCTION(P11_5_SMIF_SPI_DATA1, 0)}, // spi_data1
|
||||
{P11_4, SMIF_0, CY_PIN_OUT_FUNCTION(P11_4_SMIF_SPI_DATA2, 0)}, // spi_data2
|
||||
{P11_3, SMIF_0, CY_PIN_OUT_FUNCTION(P11_3_SMIF_SPI_DATA3, 0)}, // spi_data3
|
||||
{P12_0, SMIF_0, CY_PIN_OUT_FUNCTION(P12_0_SMIF_SPI_DATA4, 0)}, // spi_data4
|
||||
{P12_1, SMIF_0, CY_PIN_OUT_FUNCTION(P12_1_SMIF_SPI_DATA5, 0)}, // spi_data5
|
||||
{P12_2, SMIF_0, CY_PIN_OUT_FUNCTION(P12_2_SMIF_SPI_DATA6, 0)}, // spi_data6
|
||||
{P12_3, SMIF_0, CY_PIN_OUT_FUNCTION(P12_3_SMIF_SPI_DATA7, 0)}, // spi_data7
|
||||
{NC, NC, 0}
|
||||
};
|
||||
|
||||
// Ensure that the spi_select pins are defined in the order 0 to 3
|
||||
const PinMap PinMap_QSPI_SSEL[] = { // does not use PERI clock, uses HFCLK2
|
||||
{P11_2, SMIF_0, CY_PIN_OUT_FUNCTION(P11_2_SMIF_SPI_SELECT0, 0)}, // spi_select0
|
||||
{P11_1, SMIF_0, CY_PIN_OUT_FUNCTION(P11_1_SMIF_SPI_SELECT1, 0)}, // spi_select1
|
||||
{P11_0, SMIF_0, CY_PIN_OUT_FUNCTION(P11_0_SMIF_SPI_SELECT2, 0)}, // spi_select2
|
||||
{P12_4, SMIF_0, CY_PIN_OUT_FUNCTION(P12_4_SMIF_SPI_SELECT3, 0)}, // spi_select3
|
||||
{NC, NC, 0}
|
||||
};
|
||||
#endif // DEVICE_QSPI
|
||||
|
|
@ -1,285 +0,0 @@
|
|||
/*
|
||||
* mbed Microcontroller Library
|
||||
* Copyright (c) 2017-2018 Future Electronics
|
||||
* Copyright (c) 2019 Cypress Semiconductor Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef MBED_PINNAMES_H
|
||||
#define MBED_PINNAMES_H
|
||||
|
||||
#include "cmsis.h"
|
||||
#include "PinNamesTypes.h"
|
||||
#include "PortNames.h"
|
||||
|
||||
// PinName[15-0] = Port[15-8] + Pin[7-0]
|
||||
typedef enum {
|
||||
P0_0 = (Port0 << 8) + 0x00,
|
||||
P0_1 = (Port0 << 8) + 0x01,
|
||||
P0_2 = (Port0 << 8) + 0x02,
|
||||
P0_3 = (Port0 << 8) + 0x03,
|
||||
P0_4 = (Port0 << 8) + 0x04,
|
||||
P0_5 = (Port0 << 8) + 0x05,
|
||||
P0_6 = (Port0 << 8) + 0x06,
|
||||
P0_7 = (Port0 << 8) + 0x07,
|
||||
|
||||
P1_0 = (Port1 << 8) + 0x00,
|
||||
P1_1 = (Port1 << 8) + 0x01,
|
||||
P1_2 = (Port1 << 8) + 0x02,
|
||||
P1_3 = (Port1 << 8) + 0x03,
|
||||
P1_4 = (Port1 << 8) + 0x04,
|
||||
P1_5 = (Port1 << 8) + 0x05,
|
||||
P1_6 = (Port1 << 8) + 0x06,
|
||||
P1_7 = (Port1 << 8) + 0x07,
|
||||
|
||||
P2_0 = (Port2 << 8) + 0x00,
|
||||
P2_1 = (Port2 << 8) + 0x01,
|
||||
P2_2 = (Port2 << 8) + 0x02,
|
||||
P2_3 = (Port2 << 8) + 0x03,
|
||||
P2_4 = (Port2 << 8) + 0x04,
|
||||
P2_5 = (Port2 << 8) + 0x05,
|
||||
P2_6 = (Port2 << 8) + 0x06,
|
||||
P2_7 = (Port2 << 8) + 0x07,
|
||||
|
||||
P3_0 = (Port3 << 8) + 0x00,
|
||||
P3_1 = (Port3 << 8) + 0x01,
|
||||
P3_2 = (Port3 << 8) + 0x02,
|
||||
P3_3 = (Port3 << 8) + 0x03,
|
||||
P3_4 = (Port3 << 8) + 0x04,
|
||||
P3_5 = (Port3 << 8) + 0x05,
|
||||
P3_6 = (Port3 << 8) + 0x06,
|
||||
P3_7 = (Port3 << 8) + 0x07,
|
||||
|
||||
P4_0 = (Port4 << 8) + 0x00,
|
||||
P4_1 = (Port4 << 8) + 0x01,
|
||||
P4_2 = (Port4 << 8) + 0x02,
|
||||
P4_3 = (Port4 << 8) + 0x03,
|
||||
P4_4 = (Port4 << 8) + 0x04,
|
||||
P4_5 = (Port4 << 8) + 0x05,
|
||||
P4_6 = (Port4 << 8) + 0x06,
|
||||
P4_7 = (Port4 << 8) + 0x07,
|
||||
|
||||
P5_0 = (Port5 << 8) + 0x00,
|
||||
P5_1 = (Port5 << 8) + 0x01,
|
||||
P5_2 = (Port5 << 8) + 0x02,
|
||||
P5_3 = (Port5 << 8) + 0x03,
|
||||
P5_4 = (Port5 << 8) + 0x04,
|
||||
P5_5 = (Port5 << 8) + 0x05,
|
||||
P5_6 = (Port5 << 8) + 0x06,
|
||||
P5_7 = (Port5 << 8) + 0x07,
|
||||
|
||||
P6_0 = (Port6 << 8) + 0x00,
|
||||
P6_1 = (Port6 << 8) + 0x01,
|
||||
P6_2 = (Port6 << 8) + 0x02,
|
||||
P6_3 = (Port6 << 8) + 0x03,
|
||||
P6_4 = (Port6 << 8) + 0x04,
|
||||
P6_5 = (Port6 << 8) + 0x05,
|
||||
P6_6 = (Port6 << 8) + 0x06,
|
||||
P6_7 = (Port6 << 8) + 0x07,
|
||||
|
||||
P7_0 = (Port7 << 8) + 0x00,
|
||||
P7_1 = (Port7 << 8) + 0x01,
|
||||
P7_2 = (Port7 << 8) + 0x02,
|
||||
P7_3 = (Port7 << 8) + 0x03,
|
||||
P7_4 = (Port7 << 8) + 0x04,
|
||||
P7_5 = (Port7 << 8) + 0x05,
|
||||
P7_6 = (Port7 << 8) + 0x06,
|
||||
P7_7 = (Port7 << 8) + 0x07,
|
||||
|
||||
P8_0 = (Port8 << 8) + 0x00,
|
||||
P8_1 = (Port8 << 8) + 0x01,
|
||||
P8_2 = (Port8 << 8) + 0x02,
|
||||
P8_3 = (Port8 << 8) + 0x03,
|
||||
P8_4 = (Port8 << 8) + 0x04,
|
||||
P8_5 = (Port8 << 8) + 0x05,
|
||||
P8_6 = (Port8 << 8) + 0x06,
|
||||
P8_7 = (Port8 << 8) + 0x07,
|
||||
|
||||
P9_0 = (Port9 << 8) + 0x00,
|
||||
P9_1 = (Port9 << 8) + 0x01,
|
||||
P9_2 = (Port9 << 8) + 0x02,
|
||||
P9_3 = (Port9 << 8) + 0x03,
|
||||
P9_4 = (Port9 << 8) + 0x04,
|
||||
P9_5 = (Port9 << 8) + 0x05,
|
||||
P9_6 = (Port9 << 8) + 0x06,
|
||||
P9_7 = (Port9 << 8) + 0x07,
|
||||
|
||||
P10_0 = (Port10 << 8) + 0x00,
|
||||
P10_1 = (Port10 << 8) + 0x01,
|
||||
P10_2 = (Port10 << 8) + 0x02,
|
||||
P10_3 = (Port10 << 8) + 0x03,
|
||||
P10_4 = (Port10 << 8) + 0x04,
|
||||
P10_5 = (Port10 << 8) + 0x05,
|
||||
P10_6 = (Port10 << 8) + 0x06,
|
||||
P10_7 = (Port10 << 8) + 0x07,
|
||||
|
||||
P11_0 = (Port11 << 8) + 0x00,
|
||||
P11_1 = (Port11 << 8) + 0x01,
|
||||
P11_2 = (Port11 << 8) + 0x02,
|
||||
P11_3 = (Port11 << 8) + 0x03,
|
||||
P11_4 = (Port11 << 8) + 0x04,
|
||||
P11_5 = (Port11 << 8) + 0x05,
|
||||
P11_6 = (Port11 << 8) + 0x06,
|
||||
P11_7 = (Port11 << 8) + 0x07,
|
||||
|
||||
P12_0 = (Port12 << 8) + 0x00,
|
||||
P12_1 = (Port12 << 8) + 0x01,
|
||||
P12_2 = (Port12 << 8) + 0x02,
|
||||
P12_3 = (Port12 << 8) + 0x03,
|
||||
P12_4 = (Port12 << 8) + 0x04,
|
||||
P12_5 = (Port12 << 8) + 0x05,
|
||||
P12_6 = (Port12 << 8) + 0x06,
|
||||
P12_7 = (Port12 << 8) + 0x07,
|
||||
|
||||
P13_0 = (Port13 << 8) + 0x00,
|
||||
P13_1 = (Port13 << 8) + 0x01,
|
||||
P13_2 = (Port13 << 8) + 0x02,
|
||||
P13_3 = (Port13 << 8) + 0x03,
|
||||
P13_4 = (Port13 << 8) + 0x04,
|
||||
P13_5 = (Port13 << 8) + 0x05,
|
||||
P13_6 = (Port13 << 8) + 0x06,
|
||||
P13_7 = (Port13 << 8) + 0x07,
|
||||
|
||||
// Not connected
|
||||
NC = (int)0xFFFFFFFF,
|
||||
|
||||
// Arduino connector namings
|
||||
A0 = P10_0,
|
||||
A1 = P10_1,
|
||||
A2 = P10_2,
|
||||
A3 = P10_3,
|
||||
A4 = P10_4,
|
||||
A5 = P10_5,
|
||||
|
||||
D0 = P5_0,
|
||||
D1 = P5_1,
|
||||
D2 = P5_2,
|
||||
D3 = P5_3,
|
||||
D4 = P5_4,
|
||||
D5 = P5_5,
|
||||
D6 = P5_6,
|
||||
D7 = P0_2,
|
||||
D8 = P13_0,
|
||||
D9 = P13_1,
|
||||
D10 = P12_3,
|
||||
D11 = P12_0,
|
||||
D12 = P12_1,
|
||||
D13 = P12_2,
|
||||
D14 = P6_1,
|
||||
D15 = P6_0,
|
||||
|
||||
// Generic signal names
|
||||
|
||||
I2C_SCL = P6_0,
|
||||
I2C_SDA = P6_1,
|
||||
|
||||
SPI_MOSI = P12_0,
|
||||
SPI_MISO = P12_1,
|
||||
SPI_CLK = P12_2,
|
||||
SPI_CS = P12_4,
|
||||
|
||||
UART_RX = P5_0,
|
||||
UART_TX = P5_1,
|
||||
UART_RTS = P5_2,
|
||||
UART_CTS = P5_3,
|
||||
|
||||
BT_UART_RX = P3_0,
|
||||
BT_UART_TX = P3_1,
|
||||
BT_UART_CTS = P3_3,
|
||||
BT_UART_RTS = P3_2,
|
||||
|
||||
BT_PIN_POWER = P3_4,
|
||||
BT_PIN_HOST_WAKE = P3_5,
|
||||
BT_PIN_DEVICE_WAKE = P4_0,
|
||||
// Reset pin unavailable
|
||||
|
||||
|
||||
SWITCH2 = P0_4,
|
||||
LED1 = P0_3,
|
||||
LED2 = P1_1,
|
||||
LED3 = P11_1,
|
||||
LED4 = P1_5,
|
||||
LED5 = P13_7,
|
||||
|
||||
LED_RED = LED1,
|
||||
LED_BLUE = LED3,
|
||||
LED_GREEN = LED2,
|
||||
|
||||
USER_BUTTON = SWITCH2,
|
||||
BUTTON1 = USER_BUTTON,
|
||||
|
||||
QSPI_CLK = P11_7,
|
||||
QSPI_IO_0 = P11_6,
|
||||
QSPI_IO_1 = P11_5,
|
||||
QSPI_IO_2 = P11_4,
|
||||
QSPI_IO_3 = P11_3,
|
||||
QSPI_SEL = P11_2,
|
||||
|
||||
QSPI_FLASH1_IO0 = QSPI_IO_0,
|
||||
QSPI_FLASH1_IO1 = QSPI_IO_1,
|
||||
QSPI_FLASH1_IO2 = QSPI_IO_2,
|
||||
QSPI_FLASH1_IO3 = QSPI_IO_3,
|
||||
QSPI_FLASH1_SCK = QSPI_CLK,
|
||||
QSPI_FLASH1_CSN = QSPI_SEL,
|
||||
|
||||
// Standardized interfaces names
|
||||
STDIO_UART_TX = UART_TX,
|
||||
STDIO_UART_RX = UART_RX,
|
||||
STDIO_UART_CTS = UART_CTS,
|
||||
STDIO_UART_RTS = UART_RTS,
|
||||
|
||||
CY_STDIO_UART_RX = STDIO_UART_RX,
|
||||
CY_STDIO_UART_TX = STDIO_UART_TX,
|
||||
CY_STDIO_UART_CTS = STDIO_UART_CTS,
|
||||
CY_STDIO_UART_RTS = STDIO_UART_RTS,
|
||||
|
||||
CY_BT_UART_RX = BT_UART_RX,
|
||||
CY_BT_UART_TX = BT_UART_TX,
|
||||
CY_BT_UART_CTS = BT_UART_CTS,
|
||||
CY_BT_UART_RTS = BT_UART_RTS,
|
||||
|
||||
CY_BT_PIN_POWER = BT_PIN_POWER,
|
||||
CY_BT_PIN_HOST_WAKE = BT_PIN_HOST_WAKE,
|
||||
CY_BT_PIN_DEVICE_WAKE = BT_PIN_DEVICE_WAKE,
|
||||
|
||||
|
||||
USBTX = UART_TX,
|
||||
USBRX = UART_RX,
|
||||
|
||||
CY_WIFI_HOST_WAKE = P2_7,
|
||||
|
||||
// Not connected
|
||||
AOUT = (int)0xFFFFFFFF
|
||||
} PinName;
|
||||
|
||||
// PinName[15-0] = Port[15-8] + Pin[4-0]
|
||||
static inline unsigned CY_PIN(PinName pin)
|
||||
{
|
||||
return pin & 0x07;
|
||||
}
|
||||
|
||||
static inline unsigned CY_PORT(PinName pin)
|
||||
{
|
||||
return (pin >> 8) & 0xFF;
|
||||
}
|
||||
|
||||
// Because MBED pin mapping API does not allow to map multiple instances of the PWM
|
||||
// to be mapped to the same pin, we create special pin names to force 32-bit PWM unit
|
||||
// usage instead of standard 16-bit PWM.
|
||||
|
||||
#define PWM32(pin) CY_PIN_FORCE_PWM_32(pin)
|
||||
|
||||
|
||||
#endif
|
|
@ -1,316 +0,0 @@
|
|||
#! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m4
|
||||
; The first line specifies a preprocessor command that the linker invokes
|
||||
; to pass a scatter file through a C preprocessor.
|
||||
|
||||
;*******************************************************************************
|
||||
;* \file cy8c6xxa_cm4_dual.scat
|
||||
;* \version 2.40
|
||||
;*
|
||||
;* Linker file for the ARMCC.
|
||||
;*
|
||||
;* The main purpose of the linker script is to describe how the sections in the
|
||||
;* input files should be mapped into the output file, and to control the memory
|
||||
;* layout of the output file.
|
||||
;*
|
||||
;* \note The entry point location is fixed and starts at 0x10000000. The valid
|
||||
;* application image should be placed there.
|
||||
;*
|
||||
;* \note The linker files included with the PDL template projects must be
|
||||
;* generic and handle all common use cases. Your project may not use every
|
||||
;* section defined in the linker files. In that case you may see the warnings
|
||||
;* during the build process: L6314W (no section matches pattern) and/or L6329W
|
||||
;* (pattern only matches removed unused sections). In your project, you can
|
||||
;* suppress the warning by passing the "--diag_suppress=L6314W,L6329W" option to
|
||||
;* the linker, simply comment out or remove the relevant code in the linker
|
||||
;* file.
|
||||
;*
|
||||
;*******************************************************************************
|
||||
;* \copyright
|
||||
;* Copyright 2016-2019 Cypress Semiconductor Corporation
|
||||
;* SPDX-License-Identifier: Apache-2.0
|
||||
;*
|
||||
;* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
;* you may not use this file except in compliance with the License.
|
||||
;* You may obtain a copy of the License at
|
||||
;*
|
||||
;* http://www.apache.org/licenses/LICENSE-2.0
|
||||
;*
|
||||
;* Unless required by applicable law or agreed to in writing, software
|
||||
;* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
;* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
;* See the License for the specific language governing permissions and
|
||||
;* limitations under the License.
|
||||
;******************************************************************************/
|
||||
|
||||
#if !defined(MBED_ROM_START)
|
||||
#define MBED_ROM_START 0x10000000
|
||||
#endif
|
||||
|
||||
;* MBED_APP_START is being used by the bootloader build script and
|
||||
;* will be calculate by the system. Without bootloader the MBED_APP_START
|
||||
;* is equal to MBED_ROM_START
|
||||
;*
|
||||
#if !defined(MBED_APP_START)
|
||||
#define MBED_APP_START MBED_ROM_START
|
||||
#endif
|
||||
|
||||
#if !defined(MBED_ROM_SIZE)
|
||||
#define MBED_ROM_SIZE 0x00200000
|
||||
#endif
|
||||
|
||||
;* MBED_APP_SIZE is being used by the bootloader build script and
|
||||
;* will be calculate by the system. Without bootloader the MBED_APP_SIZE
|
||||
;* is equal to MBED_ROM_SIZE
|
||||
;*
|
||||
#if !defined(MBED_APP_SIZE)
|
||||
#define MBED_APP_SIZE MBED_ROM_SIZE
|
||||
#endif
|
||||
|
||||
#if !defined(MBED_RAM_START)
|
||||
#define MBED_RAM_START 0x08002000
|
||||
#endif
|
||||
|
||||
#if !defined(MBED_RAM_SIZE)
|
||||
#define MBED_RAM_SIZE 0x000FD800
|
||||
#endif
|
||||
|
||||
#if !defined(MBED_BOOT_STACK_SIZE)
|
||||
#define MBED_BOOT_STACK_SIZE 0x400
|
||||
#endif
|
||||
|
||||
#define Stack_Size MBED_BOOT_STACK_SIZE
|
||||
|
||||
; The defines below describe the location and size of blocks of memory in the target.
|
||||
; Use these defines to specify the memory regions available for allocation.
|
||||
|
||||
; The following defines control RAM and flash memory allocation for the CM4 core.
|
||||
; You can change the memory allocation by editing RAM and Flash defines.
|
||||
; Note that 2 KB of RAM (at the end of the SRAM) are reserved for system use.
|
||||
; Using this memory region for other purposes will lead to unexpected behavior.
|
||||
; Your changes must be aligned with the corresponding defines for CM0+ core in 'xx_cm0plus.scat',
|
||||
; where 'xx' is the device group; for example, 'cy8c6xx7_cm0plus.scat'.
|
||||
; RAM
|
||||
#define RAM_START MBED_RAM_START
|
||||
#define RAM_SIZE MBED_RAM_SIZE
|
||||
; Flash
|
||||
#define FLASH_START MBED_APP_START
|
||||
#define FLASH_SIZE MBED_APP_SIZE
|
||||
|
||||
; The following defines describe a 32K flash region used for EEPROM emulation.
|
||||
; This region can also be used as the general purpose flash.
|
||||
; You can assign sections to this memory region for only one of the cores.
|
||||
; Note some middleware (e.g. BLE, Emulated EEPROM) can place their data into this memory region.
|
||||
; Therefore, repurposing this memory region will prevent such middleware from operation.
|
||||
#define EM_EEPROM_START 0x14000000
|
||||
#define EM_EEPROM_SIZE 0x8000
|
||||
|
||||
; The following defines describe device specific memory regions and must not be changed.
|
||||
; Supervisory flash: User data
|
||||
#define SFLASH_USER_DATA_START 0x16000800
|
||||
#define SFLASH_USER_DATA_SIZE 0x00000800
|
||||
|
||||
; Supervisory flash: Normal Access Restrictions (NAR)
|
||||
#define SFLASH_NAR_START 0x16001A00
|
||||
#define SFLASH_NAR_SIZE 0x00000200
|
||||
|
||||
; Supervisory flash: Public Key
|
||||
#define SFLASH_PUBLIC_KEY_START 0x16005A00
|
||||
#define SFLASH_PUBLIC_KEY_SIZE 0x00000C00
|
||||
|
||||
; Supervisory flash: Table of Content # 2
|
||||
#define SFLASH_TOC_2_START 0x16007C00
|
||||
#define SFLASH_TOC_2_SIZE 0x00000200
|
||||
|
||||
; Supervisory flash: Table of Content # 2 Copy
|
||||
#define SFLASH_RTOC_2_START 0x16007E00
|
||||
#define SFLASH_RTOC_2_SIZE 0x00000200
|
||||
|
||||
; External memory
|
||||
#define XIP_START 0x18000000
|
||||
#define XIP_SIZE 0x08000000
|
||||
|
||||
; eFuse
|
||||
#define EFUSE_START 0x90700000
|
||||
#define EFUSE_SIZE 0x100000
|
||||
|
||||
; Size and start address of the Cortex-M0+ application image
|
||||
#define FLASH_CM0P_SIZE 0x2000
|
||||
#define FLASH_CM0P_START FLASH_START
|
||||
|
||||
; Size and start address of the Cortex-M4 application image
|
||||
#define FLASH_CM4_SIZE (FLASH_SIZE - FLASH_CM0P_SIZE)
|
||||
#define FLASH_CM4_START (FLASH_CM0P_START + FLASH_CM0P_SIZE)
|
||||
|
||||
|
||||
; Cortex-M0+ application image
|
||||
LR_IROM FLASH_CM0P_START FLASH_CM0P_SIZE
|
||||
{
|
||||
.cy_m0p_image +0 FLASH_CM0P_SIZE
|
||||
{
|
||||
* (.cy_m0p_image)
|
||||
}
|
||||
}
|
||||
|
||||
; Cortex-M4 application image
|
||||
LR_IROM1 FLASH_CM4_START FLASH_CM4_SIZE
|
||||
{
|
||||
ER_FLASH_VECTORS +0
|
||||
{
|
||||
* (RESET, +FIRST)
|
||||
}
|
||||
|
||||
ER_FLASH_CODE +0 FIXED
|
||||
{
|
||||
* (InRoot$$Sections)
|
||||
* (+RO)
|
||||
}
|
||||
|
||||
ER_RAM_VECTORS RAM_START UNINIT
|
||||
{
|
||||
* (RESET_RAM, +FIRST)
|
||||
}
|
||||
|
||||
RW_RAM_DATA +0
|
||||
{
|
||||
* (.cy_ramfunc)
|
||||
.ANY (+RW, +ZI)
|
||||
}
|
||||
|
||||
; Place variables in the section that should not be initialized during the
|
||||
; device startup.
|
||||
RW_IRAM1 +0 UNINIT
|
||||
{
|
||||
* (.noinit)
|
||||
}
|
||||
|
||||
; Application heap area (HEAP)
|
||||
ARM_LIB_HEAP +0
|
||||
{
|
||||
* (HEAP)
|
||||
}
|
||||
|
||||
; Stack region growing down
|
||||
ARM_LIB_STACK RAM_START+RAM_SIZE -Stack_Size
|
||||
{
|
||||
* (STACK)
|
||||
}
|
||||
|
||||
; Used for the digital signature of the secure application and the
|
||||
; Bootloader SDK application. The size of the section depends on the required
|
||||
; data size.
|
||||
.cy_app_signature (FLASH_START + FLASH_SIZE - 256) 256
|
||||
{
|
||||
* (.cy_app_signature)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
; Emulated EEPROM Flash area
|
||||
LR_EM_EEPROM EM_EEPROM_START EM_EEPROM_SIZE
|
||||
{
|
||||
.cy_em_eeprom +0
|
||||
{
|
||||
* (.cy_em_eeprom)
|
||||
}
|
||||
}
|
||||
|
||||
; Supervisory flash: User data
|
||||
LR_SFLASH_USER_DATA SFLASH_USER_DATA_START SFLASH_USER_DATA_SIZE
|
||||
{
|
||||
.cy_sflash_user_data +0
|
||||
{
|
||||
* (.cy_sflash_user_data)
|
||||
}
|
||||
}
|
||||
|
||||
; Supervisory flash: Normal Access Restrictions (NAR)
|
||||
LR_SFLASH_NAR SFLASH_NAR_START SFLASH_NAR_SIZE
|
||||
{
|
||||
.cy_sflash_nar +0
|
||||
{
|
||||
* (.cy_sflash_nar)
|
||||
}
|
||||
}
|
||||
|
||||
; Supervisory flash: Public Key
|
||||
LR_SFLASH_PUBLIC_KEY SFLASH_PUBLIC_KEY_START SFLASH_PUBLIC_KEY_SIZE
|
||||
{
|
||||
.cy_sflash_public_key +0
|
||||
{
|
||||
* (.cy_sflash_public_key)
|
||||
}
|
||||
}
|
||||
|
||||
; Supervisory flash: Table of Content # 2
|
||||
LR_SFLASH_TOC_2 SFLASH_TOC_2_START SFLASH_TOC_2_SIZE
|
||||
{
|
||||
.cy_toc_part2 +0
|
||||
{
|
||||
* (.cy_toc_part2)
|
||||
}
|
||||
}
|
||||
|
||||
; Supervisory flash: Table of Content # 2 Copy
|
||||
LR_SFLASH_RTOC_2 SFLASH_RTOC_2_START SFLASH_RTOC_2_SIZE
|
||||
{
|
||||
.cy_rtoc_part2 +0
|
||||
{
|
||||
* (.cy_rtoc_part2)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
; Places the code in the Execute in Place (XIP) section. See the smif driver documentation for details.
|
||||
LR_EROM XIP_START XIP_SIZE
|
||||
{
|
||||
.cy_xip +0
|
||||
{
|
||||
* (.cy_xip)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
; eFuse
|
||||
LR_EFUSE EFUSE_START EFUSE_SIZE
|
||||
{
|
||||
.cy_efuse +0
|
||||
{
|
||||
* (.cy_efuse)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
; The section is used for additional metadata (silicon revision, Silicon/JTAG ID, etc.) storage.
|
||||
CYMETA 0x90500000
|
||||
{
|
||||
.cymeta +0 { * (.cymeta) }
|
||||
}
|
||||
|
||||
/* The following symbols used by the cymcuelftool. */
|
||||
/* Flash */
|
||||
#define __cy_memory_0_start 0x10000000
|
||||
#define __cy_memory_0_length 0x00200000
|
||||
#define __cy_memory_0_row_size 0x200
|
||||
|
||||
/* Emulated EEPROM Flash area */
|
||||
#define __cy_memory_1_start 0x14000000
|
||||
#define __cy_memory_1_length 0x8000
|
||||
#define __cy_memory_1_row_size 0x200
|
||||
|
||||
/* Supervisory Flash */
|
||||
#define __cy_memory_2_start 0x16000000
|
||||
#define __cy_memory_2_length 0x8000
|
||||
#define __cy_memory_2_row_size 0x200
|
||||
|
||||
/* XIP */
|
||||
#define __cy_memory_3_start 0x18000000
|
||||
#define __cy_memory_3_length 0x08000000
|
||||
#define __cy_memory_3_row_size 0x200
|
||||
|
||||
/* eFuse */
|
||||
#define __cy_memory_4_start 0x90700000
|
||||
#define __cy_memory_4_length 0x100000
|
||||
#define __cy_memory_4_row_size 1
|
||||
|
||||
|
||||
/* [] END OF FILE */
|
|
@ -1,747 +0,0 @@
|
|||
;/**************************************************************************//**
|
||||
; * @file startup_psoc6_02_cm4.S
|
||||
; * @brief CMSIS Core Device Startup File for
|
||||
; * ARMCM4 Device Series
|
||||
; * @version V5.00
|
||||
; * @date 02. March 2016
|
||||
; ******************************************************************************/
|
||||
;/*
|
||||
; * Copyright (c) 2009-2016 ARM Limited. All rights reserved.
|
||||
; *
|
||||
; * SPDX-License-Identifier: Apache-2.0
|
||||
; *
|
||||
; * Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
; * not use this file except in compliance with the License.
|
||||
; * You may obtain a copy of the License at
|
||||
; *
|
||||
; * www.apache.org/licenses/LICENSE-2.0
|
||||
; *
|
||||
; * Unless required by applicable law or agreed to in writing, software
|
||||
; * distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
; * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
; * See the License for the specific language governing permissions and
|
||||
; * limitations under the License.
|
||||
; */
|
||||
|
||||
;/*
|
||||
;//-------- <<< Use Configuration Wizard in Context Menu >>> ------------------
|
||||
;*/
|
||||
|
||||
; <h> Stack Configuration
|
||||
; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||
; </h>
|
||||
IF :DEF:__STACK_SIZE
|
||||
Stack_Size EQU __STACK_SIZE
|
||||
ELSE
|
||||
Stack_Size EQU 0x00000400
|
||||
ENDIF
|
||||
AREA STACK, NOINIT, READWRITE, ALIGN=3
|
||||
Stack_Mem SPACE Stack_Size
|
||||
__initial_sp
|
||||
|
||||
; <h> Heap Configuration
|
||||
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||
; </h>
|
||||
IF :DEF:__HEAP_SIZE
|
||||
Heap_Size EQU __HEAP_SIZE
|
||||
ELSE
|
||||
Heap_Size EQU 0x00000400
|
||||
ENDIF
|
||||
AREA HEAP, NOINIT, READWRITE, ALIGN=3
|
||||
__heap_base
|
||||
Heap_Mem SPACE Heap_Size
|
||||
__heap_limit
|
||||
|
||||
|
||||
PRESERVE8
|
||||
THUMB
|
||||
|
||||
; Vector Table Mapped to Address 0 at Reset
|
||||
|
||||
AREA RESET, DATA, READONLY
|
||||
EXPORT __Vectors
|
||||
EXPORT __Vectors_End
|
||||
EXPORT __Vectors_Size
|
||||
|
||||
__Vectors DCD __initial_sp ; Top of Stack
|
||||
DCD Reset_Handler ; Reset Handler
|
||||
|
||||
DCD 0x0000000D ; NMI Handler located at ROM code
|
||||
DCD HardFault_Handler ; Hard Fault Handler
|
||||
DCD MemManage_Handler ; MPU Fault Handler
|
||||
DCD BusFault_Handler ; Bus Fault Handler
|
||||
DCD UsageFault_Handler ; Usage Fault Handler
|
||||
DCD 0 ; Reserved
|
||||
DCD 0 ; Reserved
|
||||
DCD 0 ; Reserved
|
||||
DCD 0 ; Reserved
|
||||
DCD SVC_Handler ; SVCall Handler
|
||||
DCD DebugMon_Handler ; Debug Monitor Handler
|
||||
DCD 0 ; Reserved
|
||||
DCD PendSV_Handler ; PendSV Handler
|
||||
DCD SysTick_Handler ; SysTick Handler
|
||||
|
||||
; External interrupts Description
|
||||
DCD ioss_interrupts_gpio_0_IRQHandler ; GPIO Port Interrupt #0
|
||||
DCD ioss_interrupts_gpio_1_IRQHandler ; GPIO Port Interrupt #1
|
||||
DCD ioss_interrupts_gpio_2_IRQHandler ; GPIO Port Interrupt #2
|
||||
DCD ioss_interrupts_gpio_3_IRQHandler ; GPIO Port Interrupt #3
|
||||
DCD ioss_interrupts_gpio_4_IRQHandler ; GPIO Port Interrupt #4
|
||||
DCD ioss_interrupts_gpio_5_IRQHandler ; GPIO Port Interrupt #5
|
||||
DCD ioss_interrupts_gpio_6_IRQHandler ; GPIO Port Interrupt #6
|
||||
DCD ioss_interrupts_gpio_7_IRQHandler ; GPIO Port Interrupt #7
|
||||
DCD ioss_interrupts_gpio_8_IRQHandler ; GPIO Port Interrupt #8
|
||||
DCD ioss_interrupts_gpio_9_IRQHandler ; GPIO Port Interrupt #9
|
||||
DCD ioss_interrupts_gpio_10_IRQHandler ; GPIO Port Interrupt #10
|
||||
DCD ioss_interrupts_gpio_11_IRQHandler ; GPIO Port Interrupt #11
|
||||
DCD ioss_interrupts_gpio_12_IRQHandler ; GPIO Port Interrupt #12
|
||||
DCD ioss_interrupts_gpio_13_IRQHandler ; GPIO Port Interrupt #13
|
||||
DCD ioss_interrupts_gpio_14_IRQHandler ; GPIO Port Interrupt #14
|
||||
DCD ioss_interrupt_gpio_IRQHandler ; GPIO All Ports
|
||||
DCD ioss_interrupt_vdd_IRQHandler ; GPIO Supply Detect Interrupt
|
||||
DCD lpcomp_interrupt_IRQHandler ; Low Power Comparator Interrupt
|
||||
DCD scb_8_interrupt_IRQHandler ; Serial Communication Block #8 (DeepSleep capable)
|
||||
DCD srss_interrupt_mcwdt_0_IRQHandler ; Multi Counter Watchdog Timer interrupt
|
||||
DCD srss_interrupt_mcwdt_1_IRQHandler ; Multi Counter Watchdog Timer interrupt
|
||||
DCD srss_interrupt_backup_IRQHandler ; Backup domain interrupt
|
||||
DCD srss_interrupt_IRQHandler ; Other combined Interrupts for SRSS (LVD, WDT, CLKCAL)
|
||||
DCD cpuss_interrupts_ipc_0_IRQHandler ; CPUSS Inter Process Communication Interrupt #0
|
||||
DCD cpuss_interrupts_ipc_1_IRQHandler ; CPUSS Inter Process Communication Interrupt #1
|
||||
DCD cpuss_interrupts_ipc_2_IRQHandler ; CPUSS Inter Process Communication Interrupt #2
|
||||
DCD cpuss_interrupts_ipc_3_IRQHandler ; CPUSS Inter Process Communication Interrupt #3
|
||||
DCD cpuss_interrupts_ipc_4_IRQHandler ; CPUSS Inter Process Communication Interrupt #4
|
||||
DCD cpuss_interrupts_ipc_5_IRQHandler ; CPUSS Inter Process Communication Interrupt #5
|
||||
DCD cpuss_interrupts_ipc_6_IRQHandler ; CPUSS Inter Process Communication Interrupt #6
|
||||
DCD cpuss_interrupts_ipc_7_IRQHandler ; CPUSS Inter Process Communication Interrupt #7
|
||||
DCD cpuss_interrupts_ipc_8_IRQHandler ; CPUSS Inter Process Communication Interrupt #8
|
||||
DCD cpuss_interrupts_ipc_9_IRQHandler ; CPUSS Inter Process Communication Interrupt #9
|
||||
DCD cpuss_interrupts_ipc_10_IRQHandler ; CPUSS Inter Process Communication Interrupt #10
|
||||
DCD cpuss_interrupts_ipc_11_IRQHandler ; CPUSS Inter Process Communication Interrupt #11
|
||||
DCD cpuss_interrupts_ipc_12_IRQHandler ; CPUSS Inter Process Communication Interrupt #12
|
||||
DCD cpuss_interrupts_ipc_13_IRQHandler ; CPUSS Inter Process Communication Interrupt #13
|
||||
DCD cpuss_interrupts_ipc_14_IRQHandler ; CPUSS Inter Process Communication Interrupt #14
|
||||
DCD cpuss_interrupts_ipc_15_IRQHandler ; CPUSS Inter Process Communication Interrupt #15
|
||||
DCD scb_0_interrupt_IRQHandler ; Serial Communication Block #0
|
||||
DCD scb_1_interrupt_IRQHandler ; Serial Communication Block #1
|
||||
DCD scb_2_interrupt_IRQHandler ; Serial Communication Block #2
|
||||
DCD scb_3_interrupt_IRQHandler ; Serial Communication Block #3
|
||||
DCD scb_4_interrupt_IRQHandler ; Serial Communication Block #4
|
||||
DCD scb_5_interrupt_IRQHandler ; Serial Communication Block #5
|
||||
DCD scb_6_interrupt_IRQHandler ; Serial Communication Block #6
|
||||
DCD scb_7_interrupt_IRQHandler ; Serial Communication Block #7
|
||||
DCD scb_9_interrupt_IRQHandler ; Serial Communication Block #9
|
||||
DCD scb_10_interrupt_IRQHandler ; Serial Communication Block #10
|
||||
DCD scb_11_interrupt_IRQHandler ; Serial Communication Block #11
|
||||
DCD scb_12_interrupt_IRQHandler ; Serial Communication Block #12
|
||||
DCD csd_interrupt_IRQHandler ; CSD (Capsense) interrupt
|
||||
DCD cpuss_interrupts_dmac_0_IRQHandler ; CPUSS DMAC, Channel #0
|
||||
DCD cpuss_interrupts_dmac_1_IRQHandler ; CPUSS DMAC, Channel #1
|
||||
DCD cpuss_interrupts_dmac_2_IRQHandler ; CPUSS DMAC, Channel #2
|
||||
DCD cpuss_interrupts_dmac_3_IRQHandler ; CPUSS DMAC, Channel #3
|
||||
DCD cpuss_interrupts_dw0_0_IRQHandler ; CPUSS DataWire #0, Channel #0
|
||||
DCD cpuss_interrupts_dw0_1_IRQHandler ; CPUSS DataWire #0, Channel #1
|
||||
DCD cpuss_interrupts_dw0_2_IRQHandler ; CPUSS DataWire #0, Channel #2
|
||||
DCD cpuss_interrupts_dw0_3_IRQHandler ; CPUSS DataWire #0, Channel #3
|
||||
DCD cpuss_interrupts_dw0_4_IRQHandler ; CPUSS DataWire #0, Channel #4
|
||||
DCD cpuss_interrupts_dw0_5_IRQHandler ; CPUSS DataWire #0, Channel #5
|
||||
DCD cpuss_interrupts_dw0_6_IRQHandler ; CPUSS DataWire #0, Channel #6
|
||||
DCD cpuss_interrupts_dw0_7_IRQHandler ; CPUSS DataWire #0, Channel #7
|
||||
DCD cpuss_interrupts_dw0_8_IRQHandler ; CPUSS DataWire #0, Channel #8
|
||||
DCD cpuss_interrupts_dw0_9_IRQHandler ; CPUSS DataWire #0, Channel #9
|
||||
DCD cpuss_interrupts_dw0_10_IRQHandler ; CPUSS DataWire #0, Channel #10
|
||||
DCD cpuss_interrupts_dw0_11_IRQHandler ; CPUSS DataWire #0, Channel #11
|
||||
DCD cpuss_interrupts_dw0_12_IRQHandler ; CPUSS DataWire #0, Channel #12
|
||||
DCD cpuss_interrupts_dw0_13_IRQHandler ; CPUSS DataWire #0, Channel #13
|
||||
DCD cpuss_interrupts_dw0_14_IRQHandler ; CPUSS DataWire #0, Channel #14
|
||||
DCD cpuss_interrupts_dw0_15_IRQHandler ; CPUSS DataWire #0, Channel #15
|
||||
DCD cpuss_interrupts_dw0_16_IRQHandler ; CPUSS DataWire #0, Channel #16
|
||||
DCD cpuss_interrupts_dw0_17_IRQHandler ; CPUSS DataWire #0, Channel #17
|
||||
DCD cpuss_interrupts_dw0_18_IRQHandler ; CPUSS DataWire #0, Channel #18
|
||||
DCD cpuss_interrupts_dw0_19_IRQHandler ; CPUSS DataWire #0, Channel #19
|
||||
DCD cpuss_interrupts_dw0_20_IRQHandler ; CPUSS DataWire #0, Channel #20
|
||||
DCD cpuss_interrupts_dw0_21_IRQHandler ; CPUSS DataWire #0, Channel #21
|
||||
DCD cpuss_interrupts_dw0_22_IRQHandler ; CPUSS DataWire #0, Channel #22
|
||||
DCD cpuss_interrupts_dw0_23_IRQHandler ; CPUSS DataWire #0, Channel #23
|
||||
DCD cpuss_interrupts_dw0_24_IRQHandler ; CPUSS DataWire #0, Channel #24
|
||||
DCD cpuss_interrupts_dw0_25_IRQHandler ; CPUSS DataWire #0, Channel #25
|
||||
DCD cpuss_interrupts_dw0_26_IRQHandler ; CPUSS DataWire #0, Channel #26
|
||||
DCD cpuss_interrupts_dw0_27_IRQHandler ; CPUSS DataWire #0, Channel #27
|
||||
DCD cpuss_interrupts_dw0_28_IRQHandler ; CPUSS DataWire #0, Channel #28
|
||||
DCD cpuss_interrupts_dw1_0_IRQHandler ; CPUSS DataWire #1, Channel #0
|
||||
DCD cpuss_interrupts_dw1_1_IRQHandler ; CPUSS DataWire #1, Channel #1
|
||||
DCD cpuss_interrupts_dw1_2_IRQHandler ; CPUSS DataWire #1, Channel #2
|
||||
DCD cpuss_interrupts_dw1_3_IRQHandler ; CPUSS DataWire #1, Channel #3
|
||||
DCD cpuss_interrupts_dw1_4_IRQHandler ; CPUSS DataWire #1, Channel #4
|
||||
DCD cpuss_interrupts_dw1_5_IRQHandler ; CPUSS DataWire #1, Channel #5
|
||||
DCD cpuss_interrupts_dw1_6_IRQHandler ; CPUSS DataWire #1, Channel #6
|
||||
DCD cpuss_interrupts_dw1_7_IRQHandler ; CPUSS DataWire #1, Channel #7
|
||||
DCD cpuss_interrupts_dw1_8_IRQHandler ; CPUSS DataWire #1, Channel #8
|
||||
DCD cpuss_interrupts_dw1_9_IRQHandler ; CPUSS DataWire #1, Channel #9
|
||||
DCD cpuss_interrupts_dw1_10_IRQHandler ; CPUSS DataWire #1, Channel #10
|
||||
DCD cpuss_interrupts_dw1_11_IRQHandler ; CPUSS DataWire #1, Channel #11
|
||||
DCD cpuss_interrupts_dw1_12_IRQHandler ; CPUSS DataWire #1, Channel #12
|
||||
DCD cpuss_interrupts_dw1_13_IRQHandler ; CPUSS DataWire #1, Channel #13
|
||||
DCD cpuss_interrupts_dw1_14_IRQHandler ; CPUSS DataWire #1, Channel #14
|
||||
DCD cpuss_interrupts_dw1_15_IRQHandler ; CPUSS DataWire #1, Channel #15
|
||||
DCD cpuss_interrupts_dw1_16_IRQHandler ; CPUSS DataWire #1, Channel #16
|
||||
DCD cpuss_interrupts_dw1_17_IRQHandler ; CPUSS DataWire #1, Channel #17
|
||||
DCD cpuss_interrupts_dw1_18_IRQHandler ; CPUSS DataWire #1, Channel #18
|
||||
DCD cpuss_interrupts_dw1_19_IRQHandler ; CPUSS DataWire #1, Channel #19
|
||||
DCD cpuss_interrupts_dw1_20_IRQHandler ; CPUSS DataWire #1, Channel #20
|
||||
DCD cpuss_interrupts_dw1_21_IRQHandler ; CPUSS DataWire #1, Channel #21
|
||||
DCD cpuss_interrupts_dw1_22_IRQHandler ; CPUSS DataWire #1, Channel #22
|
||||
DCD cpuss_interrupts_dw1_23_IRQHandler ; CPUSS DataWire #1, Channel #23
|
||||
DCD cpuss_interrupts_dw1_24_IRQHandler ; CPUSS DataWire #1, Channel #24
|
||||
DCD cpuss_interrupts_dw1_25_IRQHandler ; CPUSS DataWire #1, Channel #25
|
||||
DCD cpuss_interrupts_dw1_26_IRQHandler ; CPUSS DataWire #1, Channel #26
|
||||
DCD cpuss_interrupts_dw1_27_IRQHandler ; CPUSS DataWire #1, Channel #27
|
||||
DCD cpuss_interrupts_dw1_28_IRQHandler ; CPUSS DataWire #1, Channel #28
|
||||
DCD cpuss_interrupts_fault_0_IRQHandler ; CPUSS Fault Structure Interrupt #0
|
||||
DCD cpuss_interrupts_fault_1_IRQHandler ; CPUSS Fault Structure Interrupt #1
|
||||
DCD cpuss_interrupt_crypto_IRQHandler ; CRYPTO Accelerator Interrupt
|
||||
DCD cpuss_interrupt_fm_IRQHandler ; FLASH Macro Interrupt
|
||||
DCD cpuss_interrupts_cm4_fp_IRQHandler ; Floating Point operation fault
|
||||
DCD cpuss_interrupts_cm0_cti_0_IRQHandler ; CM0+ CTI #0
|
||||
DCD cpuss_interrupts_cm0_cti_1_IRQHandler ; CM0+ CTI #1
|
||||
DCD cpuss_interrupts_cm4_cti_0_IRQHandler ; CM4 CTI #0
|
||||
DCD cpuss_interrupts_cm4_cti_1_IRQHandler ; CM4 CTI #1
|
||||
DCD tcpwm_0_interrupts_0_IRQHandler ; TCPWM #0, Counter #0
|
||||
DCD tcpwm_0_interrupts_1_IRQHandler ; TCPWM #0, Counter #1
|
||||
DCD tcpwm_0_interrupts_2_IRQHandler ; TCPWM #0, Counter #2
|
||||
DCD tcpwm_0_interrupts_3_IRQHandler ; TCPWM #0, Counter #3
|
||||
DCD tcpwm_0_interrupts_4_IRQHandler ; TCPWM #0, Counter #4
|
||||
DCD tcpwm_0_interrupts_5_IRQHandler ; TCPWM #0, Counter #5
|
||||
DCD tcpwm_0_interrupts_6_IRQHandler ; TCPWM #0, Counter #6
|
||||
DCD tcpwm_0_interrupts_7_IRQHandler ; TCPWM #0, Counter #7
|
||||
DCD tcpwm_1_interrupts_0_IRQHandler ; TCPWM #1, Counter #0
|
||||
DCD tcpwm_1_interrupts_1_IRQHandler ; TCPWM #1, Counter #1
|
||||
DCD tcpwm_1_interrupts_2_IRQHandler ; TCPWM #1, Counter #2
|
||||
DCD tcpwm_1_interrupts_3_IRQHandler ; TCPWM #1, Counter #3
|
||||
DCD tcpwm_1_interrupts_4_IRQHandler ; TCPWM #1, Counter #4
|
||||
DCD tcpwm_1_interrupts_5_IRQHandler ; TCPWM #1, Counter #5
|
||||
DCD tcpwm_1_interrupts_6_IRQHandler ; TCPWM #1, Counter #6
|
||||
DCD tcpwm_1_interrupts_7_IRQHandler ; TCPWM #1, Counter #7
|
||||
DCD tcpwm_1_interrupts_8_IRQHandler ; TCPWM #1, Counter #8
|
||||
DCD tcpwm_1_interrupts_9_IRQHandler ; TCPWM #1, Counter #9
|
||||
DCD tcpwm_1_interrupts_10_IRQHandler ; TCPWM #1, Counter #10
|
||||
DCD tcpwm_1_interrupts_11_IRQHandler ; TCPWM #1, Counter #11
|
||||
DCD tcpwm_1_interrupts_12_IRQHandler ; TCPWM #1, Counter #12
|
||||
DCD tcpwm_1_interrupts_13_IRQHandler ; TCPWM #1, Counter #13
|
||||
DCD tcpwm_1_interrupts_14_IRQHandler ; TCPWM #1, Counter #14
|
||||
DCD tcpwm_1_interrupts_15_IRQHandler ; TCPWM #1, Counter #15
|
||||
DCD tcpwm_1_interrupts_16_IRQHandler ; TCPWM #1, Counter #16
|
||||
DCD tcpwm_1_interrupts_17_IRQHandler ; TCPWM #1, Counter #17
|
||||
DCD tcpwm_1_interrupts_18_IRQHandler ; TCPWM #1, Counter #18
|
||||
DCD tcpwm_1_interrupts_19_IRQHandler ; TCPWM #1, Counter #19
|
||||
DCD tcpwm_1_interrupts_20_IRQHandler ; TCPWM #1, Counter #20
|
||||
DCD tcpwm_1_interrupts_21_IRQHandler ; TCPWM #1, Counter #21
|
||||
DCD tcpwm_1_interrupts_22_IRQHandler ; TCPWM #1, Counter #22
|
||||
DCD tcpwm_1_interrupts_23_IRQHandler ; TCPWM #1, Counter #23
|
||||
DCD pass_interrupt_sar_IRQHandler ; SAR ADC interrupt
|
||||
DCD audioss_0_interrupt_i2s_IRQHandler ; I2S0 Audio interrupt
|
||||
DCD audioss_0_interrupt_pdm_IRQHandler ; PDM0/PCM0 Audio interrupt
|
||||
DCD audioss_1_interrupt_i2s_IRQHandler ; I2S1 Audio interrupt
|
||||
DCD profile_interrupt_IRQHandler ; Energy Profiler interrupt
|
||||
DCD smif_interrupt_IRQHandler ; Serial Memory Interface interrupt
|
||||
DCD usb_interrupt_hi_IRQHandler ; USB Interrupt
|
||||
DCD usb_interrupt_med_IRQHandler ; USB Interrupt
|
||||
DCD usb_interrupt_lo_IRQHandler ; USB Interrupt
|
||||
DCD sdhc_0_interrupt_wakeup_IRQHandler ; SDIO wakeup interrupt for mxsdhc
|
||||
DCD sdhc_0_interrupt_general_IRQHandler ; Consolidated interrupt for mxsdhc for everything else
|
||||
DCD sdhc_1_interrupt_wakeup_IRQHandler ; EEMC wakeup interrupt for mxsdhc, not used
|
||||
DCD sdhc_1_interrupt_general_IRQHandler ; Consolidated interrupt for mxsdhc for everything else
|
||||
|
||||
__Vectors_End
|
||||
|
||||
__Vectors_Size EQU __Vectors_End - __Vectors
|
||||
EXPORT __ramVectors
|
||||
AREA RESET_RAM, READWRITE, NOINIT
|
||||
__ramVectors SPACE __Vectors_Size
|
||||
|
||||
|
||||
AREA |.text|, CODE, READONLY
|
||||
|
||||
|
||||
; Weak function for startup customization
|
||||
;
|
||||
; Note. The global resources are not yet initialized (for example global variables, peripherals, clocks)
|
||||
; because this function is executed as the first instruction in the ResetHandler.
|
||||
; The PDL is also not initialized to use the proper register offsets.
|
||||
; The user of this function is responsible for initializing the PDL and resources before using them.
|
||||
;
|
||||
Cy_OnResetUser PROC
|
||||
EXPORT Cy_OnResetUser [WEAK]
|
||||
BX LR
|
||||
ENDP
|
||||
|
||||
; Reset Handler
|
||||
Reset_Handler PROC
|
||||
EXPORT Reset_Handler [WEAK]
|
||||
IMPORT Cy_SystemInitFpuEnable
|
||||
IMPORT __main
|
||||
|
||||
; Define strong function for startup customization
|
||||
BL Cy_OnResetUser
|
||||
|
||||
; Disable global interrupts
|
||||
CPSID I
|
||||
|
||||
; Copy vectors from ROM to RAM
|
||||
LDR r1, =__Vectors
|
||||
LDR r0, =__ramVectors
|
||||
LDR r2, =__Vectors_Size
|
||||
Vectors_Copy
|
||||
LDR r3, [r1]
|
||||
STR r3, [r0]
|
||||
ADDS r0, r0, #4
|
||||
ADDS r1, r1, #4
|
||||
SUBS r2, r2, #1
|
||||
CMP r2, #0
|
||||
BNE Vectors_Copy
|
||||
|
||||
; Update Vector Table Offset Register. */
|
||||
LDR r0, =__ramVectors
|
||||
LDR r1, =0xE000ED08
|
||||
STR r0, [r1]
|
||||
dsb 0xF
|
||||
|
||||
; Enable the FPU if used
|
||||
LDR R0, =Cy_SystemInitFpuEnable
|
||||
BLX R0
|
||||
|
||||
LDR R0, =__main
|
||||
BLX R0
|
||||
|
||||
; Should never get here
|
||||
B .
|
||||
|
||||
ENDP
|
||||
|
||||
; Dummy Exception Handlers (infinite loops which can be modified)
|
||||
NMI_Handler PROC
|
||||
EXPORT NMI_Handler [WEAK]
|
||||
B .
|
||||
ENDP
|
||||
|
||||
Cy_SysLib_FaultHandler PROC
|
||||
EXPORT Cy_SysLib_FaultHandler [WEAK]
|
||||
B .
|
||||
ENDP
|
||||
HardFault_Wrapper\
|
||||
PROC
|
||||
EXPORT HardFault_Wrapper [WEAK]
|
||||
movs r0, #4
|
||||
mov r1, LR
|
||||
tst r0, r1
|
||||
beq L_MSP
|
||||
mrs r0, PSP
|
||||
bl L_API_call
|
||||
L_MSP
|
||||
mrs r0, MSP
|
||||
L_API_call
|
||||
bl Cy_SysLib_FaultHandler
|
||||
ENDP
|
||||
HardFault_Handler\
|
||||
PROC
|
||||
EXPORT HardFault_Handler [WEAK]
|
||||
B HardFault_Wrapper
|
||||
ENDP
|
||||
MemManage_Handler\
|
||||
PROC
|
||||
EXPORT MemManage_Handler [WEAK]
|
||||
B HardFault_Wrapper
|
||||
ENDP
|
||||
BusFault_Handler\
|
||||
PROC
|
||||
EXPORT BusFault_Handler [WEAK]
|
||||
B HardFault_Wrapper
|
||||
ENDP
|
||||
UsageFault_Handler\
|
||||
PROC
|
||||
EXPORT UsageFault_Handler [WEAK]
|
||||
B HardFault_Wrapper
|
||||
ENDP
|
||||
SVC_Handler PROC
|
||||
EXPORT SVC_Handler [WEAK]
|
||||
B .
|
||||
ENDP
|
||||
DebugMon_Handler\
|
||||
PROC
|
||||
EXPORT DebugMon_Handler [WEAK]
|
||||
B .
|
||||
ENDP
|
||||
PendSV_Handler PROC
|
||||
EXPORT PendSV_Handler [WEAK]
|
||||
B .
|
||||
ENDP
|
||||
SysTick_Handler PROC
|
||||
EXPORT SysTick_Handler [WEAK]
|
||||
B .
|
||||
ENDP
|
||||
|
||||
Default_Handler PROC
|
||||
EXPORT Default_Handler [WEAK]
|
||||
EXPORT ioss_interrupts_gpio_0_IRQHandler [WEAK]
|
||||
EXPORT ioss_interrupts_gpio_1_IRQHandler [WEAK]
|
||||
EXPORT ioss_interrupts_gpio_2_IRQHandler [WEAK]
|
||||
EXPORT ioss_interrupts_gpio_3_IRQHandler [WEAK]
|
||||
EXPORT ioss_interrupts_gpio_4_IRQHandler [WEAK]
|
||||
EXPORT ioss_interrupts_gpio_5_IRQHandler [WEAK]
|
||||
EXPORT ioss_interrupts_gpio_6_IRQHandler [WEAK]
|
||||
EXPORT ioss_interrupts_gpio_7_IRQHandler [WEAK]
|
||||
EXPORT ioss_interrupts_gpio_8_IRQHandler [WEAK]
|
||||
EXPORT ioss_interrupts_gpio_9_IRQHandler [WEAK]
|
||||
EXPORT ioss_interrupts_gpio_10_IRQHandler [WEAK]
|
||||
EXPORT ioss_interrupts_gpio_11_IRQHandler [WEAK]
|
||||
EXPORT ioss_interrupts_gpio_12_IRQHandler [WEAK]
|
||||
EXPORT ioss_interrupts_gpio_13_IRQHandler [WEAK]
|
||||
EXPORT ioss_interrupts_gpio_14_IRQHandler [WEAK]
|
||||
EXPORT ioss_interrupt_gpio_IRQHandler [WEAK]
|
||||
EXPORT ioss_interrupt_vdd_IRQHandler [WEAK]
|
||||
EXPORT lpcomp_interrupt_IRQHandler [WEAK]
|
||||
EXPORT scb_8_interrupt_IRQHandler [WEAK]
|
||||
EXPORT srss_interrupt_mcwdt_0_IRQHandler [WEAK]
|
||||
EXPORT srss_interrupt_mcwdt_1_IRQHandler [WEAK]
|
||||
EXPORT srss_interrupt_backup_IRQHandler [WEAK]
|
||||
EXPORT srss_interrupt_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_ipc_0_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_ipc_1_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_ipc_2_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_ipc_3_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_ipc_4_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_ipc_5_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_ipc_6_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_ipc_7_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_ipc_8_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_ipc_9_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_ipc_10_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_ipc_11_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_ipc_12_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_ipc_13_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_ipc_14_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_ipc_15_IRQHandler [WEAK]
|
||||
EXPORT scb_0_interrupt_IRQHandler [WEAK]
|
||||
EXPORT scb_1_interrupt_IRQHandler [WEAK]
|
||||
EXPORT scb_2_interrupt_IRQHandler [WEAK]
|
||||
EXPORT scb_3_interrupt_IRQHandler [WEAK]
|
||||
EXPORT scb_4_interrupt_IRQHandler [WEAK]
|
||||
EXPORT scb_5_interrupt_IRQHandler [WEAK]
|
||||
EXPORT scb_6_interrupt_IRQHandler [WEAK]
|
||||
EXPORT scb_7_interrupt_IRQHandler [WEAK]
|
||||
EXPORT scb_9_interrupt_IRQHandler [WEAK]
|
||||
EXPORT scb_10_interrupt_IRQHandler [WEAK]
|
||||
EXPORT scb_11_interrupt_IRQHandler [WEAK]
|
||||
EXPORT scb_12_interrupt_IRQHandler [WEAK]
|
||||
EXPORT csd_interrupt_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dmac_0_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dmac_1_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dmac_2_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dmac_3_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_0_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_1_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_2_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_3_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_4_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_5_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_6_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_7_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_8_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_9_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_10_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_11_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_12_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_13_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_14_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_15_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_16_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_17_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_18_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_19_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_20_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_21_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_22_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_23_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_24_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_25_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_26_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_27_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw0_28_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_0_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_1_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_2_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_3_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_4_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_5_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_6_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_7_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_8_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_9_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_10_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_11_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_12_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_13_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_14_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_15_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_16_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_17_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_18_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_19_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_20_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_21_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_22_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_23_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_24_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_25_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_26_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_27_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_dw1_28_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_fault_0_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_fault_1_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupt_crypto_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupt_fm_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_cm4_fp_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_cm0_cti_0_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_cm0_cti_1_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_cm4_cti_0_IRQHandler [WEAK]
|
||||
EXPORT cpuss_interrupts_cm4_cti_1_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_0_interrupts_0_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_0_interrupts_1_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_0_interrupts_2_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_0_interrupts_3_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_0_interrupts_4_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_0_interrupts_5_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_0_interrupts_6_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_0_interrupts_7_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_1_interrupts_0_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_1_interrupts_1_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_1_interrupts_2_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_1_interrupts_3_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_1_interrupts_4_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_1_interrupts_5_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_1_interrupts_6_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_1_interrupts_7_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_1_interrupts_8_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_1_interrupts_9_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_1_interrupts_10_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_1_interrupts_11_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_1_interrupts_12_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_1_interrupts_13_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_1_interrupts_14_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_1_interrupts_15_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_1_interrupts_16_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_1_interrupts_17_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_1_interrupts_18_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_1_interrupts_19_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_1_interrupts_20_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_1_interrupts_21_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_1_interrupts_22_IRQHandler [WEAK]
|
||||
EXPORT tcpwm_1_interrupts_23_IRQHandler [WEAK]
|
||||
EXPORT pass_interrupt_sar_IRQHandler [WEAK]
|
||||
EXPORT audioss_0_interrupt_i2s_IRQHandler [WEAK]
|
||||
EXPORT audioss_0_interrupt_pdm_IRQHandler [WEAK]
|
||||
EXPORT audioss_1_interrupt_i2s_IRQHandler [WEAK]
|
||||
EXPORT profile_interrupt_IRQHandler [WEAK]
|
||||
EXPORT smif_interrupt_IRQHandler [WEAK]
|
||||
EXPORT usb_interrupt_hi_IRQHandler [WEAK]
|
||||
EXPORT usb_interrupt_med_IRQHandler [WEAK]
|
||||
EXPORT usb_interrupt_lo_IRQHandler [WEAK]
|
||||
EXPORT sdhc_0_interrupt_wakeup_IRQHandler [WEAK]
|
||||
EXPORT sdhc_0_interrupt_general_IRQHandler [WEAK]
|
||||
EXPORT sdhc_1_interrupt_wakeup_IRQHandler [WEAK]
|
||||
EXPORT sdhc_1_interrupt_general_IRQHandler [WEAK]
|
||||
|
||||
ioss_interrupts_gpio_0_IRQHandler
|
||||
ioss_interrupts_gpio_1_IRQHandler
|
||||
ioss_interrupts_gpio_2_IRQHandler
|
||||
ioss_interrupts_gpio_3_IRQHandler
|
||||
ioss_interrupts_gpio_4_IRQHandler
|
||||
ioss_interrupts_gpio_5_IRQHandler
|
||||
ioss_interrupts_gpio_6_IRQHandler
|
||||
ioss_interrupts_gpio_7_IRQHandler
|
||||
ioss_interrupts_gpio_8_IRQHandler
|
||||
ioss_interrupts_gpio_9_IRQHandler
|
||||
ioss_interrupts_gpio_10_IRQHandler
|
||||
ioss_interrupts_gpio_11_IRQHandler
|
||||
ioss_interrupts_gpio_12_IRQHandler
|
||||
ioss_interrupts_gpio_13_IRQHandler
|
||||
ioss_interrupts_gpio_14_IRQHandler
|
||||
ioss_interrupt_gpio_IRQHandler
|
||||
ioss_interrupt_vdd_IRQHandler
|
||||
lpcomp_interrupt_IRQHandler
|
||||
scb_8_interrupt_IRQHandler
|
||||
srss_interrupt_mcwdt_0_IRQHandler
|
||||
srss_interrupt_mcwdt_1_IRQHandler
|
||||
srss_interrupt_backup_IRQHandler
|
||||
srss_interrupt_IRQHandler
|
||||
cpuss_interrupts_ipc_0_IRQHandler
|
||||
cpuss_interrupts_ipc_1_IRQHandler
|
||||
cpuss_interrupts_ipc_2_IRQHandler
|
||||
cpuss_interrupts_ipc_3_IRQHandler
|
||||
cpuss_interrupts_ipc_4_IRQHandler
|
||||
cpuss_interrupts_ipc_5_IRQHandler
|
||||
cpuss_interrupts_ipc_6_IRQHandler
|
||||
cpuss_interrupts_ipc_7_IRQHandler
|
||||
cpuss_interrupts_ipc_8_IRQHandler
|
||||
cpuss_interrupts_ipc_9_IRQHandler
|
||||
cpuss_interrupts_ipc_10_IRQHandler
|
||||
cpuss_interrupts_ipc_11_IRQHandler
|
||||
cpuss_interrupts_ipc_12_IRQHandler
|
||||
cpuss_interrupts_ipc_13_IRQHandler
|
||||
cpuss_interrupts_ipc_14_IRQHandler
|
||||
cpuss_interrupts_ipc_15_IRQHandler
|
||||
scb_0_interrupt_IRQHandler
|
||||
scb_1_interrupt_IRQHandler
|
||||
scb_2_interrupt_IRQHandler
|
||||
scb_3_interrupt_IRQHandler
|
||||
scb_4_interrupt_IRQHandler
|
||||
scb_5_interrupt_IRQHandler
|
||||
scb_6_interrupt_IRQHandler
|
||||
scb_7_interrupt_IRQHandler
|
||||
scb_9_interrupt_IRQHandler
|
||||
scb_10_interrupt_IRQHandler
|
||||
scb_11_interrupt_IRQHandler
|
||||
scb_12_interrupt_IRQHandler
|
||||
csd_interrupt_IRQHandler
|
||||
cpuss_interrupts_dmac_0_IRQHandler
|
||||
cpuss_interrupts_dmac_1_IRQHandler
|
||||
cpuss_interrupts_dmac_2_IRQHandler
|
||||
cpuss_interrupts_dmac_3_IRQHandler
|
||||
cpuss_interrupts_dw0_0_IRQHandler
|
||||
cpuss_interrupts_dw0_1_IRQHandler
|
||||
cpuss_interrupts_dw0_2_IRQHandler
|
||||
cpuss_interrupts_dw0_3_IRQHandler
|
||||
cpuss_interrupts_dw0_4_IRQHandler
|
||||
cpuss_interrupts_dw0_5_IRQHandler
|
||||
cpuss_interrupts_dw0_6_IRQHandler
|
||||
cpuss_interrupts_dw0_7_IRQHandler
|
||||
cpuss_interrupts_dw0_8_IRQHandler
|
||||
cpuss_interrupts_dw0_9_IRQHandler
|
||||
cpuss_interrupts_dw0_10_IRQHandler
|
||||
cpuss_interrupts_dw0_11_IRQHandler
|
||||
cpuss_interrupts_dw0_12_IRQHandler
|
||||
cpuss_interrupts_dw0_13_IRQHandler
|
||||
cpuss_interrupts_dw0_14_IRQHandler
|
||||
cpuss_interrupts_dw0_15_IRQHandler
|
||||
cpuss_interrupts_dw0_16_IRQHandler
|
||||
cpuss_interrupts_dw0_17_IRQHandler
|
||||
cpuss_interrupts_dw0_18_IRQHandler
|
||||
cpuss_interrupts_dw0_19_IRQHandler
|
||||
cpuss_interrupts_dw0_20_IRQHandler
|
||||
cpuss_interrupts_dw0_21_IRQHandler
|
||||
cpuss_interrupts_dw0_22_IRQHandler
|
||||
cpuss_interrupts_dw0_23_IRQHandler
|
||||
cpuss_interrupts_dw0_24_IRQHandler
|
||||
cpuss_interrupts_dw0_25_IRQHandler
|
||||
cpuss_interrupts_dw0_26_IRQHandler
|
||||
cpuss_interrupts_dw0_27_IRQHandler
|
||||
cpuss_interrupts_dw0_28_IRQHandler
|
||||
cpuss_interrupts_dw1_0_IRQHandler
|
||||
cpuss_interrupts_dw1_1_IRQHandler
|
||||
cpuss_interrupts_dw1_2_IRQHandler
|
||||
cpuss_interrupts_dw1_3_IRQHandler
|
||||
cpuss_interrupts_dw1_4_IRQHandler
|
||||
cpuss_interrupts_dw1_5_IRQHandler
|
||||
cpuss_interrupts_dw1_6_IRQHandler
|
||||
cpuss_interrupts_dw1_7_IRQHandler
|
||||
cpuss_interrupts_dw1_8_IRQHandler
|
||||
cpuss_interrupts_dw1_9_IRQHandler
|
||||
cpuss_interrupts_dw1_10_IRQHandler
|
||||
cpuss_interrupts_dw1_11_IRQHandler
|
||||
cpuss_interrupts_dw1_12_IRQHandler
|
||||
cpuss_interrupts_dw1_13_IRQHandler
|
||||
cpuss_interrupts_dw1_14_IRQHandler
|
||||
cpuss_interrupts_dw1_15_IRQHandler
|
||||
cpuss_interrupts_dw1_16_IRQHandler
|
||||
cpuss_interrupts_dw1_17_IRQHandler
|
||||
cpuss_interrupts_dw1_18_IRQHandler
|
||||
cpuss_interrupts_dw1_19_IRQHandler
|
||||
cpuss_interrupts_dw1_20_IRQHandler
|
||||
cpuss_interrupts_dw1_21_IRQHandler
|
||||
cpuss_interrupts_dw1_22_IRQHandler
|
||||
cpuss_interrupts_dw1_23_IRQHandler
|
||||
cpuss_interrupts_dw1_24_IRQHandler
|
||||
cpuss_interrupts_dw1_25_IRQHandler
|
||||
cpuss_interrupts_dw1_26_IRQHandler
|
||||
cpuss_interrupts_dw1_27_IRQHandler
|
||||
cpuss_interrupts_dw1_28_IRQHandler
|
||||
cpuss_interrupts_fault_0_IRQHandler
|
||||
cpuss_interrupts_fault_1_IRQHandler
|
||||
cpuss_interrupt_crypto_IRQHandler
|
||||
cpuss_interrupt_fm_IRQHandler
|
||||
cpuss_interrupts_cm4_fp_IRQHandler
|
||||
cpuss_interrupts_cm0_cti_0_IRQHandler
|
||||
cpuss_interrupts_cm0_cti_1_IRQHandler
|
||||
cpuss_interrupts_cm4_cti_0_IRQHandler
|
||||
cpuss_interrupts_cm4_cti_1_IRQHandler
|
||||
tcpwm_0_interrupts_0_IRQHandler
|
||||
tcpwm_0_interrupts_1_IRQHandler
|
||||
tcpwm_0_interrupts_2_IRQHandler
|
||||
tcpwm_0_interrupts_3_IRQHandler
|
||||
tcpwm_0_interrupts_4_IRQHandler
|
||||
tcpwm_0_interrupts_5_IRQHandler
|
||||
tcpwm_0_interrupts_6_IRQHandler
|
||||
tcpwm_0_interrupts_7_IRQHandler
|
||||
tcpwm_1_interrupts_0_IRQHandler
|
||||
tcpwm_1_interrupts_1_IRQHandler
|
||||
tcpwm_1_interrupts_2_IRQHandler
|
||||
tcpwm_1_interrupts_3_IRQHandler
|
||||
tcpwm_1_interrupts_4_IRQHandler
|
||||
tcpwm_1_interrupts_5_IRQHandler
|
||||
tcpwm_1_interrupts_6_IRQHandler
|
||||
tcpwm_1_interrupts_7_IRQHandler
|
||||
tcpwm_1_interrupts_8_IRQHandler
|
||||
tcpwm_1_interrupts_9_IRQHandler
|
||||
tcpwm_1_interrupts_10_IRQHandler
|
||||
tcpwm_1_interrupts_11_IRQHandler
|
||||
tcpwm_1_interrupts_12_IRQHandler
|
||||
tcpwm_1_interrupts_13_IRQHandler
|
||||
tcpwm_1_interrupts_14_IRQHandler
|
||||
tcpwm_1_interrupts_15_IRQHandler
|
||||
tcpwm_1_interrupts_16_IRQHandler
|
||||
tcpwm_1_interrupts_17_IRQHandler
|
||||
tcpwm_1_interrupts_18_IRQHandler
|
||||
tcpwm_1_interrupts_19_IRQHandler
|
||||
tcpwm_1_interrupts_20_IRQHandler
|
||||
tcpwm_1_interrupts_21_IRQHandler
|
||||
tcpwm_1_interrupts_22_IRQHandler
|
||||
tcpwm_1_interrupts_23_IRQHandler
|
||||
pass_interrupt_sar_IRQHandler
|
||||
audioss_0_interrupt_i2s_IRQHandler
|
||||
audioss_0_interrupt_pdm_IRQHandler
|
||||
audioss_1_interrupt_i2s_IRQHandler
|
||||
profile_interrupt_IRQHandler
|
||||
smif_interrupt_IRQHandler
|
||||
usb_interrupt_hi_IRQHandler
|
||||
usb_interrupt_med_IRQHandler
|
||||
usb_interrupt_lo_IRQHandler
|
||||
sdhc_0_interrupt_wakeup_IRQHandler
|
||||
sdhc_0_interrupt_general_IRQHandler
|
||||
sdhc_1_interrupt_wakeup_IRQHandler
|
||||
sdhc_1_interrupt_general_IRQHandler
|
||||
|
||||
B .
|
||||
ENDP
|
||||
|
||||
ALIGN
|
||||
|
||||
|
||||
; User Initial Stack & Heap
|
||||
|
||||
IF :DEF:__MICROLIB
|
||||
|
||||
EXPORT __initial_sp
|
||||
EXPORT __heap_base
|
||||
EXPORT __heap_limit
|
||||
|
||||
ELSE
|
||||
|
||||
IMPORT __use_two_region_memory
|
||||
|
||||
ALIGN
|
||||
|
||||
ENDIF
|
||||
|
||||
END
|
||||
|
||||
|
||||
; [] END OF FILE
|
|
@ -1,464 +0,0 @@
|
|||
/***************************************************************************//**
|
||||
* \file cy8c6xxa_cm4_dual.ld
|
||||
* \version 2.40
|
||||
*
|
||||
* Linker file for the GNU C compiler.
|
||||
*
|
||||
* The main purpose of the linker script is to describe how the sections in the
|
||||
* input files should be mapped into the output file, and to control the memory
|
||||
* layout of the output file.
|
||||
*
|
||||
* \note The entry point location is fixed and starts at 0x10000000. The valid
|
||||
* application image should be placed there.
|
||||
*
|
||||
* \note The linker files included with the PDL template projects must be generic
|
||||
* and handle all common use cases. Your project may not use every section
|
||||
* defined in the linker files. In that case you may see warnings during the
|
||||
* build process. In your project, you can simply comment out or remove the
|
||||
* relevant code in the linker file.
|
||||
*
|
||||
********************************************************************************
|
||||
* \copyright
|
||||
* Copyright 2016-2019 Cypress Semiconductor Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
|
||||
OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
|
||||
SEARCH_DIR(.)
|
||||
GROUP(-lgcc -lc -lnosys)
|
||||
ENTRY(Reset_Handler)
|
||||
|
||||
#if !defined(MBED_ROM_START)
|
||||
#define MBED_ROM_START 0x10000000
|
||||
#endif
|
||||
|
||||
/* MBED_APP_START is being used by the bootloader build script and
|
||||
* will be calculate by the system. Without bootloader the MBED_APP_START
|
||||
* is equal to MBED_ROM_START
|
||||
*/
|
||||
#if !defined(MBED_APP_START)
|
||||
#define MBED_APP_START MBED_ROM_START
|
||||
#endif
|
||||
|
||||
#if !defined(MBED_ROM_SIZE)
|
||||
#define MBED_ROM_SIZE 0x00200000
|
||||
#endif
|
||||
|
||||
/* MBED_APP_SIZE is being used by the bootloader build script and
|
||||
* will be calculate by the system. Without bootloader the MBED_APP_SIZE
|
||||
* is equal to MBED_ROM_SIZE
|
||||
*/
|
||||
#if !defined(MBED_APP_SIZE)
|
||||
#define MBED_APP_SIZE MBED_ROM_SIZE
|
||||
#endif
|
||||
|
||||
#if !defined(MBED_RAM_START)
|
||||
#define MBED_RAM_START 0x08002000
|
||||
#endif
|
||||
|
||||
#if !defined(MBED_RAM_SIZE)
|
||||
#define MBED_RAM_SIZE 0x000FD800
|
||||
#endif
|
||||
|
||||
#if !defined(MBED_BOOT_STACK_SIZE)
|
||||
#define MBED_BOOT_STACK_SIZE 0x400
|
||||
#endif
|
||||
|
||||
STACK_SIZE = MBED_BOOT_STACK_SIZE;
|
||||
|
||||
/* Force symbol to be entered in the output file as an undefined symbol. Doing
|
||||
* this may, for example, trigger linking of additional modules from standard
|
||||
* libraries. You may list several symbols for each EXTERN, and you may use
|
||||
* EXTERN multiple times. This command has the same effect as the -u command-line
|
||||
* option.
|
||||
*/
|
||||
EXTERN(Reset_Handler)
|
||||
|
||||
/* The MEMORY section below describes the location and size of blocks of memory in the target.
|
||||
* Use this section to specify the memory regions available for allocation.
|
||||
*/
|
||||
MEMORY
|
||||
{
|
||||
/* The ram and flash regions control RAM and flash memory allocation for the CM4 core.
|
||||
* You can change the memory allocation by editing the 'ram' and 'flash' regions.
|
||||
* Note that 2 KB of RAM (at the end of the SRAM) are reserved for system use.
|
||||
* Using this memory region for other purposes will lead to unexpected behavior.
|
||||
* Your changes must be aligned with the corresponding memory regions for CM0+ core in 'xx_cm0plus.ld',
|
||||
* where 'xx' is the device group; for example, 'cy8c6xx7_cm0plus.ld'.
|
||||
*/
|
||||
ram (rwx) : ORIGIN = MBED_RAM_START, LENGTH = MBED_RAM_SIZE
|
||||
flash (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE
|
||||
|
||||
/* This is a 32K flash region used for EEPROM emulation. This region can also be used as the general purpose flash.
|
||||
* You can assign sections to this memory region for only one of the cores.
|
||||
* Note some middleware (e.g. BLE, Emulated EEPROM) can place their data into this memory region.
|
||||
* Therefore, repurposing this memory region will prevent such middleware from operation.
|
||||
*/
|
||||
em_eeprom (rx) : ORIGIN = 0x14000000, LENGTH = 0x8000 /* 32 KB */
|
||||
|
||||
/* The following regions define device specific memory regions and must not be changed. */
|
||||
sflash_user_data (rx) : ORIGIN = 0x16000800, LENGTH = 0x800 /* Supervisory flash: User data */
|
||||
sflash_nar (rx) : ORIGIN = 0x16001A00, LENGTH = 0x200 /* Supervisory flash: Normal Access Restrictions (NAR) */
|
||||
sflash_public_key (rx) : ORIGIN = 0x16005A00, LENGTH = 0xC00 /* Supervisory flash: Public Key */
|
||||
sflash_toc_2 (rx) : ORIGIN = 0x16007C00, LENGTH = 0x200 /* Supervisory flash: Table of Content # 2 */
|
||||
sflash_rtoc_2 (rx) : ORIGIN = 0x16007E00, LENGTH = 0x200 /* Supervisory flash: Table of Content # 2 Copy */
|
||||
xip (rx) : ORIGIN = 0x18000000, LENGTH = 0x8000000 /* 128 MB */
|
||||
efuse (r) : ORIGIN = 0x90700000, LENGTH = 0x100000 /* 1 MB */
|
||||
}
|
||||
|
||||
/* Size and start address of the Cortex-M0+ application image */
|
||||
FLASH_CM0P_SIZE = 0x2000;
|
||||
FLASH_CM0P_START = ORIGIN(flash);
|
||||
/* Size and start address of the Cortex-M4 application image */
|
||||
FLASH_CM4_SIZE = LENGTH(flash) - FLASH_CM0P_SIZE;
|
||||
FLASH_CM4_START = FLASH_CM0P_START + FLASH_CM0P_SIZE;
|
||||
|
||||
/* Library configurations */
|
||||
GROUP(libgcc.a libc.a libm.a libnosys.a)
|
||||
|
||||
/* Linker script to place sections and symbol values. Should be used together
|
||||
* with other linker script that defines memory regions FLASH and RAM.
|
||||
* It references following symbols, which must be defined in code:
|
||||
* Reset_Handler : Entry of reset handler
|
||||
*
|
||||
* It defines following symbols, which code can use without definition:
|
||||
* __exidx_start
|
||||
* __exidx_end
|
||||
* __copy_table_start__
|
||||
* __copy_table_end__
|
||||
* __zero_table_start__
|
||||
* __zero_table_end__
|
||||
* __etext
|
||||
* __data_start__
|
||||
* __preinit_array_start
|
||||
* __preinit_array_end
|
||||
* __init_array_start
|
||||
* __init_array_end
|
||||
* __fini_array_start
|
||||
* __fini_array_end
|
||||
* __data_end__
|
||||
* __bss_start__
|
||||
* __bss_end__
|
||||
* __end__
|
||||
* end
|
||||
* __HeapLimit
|
||||
* __StackLimit
|
||||
* __StackTop
|
||||
* __stack
|
||||
* __Vectors_End
|
||||
* __Vectors_Size
|
||||
*/
|
||||
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
/* Cortex-M0+ application image */
|
||||
.cy_m0p_image FLASH_CM0P_START :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__cy_m0p_code_start = . ;
|
||||
KEEP(*(.cy_m0p_image))
|
||||
__cy_m0p_code_end = . ;
|
||||
} > flash
|
||||
|
||||
/* Cortex-M4 application image */
|
||||
.text FLASH_CM4_START :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__Vectors = . ;
|
||||
KEEP(*(.vectors))
|
||||
. = ALIGN(4);
|
||||
__Vectors_End = .;
|
||||
__Vectors_Size = __Vectors_End - __Vectors;
|
||||
__end__ = .;
|
||||
|
||||
. = ALIGN(4);
|
||||
*(.text*)
|
||||
|
||||
KEEP(*(.init))
|
||||
KEEP(*(.fini))
|
||||
|
||||
/* .ctors */
|
||||
*crtbegin.o(.ctors)
|
||||
*crtbegin?.o(.ctors)
|
||||
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
|
||||
*(SORT(.ctors.*))
|
||||
*(.ctors)
|
||||
|
||||
/* .dtors */
|
||||
*crtbegin.o(.dtors)
|
||||
*crtbegin?.o(.dtors)
|
||||
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
|
||||
*(SORT(.dtors.*))
|
||||
*(.dtors)
|
||||
|
||||
/* Read-only code (constants). */
|
||||
*(.rodata .rodata.* .constdata .constdata.* .conststring .conststring.*)
|
||||
|
||||
KEEP(*(.eh_frame*))
|
||||
} > flash
|
||||
|
||||
|
||||
.ARM.extab :
|
||||
{
|
||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||
} > flash
|
||||
|
||||
__exidx_start = .;
|
||||
|
||||
.ARM.exidx :
|
||||
{
|
||||
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
||||
} > flash
|
||||
__exidx_end = .;
|
||||
|
||||
|
||||
/* To copy multiple ROM to RAM sections,
|
||||
* uncomment .copy.table section and,
|
||||
* define __STARTUP_COPY_MULTIPLE in startup_psoc6_02_cm4.S */
|
||||
.copy.table :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__copy_table_start__ = .;
|
||||
|
||||
/* Copy interrupt vectors from flash to RAM */
|
||||
LONG (__Vectors) /* From */
|
||||
LONG (__ram_vectors_start__) /* To */
|
||||
LONG (__Vectors_End - __Vectors) /* Size */
|
||||
|
||||
/* Copy data section to RAM */
|
||||
LONG (__etext) /* From */
|
||||
LONG (__data_start__) /* To */
|
||||
LONG (__data_end__ - __data_start__) /* Size */
|
||||
|
||||
__copy_table_end__ = .;
|
||||
} > flash
|
||||
|
||||
|
||||
/* To clear multiple BSS sections,
|
||||
* uncomment .zero.table section and,
|
||||
* define __STARTUP_CLEAR_BSS_MULTIPLE in startup_psoc6_02_cm4.S */
|
||||
.zero.table :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__zero_table_start__ = .;
|
||||
LONG (__bss_start__)
|
||||
LONG (__bss_end__ - __bss_start__)
|
||||
__zero_table_end__ = .;
|
||||
} > flash
|
||||
|
||||
__etext = . ;
|
||||
|
||||
|
||||
.ramVectors (NOLOAD) : ALIGN(8)
|
||||
{
|
||||
__ram_vectors_start__ = .;
|
||||
KEEP(*(.ram_vectors))
|
||||
__ram_vectors_end__ = .;
|
||||
} > ram
|
||||
|
||||
|
||||
.data __ram_vectors_end__ : AT (__etext)
|
||||
{
|
||||
__data_start__ = .;
|
||||
|
||||
*(vtable)
|
||||
*(.data*)
|
||||
|
||||
. = ALIGN(4);
|
||||
/* preinit data */
|
||||
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||
KEEP(*(.preinit_array))
|
||||
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||
|
||||
. = ALIGN(4);
|
||||
/* init data */
|
||||
PROVIDE_HIDDEN (__init_array_start = .);
|
||||
KEEP(*(SORT(.init_array.*)))
|
||||
KEEP(*(.init_array))
|
||||
PROVIDE_HIDDEN (__init_array_end = .);
|
||||
|
||||
|
||||
. = ALIGN(4);
|
||||
/* finit data */
|
||||
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||
KEEP(*(SORT(.fini_array.*)))
|
||||
KEEP(*(.fini_array))
|
||||
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||
|
||||
KEEP(*(.jcr*))
|
||||
. = ALIGN(4);
|
||||
|
||||
KEEP(*(.cy_ramfunc*))
|
||||
. = ALIGN(4);
|
||||
|
||||
__data_end__ = .;
|
||||
|
||||
} > ram
|
||||
|
||||
|
||||
/* Place variables in the section that should not be initialized during the
|
||||
* device startup.
|
||||
*/
|
||||
.noinit (NOLOAD) : ALIGN(8)
|
||||
{
|
||||
KEEP(*(.noinit))
|
||||
} > ram
|
||||
|
||||
|
||||
/* The uninitialized global or static variables are placed in this section.
|
||||
*
|
||||
* The NOLOAD attribute tells linker that .bss section does not consume
|
||||
* any space in the image. The NOLOAD attribute changes the .bss type to
|
||||
* NOBITS, and that makes linker to A) not allocate section in memory, and
|
||||
* A) put information to clear the section with all zeros during application
|
||||
* loading.
|
||||
*
|
||||
* Without the NOLOAD attribute, the .bss section might get PROGBITS type.
|
||||
* This makes linker to A) allocate zeroed section in memory, and B) copy
|
||||
* this section to RAM during application loading.
|
||||
*/
|
||||
.bss (NOLOAD):
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__bss_start__ = .;
|
||||
*(.bss*)
|
||||
*(COMMON)
|
||||
. = ALIGN(4);
|
||||
__bss_end__ = .;
|
||||
} > ram
|
||||
|
||||
|
||||
.heap (NOLOAD):
|
||||
{
|
||||
__HeapBase = .;
|
||||
__end__ = .;
|
||||
end = __end__;
|
||||
KEEP(*(.heap*))
|
||||
. = ORIGIN(ram) + LENGTH(ram) - STACK_SIZE;
|
||||
__HeapLimit = .;
|
||||
} > ram
|
||||
|
||||
|
||||
/* Set stack top to end of RAM, and stack limit move down by
|
||||
* size of stack_dummy section */
|
||||
__StackTop = ORIGIN(ram) + LENGTH(ram);
|
||||
__StackLimit = __StackTop - STACK_SIZE;
|
||||
PROVIDE(__stack = __StackTop);
|
||||
|
||||
/* Check if data + heap + stack exceeds RAM limit */
|
||||
ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
|
||||
|
||||
|
||||
/* Used for the digital signature of the secure application and the Bootloader SDK application.
|
||||
* The size of the section depends on the required data size. */
|
||||
.cy_app_signature ORIGIN(flash) + LENGTH(flash) - 256 :
|
||||
{
|
||||
KEEP(*(.cy_app_signature))
|
||||
} > flash
|
||||
|
||||
|
||||
/* Emulated EEPROM Flash area */
|
||||
.cy_em_eeprom :
|
||||
{
|
||||
KEEP(*(.cy_em_eeprom))
|
||||
} > em_eeprom
|
||||
|
||||
|
||||
/* Supervisory Flash: User data */
|
||||
.cy_sflash_user_data :
|
||||
{
|
||||
KEEP(*(.cy_sflash_user_data))
|
||||
} > sflash_user_data
|
||||
|
||||
|
||||
/* Supervisory Flash: Normal Access Restrictions (NAR) */
|
||||
.cy_sflash_nar :
|
||||
{
|
||||
KEEP(*(.cy_sflash_nar))
|
||||
} > sflash_nar
|
||||
|
||||
|
||||
/* Supervisory Flash: Public Key */
|
||||
.cy_sflash_public_key :
|
||||
{
|
||||
KEEP(*(.cy_sflash_public_key))
|
||||
} > sflash_public_key
|
||||
|
||||
|
||||
/* Supervisory Flash: Table of Content # 2 */
|
||||
.cy_toc_part2 :
|
||||
{
|
||||
KEEP(*(.cy_toc_part2))
|
||||
} > sflash_toc_2
|
||||
|
||||
|
||||
/* Supervisory Flash: Table of Content # 2 Copy */
|
||||
.cy_rtoc_part2 :
|
||||
{
|
||||
KEEP(*(.cy_rtoc_part2))
|
||||
} > sflash_rtoc_2
|
||||
|
||||
|
||||
/* Places the code in the Execute in Place (XIP) section. See the smif driver
|
||||
* documentation for details.
|
||||
*/
|
||||
.cy_xip :
|
||||
{
|
||||
KEEP(*(.cy_xip))
|
||||
} > xip
|
||||
|
||||
|
||||
/* eFuse */
|
||||
.cy_efuse :
|
||||
{
|
||||
KEEP(*(.cy_efuse))
|
||||
} > efuse
|
||||
|
||||
|
||||
/* These sections are used for additional metadata (silicon revision,
|
||||
* Silicon/JTAG ID, etc.) storage.
|
||||
*/
|
||||
.cymeta 0x90500000 : { KEEP(*(.cymeta)) } :NONE
|
||||
}
|
||||
|
||||
|
||||
/* The following symbols used by the cymcuelftool. */
|
||||
/* Flash */
|
||||
__cy_memory_0_start = 0x10000000;
|
||||
__cy_memory_0_length = 0x00200000;
|
||||
__cy_memory_0_row_size = 0x200;
|
||||
|
||||
/* Emulated EEPROM Flash area */
|
||||
__cy_memory_1_start = 0x14000000;
|
||||
__cy_memory_1_length = 0x8000;
|
||||
__cy_memory_1_row_size = 0x200;
|
||||
|
||||
/* Supervisory Flash */
|
||||
__cy_memory_2_start = 0x16000000;
|
||||
__cy_memory_2_length = 0x8000;
|
||||
__cy_memory_2_row_size = 0x200;
|
||||
|
||||
/* XIP */
|
||||
__cy_memory_3_start = 0x18000000;
|
||||
__cy_memory_3_length = 0x08000000;
|
||||
__cy_memory_3_row_size = 0x200;
|
||||
|
||||
/* eFuse */
|
||||
__cy_memory_4_start = 0x90700000;
|
||||
__cy_memory_4_length = 0x100000;
|
||||
__cy_memory_4_row_size = 1;
|
||||
|
||||
/* EOF */
|
|
@ -1,673 +0,0 @@
|
|||
/**************************************************************************//**
|
||||
* @file startup_psoc6_02_cm4.S
|
||||
* @brief CMSIS Core Device Startup File for
|
||||
* ARMCM4 Device Series
|
||||
* @version V5.00
|
||||
* @date 02. March 2016
|
||||
******************************************************************************/
|
||||
/*
|
||||
* Copyright (c) 2009-2016 ARM Limited. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/* Address of the NMI handler */
|
||||
#define CY_NMI_HANLDER_ADDR 0x0000000D
|
||||
|
||||
/* The CPU VTOR register */
|
||||
#define CY_CPU_VTOR_ADDR 0xE000ED08
|
||||
|
||||
/* Copy flash vectors and data section to RAM */
|
||||
#define __STARTUP_COPY_MULTIPLE
|
||||
|
||||
/* Clear single BSS section */
|
||||
#define __STARTUP_CLEAR_BSS
|
||||
|
||||
.syntax unified
|
||||
.arch armv7-m
|
||||
|
||||
.section .stack
|
||||
.align 3
|
||||
#ifdef __STACK_SIZE
|
||||
.equ Stack_Size, __STACK_SIZE
|
||||
#else
|
||||
.equ Stack_Size, 0x00001000
|
||||
#endif
|
||||
.globl __StackTop
|
||||
.globl __StackLimit
|
||||
__StackLimit:
|
||||
.space Stack_Size
|
||||
.size __StackLimit, . - __StackLimit
|
||||
__StackTop:
|
||||
.size __StackTop, . - __StackTop
|
||||
|
||||
.section .heap
|
||||
.align 3
|
||||
#ifdef __HEAP_SIZE
|
||||
.equ Heap_Size, __HEAP_SIZE
|
||||
#else
|
||||
.equ Heap_Size, 0x00000400
|
||||
#endif
|
||||
.globl __HeapBase
|
||||
.globl __HeapLimit
|
||||
__HeapBase:
|
||||
.if Heap_Size
|
||||
.space Heap_Size
|
||||
.endif
|
||||
.size __HeapBase, . - __HeapBase
|
||||
__HeapLimit:
|
||||
.size __HeapLimit, . - __HeapLimit
|
||||
|
||||
.section .vectors
|
||||
.align 2
|
||||
.globl __Vectors
|
||||
__Vectors:
|
||||
.long __StackTop /* Top of Stack */
|
||||
.long Reset_Handler /* Reset Handler */
|
||||
.long CY_NMI_HANLDER_ADDR /* NMI Handler */
|
||||
.long HardFault_Handler /* Hard Fault Handler */
|
||||
.long MemManage_Handler /* MPU Fault Handler */
|
||||
.long BusFault_Handler /* Bus Fault Handler */
|
||||
.long UsageFault_Handler /* Usage Fault Handler */
|
||||
.long 0 /* Reserved */
|
||||
.long 0 /* Reserved */
|
||||
.long 0 /* Reserved */
|
||||
.long 0 /* Reserved */
|
||||
.long SVC_Handler /* SVCall Handler */
|
||||
.long DebugMon_Handler /* Debug Monitor Handler */
|
||||
.long 0 /* Reserved */
|
||||
.long PendSV_Handler /* PendSV Handler */
|
||||
.long SysTick_Handler /* SysTick Handler */
|
||||
|
||||
/* External interrupts Description */
|
||||
.long ioss_interrupts_gpio_0_IRQHandler /* GPIO Port Interrupt #0 */
|
||||
.long ioss_interrupts_gpio_1_IRQHandler /* GPIO Port Interrupt #1 */
|
||||
.long ioss_interrupts_gpio_2_IRQHandler /* GPIO Port Interrupt #2 */
|
||||
.long ioss_interrupts_gpio_3_IRQHandler /* GPIO Port Interrupt #3 */
|
||||
.long ioss_interrupts_gpio_4_IRQHandler /* GPIO Port Interrupt #4 */
|
||||
.long ioss_interrupts_gpio_5_IRQHandler /* GPIO Port Interrupt #5 */
|
||||
.long ioss_interrupts_gpio_6_IRQHandler /* GPIO Port Interrupt #6 */
|
||||
.long ioss_interrupts_gpio_7_IRQHandler /* GPIO Port Interrupt #7 */
|
||||
.long ioss_interrupts_gpio_8_IRQHandler /* GPIO Port Interrupt #8 */
|
||||
.long ioss_interrupts_gpio_9_IRQHandler /* GPIO Port Interrupt #9 */
|
||||
.long ioss_interrupts_gpio_10_IRQHandler /* GPIO Port Interrupt #10 */
|
||||
.long ioss_interrupts_gpio_11_IRQHandler /* GPIO Port Interrupt #11 */
|
||||
.long ioss_interrupts_gpio_12_IRQHandler /* GPIO Port Interrupt #12 */
|
||||
.long ioss_interrupts_gpio_13_IRQHandler /* GPIO Port Interrupt #13 */
|
||||
.long ioss_interrupts_gpio_14_IRQHandler /* GPIO Port Interrupt #14 */
|
||||
.long ioss_interrupt_gpio_IRQHandler /* GPIO All Ports */
|
||||
.long ioss_interrupt_vdd_IRQHandler /* GPIO Supply Detect Interrupt */
|
||||
.long lpcomp_interrupt_IRQHandler /* Low Power Comparator Interrupt */
|
||||
.long scb_8_interrupt_IRQHandler /* Serial Communication Block #8 (DeepSleep capable) */
|
||||
.long srss_interrupt_mcwdt_0_IRQHandler /* Multi Counter Watchdog Timer interrupt */
|
||||
.long srss_interrupt_mcwdt_1_IRQHandler /* Multi Counter Watchdog Timer interrupt */
|
||||
.long srss_interrupt_backup_IRQHandler /* Backup domain interrupt */
|
||||
.long srss_interrupt_IRQHandler /* Other combined Interrupts for SRSS (LVD, WDT, CLKCAL) */
|
||||
.long cpuss_interrupts_ipc_0_IRQHandler /* CPUSS Inter Process Communication Interrupt #0 */
|
||||
.long cpuss_interrupts_ipc_1_IRQHandler /* CPUSS Inter Process Communication Interrupt #1 */
|
||||
.long cpuss_interrupts_ipc_2_IRQHandler /* CPUSS Inter Process Communication Interrupt #2 */
|
||||
.long cpuss_interrupts_ipc_3_IRQHandler /* CPUSS Inter Process Communication Interrupt #3 */
|
||||
.long cpuss_interrupts_ipc_4_IRQHandler /* CPUSS Inter Process Communication Interrupt #4 */
|
||||
.long cpuss_interrupts_ipc_5_IRQHandler /* CPUSS Inter Process Communication Interrupt #5 */
|
||||
.long cpuss_interrupts_ipc_6_IRQHandler /* CPUSS Inter Process Communication Interrupt #6 */
|
||||
.long cpuss_interrupts_ipc_7_IRQHandler /* CPUSS Inter Process Communication Interrupt #7 */
|
||||
.long cpuss_interrupts_ipc_8_IRQHandler /* CPUSS Inter Process Communication Interrupt #8 */
|
||||
.long cpuss_interrupts_ipc_9_IRQHandler /* CPUSS Inter Process Communication Interrupt #9 */
|
||||
.long cpuss_interrupts_ipc_10_IRQHandler /* CPUSS Inter Process Communication Interrupt #10 */
|
||||
.long cpuss_interrupts_ipc_11_IRQHandler /* CPUSS Inter Process Communication Interrupt #11 */
|
||||
.long cpuss_interrupts_ipc_12_IRQHandler /* CPUSS Inter Process Communication Interrupt #12 */
|
||||
.long cpuss_interrupts_ipc_13_IRQHandler /* CPUSS Inter Process Communication Interrupt #13 */
|
||||
.long cpuss_interrupts_ipc_14_IRQHandler /* CPUSS Inter Process Communication Interrupt #14 */
|
||||
.long cpuss_interrupts_ipc_15_IRQHandler /* CPUSS Inter Process Communication Interrupt #15 */
|
||||
.long scb_0_interrupt_IRQHandler /* Serial Communication Block #0 */
|
||||
.long scb_1_interrupt_IRQHandler /* Serial Communication Block #1 */
|
||||
.long scb_2_interrupt_IRQHandler /* Serial Communication Block #2 */
|
||||
.long scb_3_interrupt_IRQHandler /* Serial Communication Block #3 */
|
||||
.long scb_4_interrupt_IRQHandler /* Serial Communication Block #4 */
|
||||
.long scb_5_interrupt_IRQHandler /* Serial Communication Block #5 */
|
||||
.long scb_6_interrupt_IRQHandler /* Serial Communication Block #6 */
|
||||
.long scb_7_interrupt_IRQHandler /* Serial Communication Block #7 */
|
||||
.long scb_9_interrupt_IRQHandler /* Serial Communication Block #9 */
|
||||
.long scb_10_interrupt_IRQHandler /* Serial Communication Block #10 */
|
||||
.long scb_11_interrupt_IRQHandler /* Serial Communication Block #11 */
|
||||
.long scb_12_interrupt_IRQHandler /* Serial Communication Block #12 */
|
||||
.long csd_interrupt_IRQHandler /* CSD (Capsense) interrupt */
|
||||
.long cpuss_interrupts_dmac_0_IRQHandler /* CPUSS DMAC, Channel #0 */
|
||||
.long cpuss_interrupts_dmac_1_IRQHandler /* CPUSS DMAC, Channel #1 */
|
||||
.long cpuss_interrupts_dmac_2_IRQHandler /* CPUSS DMAC, Channel #2 */
|
||||
.long cpuss_interrupts_dmac_3_IRQHandler /* CPUSS DMAC, Channel #3 */
|
||||
.long cpuss_interrupts_dw0_0_IRQHandler /* CPUSS DataWire #0, Channel #0 */
|
||||
.long cpuss_interrupts_dw0_1_IRQHandler /* CPUSS DataWire #0, Channel #1 */
|
||||
.long cpuss_interrupts_dw0_2_IRQHandler /* CPUSS DataWire #0, Channel #2 */
|
||||
.long cpuss_interrupts_dw0_3_IRQHandler /* CPUSS DataWire #0, Channel #3 */
|
||||
.long cpuss_interrupts_dw0_4_IRQHandler /* CPUSS DataWire #0, Channel #4 */
|
||||
.long cpuss_interrupts_dw0_5_IRQHandler /* CPUSS DataWire #0, Channel #5 */
|
||||
.long cpuss_interrupts_dw0_6_IRQHandler /* CPUSS DataWire #0, Channel #6 */
|
||||
.long cpuss_interrupts_dw0_7_IRQHandler /* CPUSS DataWire #0, Channel #7 */
|
||||
.long cpuss_interrupts_dw0_8_IRQHandler /* CPUSS DataWire #0, Channel #8 */
|
||||
.long cpuss_interrupts_dw0_9_IRQHandler /* CPUSS DataWire #0, Channel #9 */
|
||||
.long cpuss_interrupts_dw0_10_IRQHandler /* CPUSS DataWire #0, Channel #10 */
|
||||
.long cpuss_interrupts_dw0_11_IRQHandler /* CPUSS DataWire #0, Channel #11 */
|
||||
.long cpuss_interrupts_dw0_12_IRQHandler /* CPUSS DataWire #0, Channel #12 */
|
||||
.long cpuss_interrupts_dw0_13_IRQHandler /* CPUSS DataWire #0, Channel #13 */
|
||||
.long cpuss_interrupts_dw0_14_IRQHandler /* CPUSS DataWire #0, Channel #14 */
|
||||
.long cpuss_interrupts_dw0_15_IRQHandler /* CPUSS DataWire #0, Channel #15 */
|
||||
.long cpuss_interrupts_dw0_16_IRQHandler /* CPUSS DataWire #0, Channel #16 */
|
||||
.long cpuss_interrupts_dw0_17_IRQHandler /* CPUSS DataWire #0, Channel #17 */
|
||||
.long cpuss_interrupts_dw0_18_IRQHandler /* CPUSS DataWire #0, Channel #18 */
|
||||
.long cpuss_interrupts_dw0_19_IRQHandler /* CPUSS DataWire #0, Channel #19 */
|
||||
.long cpuss_interrupts_dw0_20_IRQHandler /* CPUSS DataWire #0, Channel #20 */
|
||||
.long cpuss_interrupts_dw0_21_IRQHandler /* CPUSS DataWire #0, Channel #21 */
|
||||
.long cpuss_interrupts_dw0_22_IRQHandler /* CPUSS DataWire #0, Channel #22 */
|
||||
.long cpuss_interrupts_dw0_23_IRQHandler /* CPUSS DataWire #0, Channel #23 */
|
||||
.long cpuss_interrupts_dw0_24_IRQHandler /* CPUSS DataWire #0, Channel #24 */
|
||||
.long cpuss_interrupts_dw0_25_IRQHandler /* CPUSS DataWire #0, Channel #25 */
|
||||
.long cpuss_interrupts_dw0_26_IRQHandler /* CPUSS DataWire #0, Channel #26 */
|
||||
.long cpuss_interrupts_dw0_27_IRQHandler /* CPUSS DataWire #0, Channel #27 */
|
||||
.long cpuss_interrupts_dw0_28_IRQHandler /* CPUSS DataWire #0, Channel #28 */
|
||||
.long cpuss_interrupts_dw1_0_IRQHandler /* CPUSS DataWire #1, Channel #0 */
|
||||
.long cpuss_interrupts_dw1_1_IRQHandler /* CPUSS DataWire #1, Channel #1 */
|
||||
.long cpuss_interrupts_dw1_2_IRQHandler /* CPUSS DataWire #1, Channel #2 */
|
||||
.long cpuss_interrupts_dw1_3_IRQHandler /* CPUSS DataWire #1, Channel #3 */
|
||||
.long cpuss_interrupts_dw1_4_IRQHandler /* CPUSS DataWire #1, Channel #4 */
|
||||
.long cpuss_interrupts_dw1_5_IRQHandler /* CPUSS DataWire #1, Channel #5 */
|
||||
.long cpuss_interrupts_dw1_6_IRQHandler /* CPUSS DataWire #1, Channel #6 */
|
||||
.long cpuss_interrupts_dw1_7_IRQHandler /* CPUSS DataWire #1, Channel #7 */
|
||||
.long cpuss_interrupts_dw1_8_IRQHandler /* CPUSS DataWire #1, Channel #8 */
|
||||
.long cpuss_interrupts_dw1_9_IRQHandler /* CPUSS DataWire #1, Channel #9 */
|
||||
.long cpuss_interrupts_dw1_10_IRQHandler /* CPUSS DataWire #1, Channel #10 */
|
||||
.long cpuss_interrupts_dw1_11_IRQHandler /* CPUSS DataWire #1, Channel #11 */
|
||||
.long cpuss_interrupts_dw1_12_IRQHandler /* CPUSS DataWire #1, Channel #12 */
|
||||
.long cpuss_interrupts_dw1_13_IRQHandler /* CPUSS DataWire #1, Channel #13 */
|
||||
.long cpuss_interrupts_dw1_14_IRQHandler /* CPUSS DataWire #1, Channel #14 */
|
||||
.long cpuss_interrupts_dw1_15_IRQHandler /* CPUSS DataWire #1, Channel #15 */
|
||||
.long cpuss_interrupts_dw1_16_IRQHandler /* CPUSS DataWire #1, Channel #16 */
|
||||
.long cpuss_interrupts_dw1_17_IRQHandler /* CPUSS DataWire #1, Channel #17 */
|
||||
.long cpuss_interrupts_dw1_18_IRQHandler /* CPUSS DataWire #1, Channel #18 */
|
||||
.long cpuss_interrupts_dw1_19_IRQHandler /* CPUSS DataWire #1, Channel #19 */
|
||||
.long cpuss_interrupts_dw1_20_IRQHandler /* CPUSS DataWire #1, Channel #20 */
|
||||
.long cpuss_interrupts_dw1_21_IRQHandler /* CPUSS DataWire #1, Channel #21 */
|
||||
.long cpuss_interrupts_dw1_22_IRQHandler /* CPUSS DataWire #1, Channel #22 */
|
||||
.long cpuss_interrupts_dw1_23_IRQHandler /* CPUSS DataWire #1, Channel #23 */
|
||||
.long cpuss_interrupts_dw1_24_IRQHandler /* CPUSS DataWire #1, Channel #24 */
|
||||
.long cpuss_interrupts_dw1_25_IRQHandler /* CPUSS DataWire #1, Channel #25 */
|
||||
.long cpuss_interrupts_dw1_26_IRQHandler /* CPUSS DataWire #1, Channel #26 */
|
||||
.long cpuss_interrupts_dw1_27_IRQHandler /* CPUSS DataWire #1, Channel #27 */
|
||||
.long cpuss_interrupts_dw1_28_IRQHandler /* CPUSS DataWire #1, Channel #28 */
|
||||
.long cpuss_interrupts_fault_0_IRQHandler /* CPUSS Fault Structure Interrupt #0 */
|
||||
.long cpuss_interrupts_fault_1_IRQHandler /* CPUSS Fault Structure Interrupt #1 */
|
||||
.long cpuss_interrupt_crypto_IRQHandler /* CRYPTO Accelerator Interrupt */
|
||||
.long cpuss_interrupt_fm_IRQHandler /* FLASH Macro Interrupt */
|
||||
.long cpuss_interrupts_cm4_fp_IRQHandler /* Floating Point operation fault */
|
||||
.long cpuss_interrupts_cm0_cti_0_IRQHandler /* CM0+ CTI #0 */
|
||||
.long cpuss_interrupts_cm0_cti_1_IRQHandler /* CM0+ CTI #1 */
|
||||
.long cpuss_interrupts_cm4_cti_0_IRQHandler /* CM4 CTI #0 */
|
||||
.long cpuss_interrupts_cm4_cti_1_IRQHandler /* CM4 CTI #1 */
|
||||
.long tcpwm_0_interrupts_0_IRQHandler /* TCPWM #0, Counter #0 */
|
||||
.long tcpwm_0_interrupts_1_IRQHandler /* TCPWM #0, Counter #1 */
|
||||
.long tcpwm_0_interrupts_2_IRQHandler /* TCPWM #0, Counter #2 */
|
||||
.long tcpwm_0_interrupts_3_IRQHandler /* TCPWM #0, Counter #3 */
|
||||
.long tcpwm_0_interrupts_4_IRQHandler /* TCPWM #0, Counter #4 */
|
||||
.long tcpwm_0_interrupts_5_IRQHandler /* TCPWM #0, Counter #5 */
|
||||
.long tcpwm_0_interrupts_6_IRQHandler /* TCPWM #0, Counter #6 */
|
||||
.long tcpwm_0_interrupts_7_IRQHandler /* TCPWM #0, Counter #7 */
|
||||
.long tcpwm_1_interrupts_0_IRQHandler /* TCPWM #1, Counter #0 */
|
||||
.long tcpwm_1_interrupts_1_IRQHandler /* TCPWM #1, Counter #1 */
|
||||
.long tcpwm_1_interrupts_2_IRQHandler /* TCPWM #1, Counter #2 */
|
||||
.long tcpwm_1_interrupts_3_IRQHandler /* TCPWM #1, Counter #3 */
|
||||
.long tcpwm_1_interrupts_4_IRQHandler /* TCPWM #1, Counter #4 */
|
||||
.long tcpwm_1_interrupts_5_IRQHandler /* TCPWM #1, Counter #5 */
|
||||
.long tcpwm_1_interrupts_6_IRQHandler /* TCPWM #1, Counter #6 */
|
||||
.long tcpwm_1_interrupts_7_IRQHandler /* TCPWM #1, Counter #7 */
|
||||
.long tcpwm_1_interrupts_8_IRQHandler /* TCPWM #1, Counter #8 */
|
||||
.long tcpwm_1_interrupts_9_IRQHandler /* TCPWM #1, Counter #9 */
|
||||
.long tcpwm_1_interrupts_10_IRQHandler /* TCPWM #1, Counter #10 */
|
||||
.long tcpwm_1_interrupts_11_IRQHandler /* TCPWM #1, Counter #11 */
|
||||
.long tcpwm_1_interrupts_12_IRQHandler /* TCPWM #1, Counter #12 */
|
||||
.long tcpwm_1_interrupts_13_IRQHandler /* TCPWM #1, Counter #13 */
|
||||
.long tcpwm_1_interrupts_14_IRQHandler /* TCPWM #1, Counter #14 */
|
||||
.long tcpwm_1_interrupts_15_IRQHandler /* TCPWM #1, Counter #15 */
|
||||
.long tcpwm_1_interrupts_16_IRQHandler /* TCPWM #1, Counter #16 */
|
||||
.long tcpwm_1_interrupts_17_IRQHandler /* TCPWM #1, Counter #17 */
|
||||
.long tcpwm_1_interrupts_18_IRQHandler /* TCPWM #1, Counter #18 */
|
||||
.long tcpwm_1_interrupts_19_IRQHandler /* TCPWM #1, Counter #19 */
|
||||
.long tcpwm_1_interrupts_20_IRQHandler /* TCPWM #1, Counter #20 */
|
||||
.long tcpwm_1_interrupts_21_IRQHandler /* TCPWM #1, Counter #21 */
|
||||
.long tcpwm_1_interrupts_22_IRQHandler /* TCPWM #1, Counter #22 */
|
||||
.long tcpwm_1_interrupts_23_IRQHandler /* TCPWM #1, Counter #23 */
|
||||
.long pass_interrupt_sar_IRQHandler /* SAR ADC interrupt */
|
||||
.long audioss_0_interrupt_i2s_IRQHandler /* I2S0 Audio interrupt */
|
||||
.long audioss_0_interrupt_pdm_IRQHandler /* PDM0/PCM0 Audio interrupt */
|
||||
.long audioss_1_interrupt_i2s_IRQHandler /* I2S1 Audio interrupt */
|
||||
.long profile_interrupt_IRQHandler /* Energy Profiler interrupt */
|
||||
.long smif_interrupt_IRQHandler /* Serial Memory Interface interrupt */
|
||||
.long usb_interrupt_hi_IRQHandler /* USB Interrupt */
|
||||
.long usb_interrupt_med_IRQHandler /* USB Interrupt */
|
||||
.long usb_interrupt_lo_IRQHandler /* USB Interrupt */
|
||||
.long sdhc_0_interrupt_wakeup_IRQHandler /* SDIO wakeup interrupt for mxsdhc */
|
||||
.long sdhc_0_interrupt_general_IRQHandler /* Consolidated interrupt for mxsdhc for everything else */
|
||||
.long sdhc_1_interrupt_wakeup_IRQHandler /* EEMC wakeup interrupt for mxsdhc, not used */
|
||||
.long sdhc_1_interrupt_general_IRQHandler /* Consolidated interrupt for mxsdhc for everything else */
|
||||
|
||||
|
||||
.size __Vectors, . - __Vectors
|
||||
.equ __VectorsSize, . - __Vectors
|
||||
|
||||
.section .ram_vectors
|
||||
.align 2
|
||||
.globl __ramVectors
|
||||
__ramVectors:
|
||||
.space __VectorsSize
|
||||
.size __ramVectors, . - __ramVectors
|
||||
|
||||
|
||||
.text
|
||||
.thumb
|
||||
.thumb_func
|
||||
.align 2
|
||||
|
||||
/*
|
||||
* Device startup customization
|
||||
*
|
||||
* Note. The global resources are not yet initialized (for example global variables, peripherals, clocks)
|
||||
* because this function is executed as the first instruction in the ResetHandler.
|
||||
* The PDL is also not initialized to use the proper register offsets.
|
||||
* The user of this function is responsible for initializing the PDL and resources before using them.
|
||||
*/
|
||||
.weak Cy_OnResetUser
|
||||
.func Cy_OnResetUser, Cy_OnResetUser
|
||||
.type Cy_OnResetUser, %function
|
||||
|
||||
Cy_OnResetUser:
|
||||
bx lr
|
||||
.size Cy_OnResetUser, . - Cy_OnResetUser
|
||||
.endfunc
|
||||
|
||||
/* Reset handler */
|
||||
.weak Reset_Handler
|
||||
.type Reset_Handler, %function
|
||||
|
||||
Reset_Handler:
|
||||
bl Cy_OnResetUser
|
||||
cpsid i
|
||||
|
||||
/* Firstly it copies data from read only memory to RAM. There are two schemes
|
||||
* to copy. One can copy more than one sections. Another can only copy
|
||||
* one section. The former scheme needs more instructions and read-only
|
||||
* data to implement than the latter.
|
||||
* Macro __STARTUP_COPY_MULTIPLE is used to choose between two schemes. */
|
||||
|
||||
#ifdef __STARTUP_COPY_MULTIPLE
|
||||
/* Multiple sections scheme.
|
||||
*
|
||||
* Between symbol address __copy_table_start__ and __copy_table_end__,
|
||||
* there are array of triplets, each of which specify:
|
||||
* offset 0: LMA of start of a section to copy from
|
||||
* offset 4: VMA of start of a section to copy to
|
||||
* offset 8: size of the section to copy. Must be multiply of 4
|
||||
*
|
||||
* All addresses must be aligned to 4 bytes boundary.
|
||||
*/
|
||||
ldr r4, =__copy_table_start__
|
||||
ldr r5, =__copy_table_end__
|
||||
|
||||
.L_loop0:
|
||||
cmp r4, r5
|
||||
bge .L_loop0_done
|
||||
ldr r1, [r4]
|
||||
ldr r2, [r4, #4]
|
||||
ldr r3, [r4, #8]
|
||||
|
||||
.L_loop0_0:
|
||||
subs r3, #4
|
||||
ittt ge
|
||||
ldrge r0, [r1, r3]
|
||||
strge r0, [r2, r3]
|
||||
bge .L_loop0_0
|
||||
|
||||
adds r4, #12
|
||||
b .L_loop0
|
||||
|
||||
.L_loop0_done:
|
||||
#else
|
||||
/* Single section scheme.
|
||||
*
|
||||
* The ranges of copy from/to are specified by following symbols
|
||||
* __etext: LMA of start of the section to copy from. Usually end of text
|
||||
* __data_start__: VMA of start of the section to copy to
|
||||
* __data_end__: VMA of end of the section to copy to
|
||||
*
|
||||
* All addresses must be aligned to 4 bytes boundary.
|
||||
*/
|
||||
ldr r1, =__etext
|
||||
ldr r2, =__data_start__
|
||||
ldr r3, =__data_end__
|
||||
|
||||
.L_loop1:
|
||||
cmp r2, r3
|
||||
ittt lt
|
||||
ldrlt r0, [r1], #4
|
||||
strlt r0, [r2], #4
|
||||
blt .L_loop1
|
||||
#endif /*__STARTUP_COPY_MULTIPLE */
|
||||
|
||||
/* This part of work usually is done in C library startup code. Otherwise,
|
||||
* define this macro to enable it in this startup.
|
||||
*
|
||||
* There are two schemes too. One can clear multiple BSS sections. Another
|
||||
* can only clear one section. The former is more size expensive than the
|
||||
* latter.
|
||||
*
|
||||
* Define macro __STARTUP_CLEAR_BSS_MULTIPLE to choose the former.
|
||||
* Otherwise define macro __STARTUP_CLEAR_BSS to choose the later.
|
||||
*/
|
||||
#ifdef __STARTUP_CLEAR_BSS_MULTIPLE
|
||||
/* Multiple sections scheme.
|
||||
*
|
||||
* Between symbol address __copy_table_start__ and __copy_table_end__,
|
||||
* there are array of tuples specifying:
|
||||
* offset 0: Start of a BSS section
|
||||
* offset 4: Size of this BSS section. Must be multiply of 4
|
||||
*/
|
||||
ldr r3, =__zero_table_start__
|
||||
ldr r4, =__zero_table_end__
|
||||
|
||||
.L_loop2:
|
||||
cmp r3, r4
|
||||
bge .L_loop2_done
|
||||
ldr r1, [r3]
|
||||
ldr r2, [r3, #4]
|
||||
movs r0, 0
|
||||
|
||||
.L_loop2_0:
|
||||
subs r2, #4
|
||||
itt ge
|
||||
strge r0, [r1, r2]
|
||||
bge .L_loop2_0
|
||||
|
||||
adds r3, #8
|
||||
b .L_loop2
|
||||
.L_loop2_done:
|
||||
#elif defined (__STARTUP_CLEAR_BSS)
|
||||
/* Single BSS section scheme.
|
||||
*
|
||||
* The BSS section is specified by following symbols
|
||||
* __bss_start__: start of the BSS section.
|
||||
* __bss_end__: end of the BSS section.
|
||||
*
|
||||
* Both addresses must be aligned to 4 bytes boundary.
|
||||
*/
|
||||
ldr r1, =__bss_start__
|
||||
ldr r2, =__bss_end__
|
||||
|
||||
movs r0, 0
|
||||
.L_loop3:
|
||||
cmp r1, r2
|
||||
itt lt
|
||||
strlt r0, [r1], #4
|
||||
blt .L_loop3
|
||||
#endif /* __STARTUP_CLEAR_BSS_MULTIPLE || __STARTUP_CLEAR_BSS */
|
||||
|
||||
/* Update Vector Table Offset Register. */
|
||||
ldr r0, =__ramVectors
|
||||
ldr r1, =CY_CPU_VTOR_ADDR
|
||||
str r0, [r1]
|
||||
dsb 0xF
|
||||
|
||||
/* Enable the FPU if used */
|
||||
bl Cy_SystemInitFpuEnable
|
||||
|
||||
bl _start
|
||||
|
||||
/* Should never get here */
|
||||
b .
|
||||
|
||||
.pool
|
||||
.size Reset_Handler, . - Reset_Handler
|
||||
|
||||
.align 1
|
||||
.thumb_func
|
||||
.weak Default_Handler
|
||||
.type Default_Handler, %function
|
||||
|
||||
Default_Handler:
|
||||
b .
|
||||
.size Default_Handler, . - Default_Handler
|
||||
|
||||
|
||||
.weak Cy_SysLib_FaultHandler
|
||||
.type Cy_SysLib_FaultHandler, %function
|
||||
|
||||
Cy_SysLib_FaultHandler:
|
||||
b .
|
||||
.size Cy_SysLib_FaultHandler, . - Cy_SysLib_FaultHandler
|
||||
.type Fault_Handler, %function
|
||||
|
||||
Fault_Handler:
|
||||
/* Storing LR content for Creator call stack trace */
|
||||
push {LR}
|
||||
movs r0, #4
|
||||
mov r1, LR
|
||||
tst r0, r1
|
||||
beq .L_MSP
|
||||
mrs r0, PSP
|
||||
b .L_API_call
|
||||
.L_MSP:
|
||||
mrs r0, MSP
|
||||
.L_API_call:
|
||||
/* Compensation of stack pointer address due to pushing 4 bytes of LR */
|
||||
adds r0, r0, #4
|
||||
bl Cy_SysLib_FaultHandler
|
||||
b .
|
||||
.size Fault_Handler, . - Fault_Handler
|
||||
|
||||
.macro def_fault_Handler fault_handler_name
|
||||
.weak \fault_handler_name
|
||||
.set \fault_handler_name, Fault_Handler
|
||||
.endm
|
||||
|
||||
/* Macro to define default handlers. Default handler
|
||||
* will be weak symbol and just dead loops. They can be
|
||||
* overwritten by other handlers */
|
||||
.macro def_irq_handler handler_name
|
||||
.weak \handler_name
|
||||
.set \handler_name, Default_Handler
|
||||
.endm
|
||||
|
||||
def_irq_handler NMI_Handler
|
||||
|
||||
def_fault_Handler HardFault_Handler
|
||||
def_fault_Handler MemManage_Handler
|
||||
def_fault_Handler BusFault_Handler
|
||||
def_fault_Handler UsageFault_Handler
|
||||
|
||||
def_irq_handler SVC_Handler
|
||||
def_irq_handler DebugMon_Handler
|
||||
def_irq_handler PendSV_Handler
|
||||
def_irq_handler SysTick_Handler
|
||||
|
||||
def_irq_handler ioss_interrupts_gpio_0_IRQHandler /* GPIO Port Interrupt #0 */
|
||||
def_irq_handler ioss_interrupts_gpio_1_IRQHandler /* GPIO Port Interrupt #1 */
|
||||
def_irq_handler ioss_interrupts_gpio_2_IRQHandler /* GPIO Port Interrupt #2 */
|
||||
def_irq_handler ioss_interrupts_gpio_3_IRQHandler /* GPIO Port Interrupt #3 */
|
||||
def_irq_handler ioss_interrupts_gpio_4_IRQHandler /* GPIO Port Interrupt #4 */
|
||||
def_irq_handler ioss_interrupts_gpio_5_IRQHandler /* GPIO Port Interrupt #5 */
|
||||
def_irq_handler ioss_interrupts_gpio_6_IRQHandler /* GPIO Port Interrupt #6 */
|
||||
def_irq_handler ioss_interrupts_gpio_7_IRQHandler /* GPIO Port Interrupt #7 */
|
||||
def_irq_handler ioss_interrupts_gpio_8_IRQHandler /* GPIO Port Interrupt #8 */
|
||||
def_irq_handler ioss_interrupts_gpio_9_IRQHandler /* GPIO Port Interrupt #9 */
|
||||
def_irq_handler ioss_interrupts_gpio_10_IRQHandler /* GPIO Port Interrupt #10 */
|
||||
def_irq_handler ioss_interrupts_gpio_11_IRQHandler /* GPIO Port Interrupt #11 */
|
||||
def_irq_handler ioss_interrupts_gpio_12_IRQHandler /* GPIO Port Interrupt #12 */
|
||||
def_irq_handler ioss_interrupts_gpio_13_IRQHandler /* GPIO Port Interrupt #13 */
|
||||
def_irq_handler ioss_interrupts_gpio_14_IRQHandler /* GPIO Port Interrupt #14 */
|
||||
def_irq_handler ioss_interrupt_gpio_IRQHandler /* GPIO All Ports */
|
||||
def_irq_handler ioss_interrupt_vdd_IRQHandler /* GPIO Supply Detect Interrupt */
|
||||
def_irq_handler lpcomp_interrupt_IRQHandler /* Low Power Comparator Interrupt */
|
||||
def_irq_handler scb_8_interrupt_IRQHandler /* Serial Communication Block #8 (DeepSleep capable) */
|
||||
def_irq_handler srss_interrupt_mcwdt_0_IRQHandler /* Multi Counter Watchdog Timer interrupt */
|
||||
def_irq_handler srss_interrupt_mcwdt_1_IRQHandler /* Multi Counter Watchdog Timer interrupt */
|
||||
def_irq_handler srss_interrupt_backup_IRQHandler /* Backup domain interrupt */
|
||||
def_irq_handler srss_interrupt_IRQHandler /* Other combined Interrupts for SRSS (LVD, WDT, CLKCAL) */
|
||||
def_irq_handler cpuss_interrupts_ipc_0_IRQHandler /* CPUSS Inter Process Communication Interrupt #0 */
|
||||
def_irq_handler cpuss_interrupts_ipc_1_IRQHandler /* CPUSS Inter Process Communication Interrupt #1 */
|
||||
def_irq_handler cpuss_interrupts_ipc_2_IRQHandler /* CPUSS Inter Process Communication Interrupt #2 */
|
||||
def_irq_handler cpuss_interrupts_ipc_3_IRQHandler /* CPUSS Inter Process Communication Interrupt #3 */
|
||||
def_irq_handler cpuss_interrupts_ipc_4_IRQHandler /* CPUSS Inter Process Communication Interrupt #4 */
|
||||
def_irq_handler cpuss_interrupts_ipc_5_IRQHandler /* CPUSS Inter Process Communication Interrupt #5 */
|
||||
def_irq_handler cpuss_interrupts_ipc_6_IRQHandler /* CPUSS Inter Process Communication Interrupt #6 */
|
||||
def_irq_handler cpuss_interrupts_ipc_7_IRQHandler /* CPUSS Inter Process Communication Interrupt #7 */
|
||||
def_irq_handler cpuss_interrupts_ipc_8_IRQHandler /* CPUSS Inter Process Communication Interrupt #8 */
|
||||
def_irq_handler cpuss_interrupts_ipc_9_IRQHandler /* CPUSS Inter Process Communication Interrupt #9 */
|
||||
def_irq_handler cpuss_interrupts_ipc_10_IRQHandler /* CPUSS Inter Process Communication Interrupt #10 */
|
||||
def_irq_handler cpuss_interrupts_ipc_11_IRQHandler /* CPUSS Inter Process Communication Interrupt #11 */
|
||||
def_irq_handler cpuss_interrupts_ipc_12_IRQHandler /* CPUSS Inter Process Communication Interrupt #12 */
|
||||
def_irq_handler cpuss_interrupts_ipc_13_IRQHandler /* CPUSS Inter Process Communication Interrupt #13 */
|
||||
def_irq_handler cpuss_interrupts_ipc_14_IRQHandler /* CPUSS Inter Process Communication Interrupt #14 */
|
||||
def_irq_handler cpuss_interrupts_ipc_15_IRQHandler /* CPUSS Inter Process Communication Interrupt #15 */
|
||||
def_irq_handler scb_0_interrupt_IRQHandler /* Serial Communication Block #0 */
|
||||
def_irq_handler scb_1_interrupt_IRQHandler /* Serial Communication Block #1 */
|
||||
def_irq_handler scb_2_interrupt_IRQHandler /* Serial Communication Block #2 */
|
||||
def_irq_handler scb_3_interrupt_IRQHandler /* Serial Communication Block #3 */
|
||||
def_irq_handler scb_4_interrupt_IRQHandler /* Serial Communication Block #4 */
|
||||
def_irq_handler scb_5_interrupt_IRQHandler /* Serial Communication Block #5 */
|
||||
def_irq_handler scb_6_interrupt_IRQHandler /* Serial Communication Block #6 */
|
||||
def_irq_handler scb_7_interrupt_IRQHandler /* Serial Communication Block #7 */
|
||||
def_irq_handler scb_9_interrupt_IRQHandler /* Serial Communication Block #9 */
|
||||
def_irq_handler scb_10_interrupt_IRQHandler /* Serial Communication Block #10 */
|
||||
def_irq_handler scb_11_interrupt_IRQHandler /* Serial Communication Block #11 */
|
||||
def_irq_handler scb_12_interrupt_IRQHandler /* Serial Communication Block #12 */
|
||||
def_irq_handler csd_interrupt_IRQHandler /* CSD (Capsense) interrupt */
|
||||
def_irq_handler cpuss_interrupts_dmac_0_IRQHandler /* CPUSS DMAC, Channel #0 */
|
||||
def_irq_handler cpuss_interrupts_dmac_1_IRQHandler /* CPUSS DMAC, Channel #1 */
|
||||
def_irq_handler cpuss_interrupts_dmac_2_IRQHandler /* CPUSS DMAC, Channel #2 */
|
||||
def_irq_handler cpuss_interrupts_dmac_3_IRQHandler /* CPUSS DMAC, Channel #3 */
|
||||
def_irq_handler cpuss_interrupts_dw0_0_IRQHandler /* CPUSS DataWire #0, Channel #0 */
|
||||
def_irq_handler cpuss_interrupts_dw0_1_IRQHandler /* CPUSS DataWire #0, Channel #1 */
|
||||
def_irq_handler cpuss_interrupts_dw0_2_IRQHandler /* CPUSS DataWire #0, Channel #2 */
|
||||
def_irq_handler cpuss_interrupts_dw0_3_IRQHandler /* CPUSS DataWire #0, Channel #3 */
|
||||
def_irq_handler cpuss_interrupts_dw0_4_IRQHandler /* CPUSS DataWire #0, Channel #4 */
|
||||
def_irq_handler cpuss_interrupts_dw0_5_IRQHandler /* CPUSS DataWire #0, Channel #5 */
|
||||
def_irq_handler cpuss_interrupts_dw0_6_IRQHandler /* CPUSS DataWire #0, Channel #6 */
|
||||
def_irq_handler cpuss_interrupts_dw0_7_IRQHandler /* CPUSS DataWire #0, Channel #7 */
|
||||
def_irq_handler cpuss_interrupts_dw0_8_IRQHandler /* CPUSS DataWire #0, Channel #8 */
|
||||
def_irq_handler cpuss_interrupts_dw0_9_IRQHandler /* CPUSS DataWire #0, Channel #9 */
|
||||
def_irq_handler cpuss_interrupts_dw0_10_IRQHandler /* CPUSS DataWire #0, Channel #10 */
|
||||
def_irq_handler cpuss_interrupts_dw0_11_IRQHandler /* CPUSS DataWire #0, Channel #11 */
|
||||
def_irq_handler cpuss_interrupts_dw0_12_IRQHandler /* CPUSS DataWire #0, Channel #12 */
|
||||
def_irq_handler cpuss_interrupts_dw0_13_IRQHandler /* CPUSS DataWire #0, Channel #13 */
|
||||
def_irq_handler cpuss_interrupts_dw0_14_IRQHandler /* CPUSS DataWire #0, Channel #14 */
|
||||
def_irq_handler cpuss_interrupts_dw0_15_IRQHandler /* CPUSS DataWire #0, Channel #15 */
|
||||
def_irq_handler cpuss_interrupts_dw0_16_IRQHandler /* CPUSS DataWire #0, Channel #16 */
|
||||
def_irq_handler cpuss_interrupts_dw0_17_IRQHandler /* CPUSS DataWire #0, Channel #17 */
|
||||
def_irq_handler cpuss_interrupts_dw0_18_IRQHandler /* CPUSS DataWire #0, Channel #18 */
|
||||
def_irq_handler cpuss_interrupts_dw0_19_IRQHandler /* CPUSS DataWire #0, Channel #19 */
|
||||
def_irq_handler cpuss_interrupts_dw0_20_IRQHandler /* CPUSS DataWire #0, Channel #20 */
|
||||
def_irq_handler cpuss_interrupts_dw0_21_IRQHandler /* CPUSS DataWire #0, Channel #21 */
|
||||
def_irq_handler cpuss_interrupts_dw0_22_IRQHandler /* CPUSS DataWire #0, Channel #22 */
|
||||
def_irq_handler cpuss_interrupts_dw0_23_IRQHandler /* CPUSS DataWire #0, Channel #23 */
|
||||
def_irq_handler cpuss_interrupts_dw0_24_IRQHandler /* CPUSS DataWire #0, Channel #24 */
|
||||
def_irq_handler cpuss_interrupts_dw0_25_IRQHandler /* CPUSS DataWire #0, Channel #25 */
|
||||
def_irq_handler cpuss_interrupts_dw0_26_IRQHandler /* CPUSS DataWire #0, Channel #26 */
|
||||
def_irq_handler cpuss_interrupts_dw0_27_IRQHandler /* CPUSS DataWire #0, Channel #27 */
|
||||
def_irq_handler cpuss_interrupts_dw0_28_IRQHandler /* CPUSS DataWire #0, Channel #28 */
|
||||
def_irq_handler cpuss_interrupts_dw1_0_IRQHandler /* CPUSS DataWire #1, Channel #0 */
|
||||
def_irq_handler cpuss_interrupts_dw1_1_IRQHandler /* CPUSS DataWire #1, Channel #1 */
|
||||
def_irq_handler cpuss_interrupts_dw1_2_IRQHandler /* CPUSS DataWire #1, Channel #2 */
|
||||
def_irq_handler cpuss_interrupts_dw1_3_IRQHandler /* CPUSS DataWire #1, Channel #3 */
|
||||
def_irq_handler cpuss_interrupts_dw1_4_IRQHandler /* CPUSS DataWire #1, Channel #4 */
|
||||
def_irq_handler cpuss_interrupts_dw1_5_IRQHandler /* CPUSS DataWire #1, Channel #5 */
|
||||
def_irq_handler cpuss_interrupts_dw1_6_IRQHandler /* CPUSS DataWire #1, Channel #6 */
|
||||
def_irq_handler cpuss_interrupts_dw1_7_IRQHandler /* CPUSS DataWire #1, Channel #7 */
|
||||
def_irq_handler cpuss_interrupts_dw1_8_IRQHandler /* CPUSS DataWire #1, Channel #8 */
|
||||
def_irq_handler cpuss_interrupts_dw1_9_IRQHandler /* CPUSS DataWire #1, Channel #9 */
|
||||
def_irq_handler cpuss_interrupts_dw1_10_IRQHandler /* CPUSS DataWire #1, Channel #10 */
|
||||
def_irq_handler cpuss_interrupts_dw1_11_IRQHandler /* CPUSS DataWire #1, Channel #11 */
|
||||
def_irq_handler cpuss_interrupts_dw1_12_IRQHandler /* CPUSS DataWire #1, Channel #12 */
|
||||
def_irq_handler cpuss_interrupts_dw1_13_IRQHandler /* CPUSS DataWire #1, Channel #13 */
|
||||
def_irq_handler cpuss_interrupts_dw1_14_IRQHandler /* CPUSS DataWire #1, Channel #14 */
|
||||
def_irq_handler cpuss_interrupts_dw1_15_IRQHandler /* CPUSS DataWire #1, Channel #15 */
|
||||
def_irq_handler cpuss_interrupts_dw1_16_IRQHandler /* CPUSS DataWire #1, Channel #16 */
|
||||
def_irq_handler cpuss_interrupts_dw1_17_IRQHandler /* CPUSS DataWire #1, Channel #17 */
|
||||
def_irq_handler cpuss_interrupts_dw1_18_IRQHandler /* CPUSS DataWire #1, Channel #18 */
|
||||
def_irq_handler cpuss_interrupts_dw1_19_IRQHandler /* CPUSS DataWire #1, Channel #19 */
|
||||
def_irq_handler cpuss_interrupts_dw1_20_IRQHandler /* CPUSS DataWire #1, Channel #20 */
|
||||
def_irq_handler cpuss_interrupts_dw1_21_IRQHandler /* CPUSS DataWire #1, Channel #21 */
|
||||
def_irq_handler cpuss_interrupts_dw1_22_IRQHandler /* CPUSS DataWire #1, Channel #22 */
|
||||
def_irq_handler cpuss_interrupts_dw1_23_IRQHandler /* CPUSS DataWire #1, Channel #23 */
|
||||
def_irq_handler cpuss_interrupts_dw1_24_IRQHandler /* CPUSS DataWire #1, Channel #24 */
|
||||
def_irq_handler cpuss_interrupts_dw1_25_IRQHandler /* CPUSS DataWire #1, Channel #25 */
|
||||
def_irq_handler cpuss_interrupts_dw1_26_IRQHandler /* CPUSS DataWire #1, Channel #26 */
|
||||
def_irq_handler cpuss_interrupts_dw1_27_IRQHandler /* CPUSS DataWire #1, Channel #27 */
|
||||
def_irq_handler cpuss_interrupts_dw1_28_IRQHandler /* CPUSS DataWire #1, Channel #28 */
|
||||
def_irq_handler cpuss_interrupts_fault_0_IRQHandler /* CPUSS Fault Structure Interrupt #0 */
|
||||
def_irq_handler cpuss_interrupts_fault_1_IRQHandler /* CPUSS Fault Structure Interrupt #1 */
|
||||
def_irq_handler cpuss_interrupt_crypto_IRQHandler /* CRYPTO Accelerator Interrupt */
|
||||
def_irq_handler cpuss_interrupt_fm_IRQHandler /* FLASH Macro Interrupt */
|
||||
def_irq_handler cpuss_interrupts_cm4_fp_IRQHandler /* Floating Point operation fault */
|
||||
def_irq_handler cpuss_interrupts_cm0_cti_0_IRQHandler /* CM0+ CTI #0 */
|
||||
def_irq_handler cpuss_interrupts_cm0_cti_1_IRQHandler /* CM0+ CTI #1 */
|
||||
def_irq_handler cpuss_interrupts_cm4_cti_0_IRQHandler /* CM4 CTI #0 */
|
||||
def_irq_handler cpuss_interrupts_cm4_cti_1_IRQHandler /* CM4 CTI #1 */
|
||||
def_irq_handler tcpwm_0_interrupts_0_IRQHandler /* TCPWM #0, Counter #0 */
|
||||
def_irq_handler tcpwm_0_interrupts_1_IRQHandler /* TCPWM #0, Counter #1 */
|
||||
def_irq_handler tcpwm_0_interrupts_2_IRQHandler /* TCPWM #0, Counter #2 */
|
||||
def_irq_handler tcpwm_0_interrupts_3_IRQHandler /* TCPWM #0, Counter #3 */
|
||||
def_irq_handler tcpwm_0_interrupts_4_IRQHandler /* TCPWM #0, Counter #4 */
|
||||
def_irq_handler tcpwm_0_interrupts_5_IRQHandler /* TCPWM #0, Counter #5 */
|
||||
def_irq_handler tcpwm_0_interrupts_6_IRQHandler /* TCPWM #0, Counter #6 */
|
||||
def_irq_handler tcpwm_0_interrupts_7_IRQHandler /* TCPWM #0, Counter #7 */
|
||||
def_irq_handler tcpwm_1_interrupts_0_IRQHandler /* TCPWM #1, Counter #0 */
|
||||
def_irq_handler tcpwm_1_interrupts_1_IRQHandler /* TCPWM #1, Counter #1 */
|
||||
def_irq_handler tcpwm_1_interrupts_2_IRQHandler /* TCPWM #1, Counter #2 */
|
||||
def_irq_handler tcpwm_1_interrupts_3_IRQHandler /* TCPWM #1, Counter #3 */
|
||||
def_irq_handler tcpwm_1_interrupts_4_IRQHandler /* TCPWM #1, Counter #4 */
|
||||
def_irq_handler tcpwm_1_interrupts_5_IRQHandler /* TCPWM #1, Counter #5 */
|
||||
def_irq_handler tcpwm_1_interrupts_6_IRQHandler /* TCPWM #1, Counter #6 */
|
||||
def_irq_handler tcpwm_1_interrupts_7_IRQHandler /* TCPWM #1, Counter #7 */
|
||||
def_irq_handler tcpwm_1_interrupts_8_IRQHandler /* TCPWM #1, Counter #8 */
|
||||
def_irq_handler tcpwm_1_interrupts_9_IRQHandler /* TCPWM #1, Counter #9 */
|
||||
def_irq_handler tcpwm_1_interrupts_10_IRQHandler /* TCPWM #1, Counter #10 */
|
||||
def_irq_handler tcpwm_1_interrupts_11_IRQHandler /* TCPWM #1, Counter #11 */
|
||||
def_irq_handler tcpwm_1_interrupts_12_IRQHandler /* TCPWM #1, Counter #12 */
|
||||
def_irq_handler tcpwm_1_interrupts_13_IRQHandler /* TCPWM #1, Counter #13 */
|
||||
def_irq_handler tcpwm_1_interrupts_14_IRQHandler /* TCPWM #1, Counter #14 */
|
||||
def_irq_handler tcpwm_1_interrupts_15_IRQHandler /* TCPWM #1, Counter #15 */
|
||||
def_irq_handler tcpwm_1_interrupts_16_IRQHandler /* TCPWM #1, Counter #16 */
|
||||
def_irq_handler tcpwm_1_interrupts_17_IRQHandler /* TCPWM #1, Counter #17 */
|
||||
def_irq_handler tcpwm_1_interrupts_18_IRQHandler /* TCPWM #1, Counter #18 */
|
||||
def_irq_handler tcpwm_1_interrupts_19_IRQHandler /* TCPWM #1, Counter #19 */
|
||||
def_irq_handler tcpwm_1_interrupts_20_IRQHandler /* TCPWM #1, Counter #20 */
|
||||
def_irq_handler tcpwm_1_interrupts_21_IRQHandler /* TCPWM #1, Counter #21 */
|
||||
def_irq_handler tcpwm_1_interrupts_22_IRQHandler /* TCPWM #1, Counter #22 */
|
||||
def_irq_handler tcpwm_1_interrupts_23_IRQHandler /* TCPWM #1, Counter #23 */
|
||||
def_irq_handler pass_interrupt_sar_IRQHandler /* SAR ADC interrupt */
|
||||
def_irq_handler audioss_0_interrupt_i2s_IRQHandler /* I2S0 Audio interrupt */
|
||||
def_irq_handler audioss_0_interrupt_pdm_IRQHandler /* PDM0/PCM0 Audio interrupt */
|
||||
def_irq_handler audioss_1_interrupt_i2s_IRQHandler /* I2S1 Audio interrupt */
|
||||
def_irq_handler profile_interrupt_IRQHandler /* Energy Profiler interrupt */
|
||||
def_irq_handler smif_interrupt_IRQHandler /* Serial Memory Interface interrupt */
|
||||
def_irq_handler usb_interrupt_hi_IRQHandler /* USB Interrupt */
|
||||
def_irq_handler usb_interrupt_med_IRQHandler /* USB Interrupt */
|
||||
def_irq_handler usb_interrupt_lo_IRQHandler /* USB Interrupt */
|
||||
def_irq_handler sdhc_0_interrupt_wakeup_IRQHandler /* SDIO wakeup interrupt for mxsdhc */
|
||||
def_irq_handler sdhc_0_interrupt_general_IRQHandler /* Consolidated interrupt for mxsdhc for everything else */
|
||||
def_irq_handler sdhc_1_interrupt_wakeup_IRQHandler /* EEMC wakeup interrupt for mxsdhc, not used */
|
||||
def_irq_handler sdhc_1_interrupt_general_IRQHandler /* Consolidated interrupt for mxsdhc for everything else */
|
||||
|
||||
.end
|
||||
|
||||
|
||||
/* [] END OF FILE */
|
|
@ -1,278 +0,0 @@
|
|||
/***************************************************************************//**
|
||||
* \file cy8c6xxa_cm4_dual.icf
|
||||
* \version 2.40
|
||||
*
|
||||
* Linker file for the IAR compiler.
|
||||
*
|
||||
* The main purpose of the linker script is to describe how the sections in the
|
||||
* input files should be mapped into the output file, and to control the memory
|
||||
* layout of the output file.
|
||||
*
|
||||
* \note The entry point is fixed and starts at 0x10000000. The valid application
|
||||
* image should be placed there.
|
||||
*
|
||||
* \note The linker files included with the PDL template projects must be generic
|
||||
* and handle all common use cases. Your project may not use every section
|
||||
* defined in the linker files. In that case you may see warnings during the
|
||||
* build process. In your project, you can simply comment out or remove the
|
||||
* relevant code in the linker file.
|
||||
*
|
||||
********************************************************************************
|
||||
* \copyright
|
||||
* Copyright 2016-2019 Cypress Semiconductor Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
|
||||
/*###ICF### Section handled by ICF editor, don't touch! ****/
|
||||
/*-Editor annotation file-*/
|
||||
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_4.xml" */
|
||||
/*-Specials-*/
|
||||
define symbol __ICFEDIT_intvec_start__ = 0x00000000;
|
||||
|
||||
if (!isdefinedsymbol(MBED_ROM_START)) {
|
||||
define symbol MBED_ROM_START = 0x10000000;
|
||||
}
|
||||
|
||||
/* MBED_APP_START is being used by the bootloader build script and
|
||||
* will be calculate by the system. Without bootloader the MBED_APP_START
|
||||
* is equal to MBED_ROM_START
|
||||
*/
|
||||
if (!isdefinedsymbol(MBED_APP_START)) {
|
||||
define symbol MBED_APP_START = MBED_ROM_START;
|
||||
}
|
||||
|
||||
if (!isdefinedsymbol(MBED_ROM_SIZE)) {
|
||||
define symbol MBED_ROM_SIZE = 0x00200000;
|
||||
}
|
||||
|
||||
/* MBED_APP_SIZE is being used by the bootloader build script and
|
||||
* will be calculate by the system. Without bootloader the MBED_APP_SIZE
|
||||
* is equal to MBED_ROM_SIZE
|
||||
*/
|
||||
if (!isdefinedsymbol(MBED_APP_SIZE)) {
|
||||
define symbol MBED_APP_SIZE = MBED_ROM_SIZE;
|
||||
}
|
||||
|
||||
if (!isdefinedsymbol(MBED_RAM_START)) {
|
||||
define symbol MBED_RAM_START = 0x08002000;
|
||||
}
|
||||
|
||||
if (!isdefinedsymbol(MBED_RAM_SIZE)) {
|
||||
define symbol MBED_RAM_SIZE = 0x000FD800;
|
||||
}
|
||||
|
||||
if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) {
|
||||
define symbol MBED_BOOT_STACK_SIZE = 0x400;
|
||||
}
|
||||
|
||||
/* The symbols below define the location and size of blocks of memory in the target.
|
||||
* Use these symbols to specify the memory regions available for allocation.
|
||||
*/
|
||||
|
||||
/* The following symbols control RAM and flash memory allocation for the CM4 core.
|
||||
* You can change the memory allocation by editing RAM and Flash symbols.
|
||||
* Note that 2 KB of RAM (at the end of the SRAM) are reserved for system use.
|
||||
* Using this memory region for other purposes will lead to unexpected behavior.
|
||||
* Your changes must be aligned with the corresponding symbols for CM0+ core in 'xx_cm0plus.icf',
|
||||
* where 'xx' is the device group; for example, 'cy8c6xx7_cm0plus.icf'.
|
||||
*/
|
||||
/* RAM */
|
||||
define symbol __ICFEDIT_region_IRAM1_start__ = MBED_RAM_START;
|
||||
define symbol __ICFEDIT_region_IRAM1_end__ = (MBED_RAM_START + MBED_RAM_SIZE);
|
||||
/* Flash */
|
||||
define symbol __ICFEDIT_region_IROM1_start__ = MBED_APP_START;
|
||||
define symbol __ICFEDIT_region_IROM1_end__ = (MBED_APP_START + MBED_APP_SIZE);
|
||||
|
||||
/* The following symbols define a 32K flash region used for EEPROM emulation.
|
||||
* This region can also be used as the general purpose flash.
|
||||
* You can assign sections to this memory region for only one of the cores.
|
||||
* Note some middleware (e.g. BLE, Emulated EEPROM) can place their data into this memory region.
|
||||
* Therefore, repurposing this memory region will prevent such middleware from operation.
|
||||
*/
|
||||
define symbol __ICFEDIT_region_IROM2_start__ = 0x14000000;
|
||||
define symbol __ICFEDIT_region_IROM2_end__ = 0x14007FFF;
|
||||
|
||||
/* The following symbols define device specific memory regions and must not be changed. */
|
||||
/* Supervisory FLASH - User Data */
|
||||
define symbol __ICFEDIT_region_IROM3_start__ = 0x16000800;
|
||||
define symbol __ICFEDIT_region_IROM3_end__ = 0x160007FF;
|
||||
|
||||
/* Supervisory FLASH - Normal Access Restrictions (NAR) */
|
||||
define symbol __ICFEDIT_region_IROM4_start__ = 0x16001A00;
|
||||
define symbol __ICFEDIT_region_IROM4_end__ = 0x16001BFF;
|
||||
|
||||
/* Supervisory FLASH - Public Key */
|
||||
define symbol __ICFEDIT_region_IROM5_start__ = 0x16005A00;
|
||||
define symbol __ICFEDIT_region_IROM5_end__ = 0x160065FF;
|
||||
|
||||
/* Supervisory FLASH - Table of Content # 2 */
|
||||
define symbol __ICFEDIT_region_IROM6_start__ = 0x16007C00;
|
||||
define symbol __ICFEDIT_region_IROM6_end__ = 0x16007DFF;
|
||||
|
||||
/* Supervisory FLASH - Table of Content # 2 Copy */
|
||||
define symbol __ICFEDIT_region_IROM7_start__ = 0x16007E00;
|
||||
define symbol __ICFEDIT_region_IROM7_end__ = 0x16007FFF;
|
||||
|
||||
/* eFuse */
|
||||
define symbol __ICFEDIT_region_IROM8_start__ = 0x90700000;
|
||||
define symbol __ICFEDIT_region_IROM8_end__ = 0x907FFFFF;
|
||||
|
||||
/* XIP */
|
||||
define symbol __ICFEDIT_region_EROM1_start__ = 0x18000000;
|
||||
define symbol __ICFEDIT_region_EROM1_end__ = 0x1FFFFFFF;
|
||||
|
||||
define symbol __ICFEDIT_region_EROM2_start__ = 0x0;
|
||||
define symbol __ICFEDIT_region_EROM2_end__ = 0x0;
|
||||
define symbol __ICFEDIT_region_EROM3_start__ = 0x0;
|
||||
define symbol __ICFEDIT_region_EROM3_end__ = 0x0;
|
||||
|
||||
|
||||
define symbol __ICFEDIT_region_IRAM2_start__ = 0x0;
|
||||
define symbol __ICFEDIT_region_IRAM2_end__ = 0x0;
|
||||
define symbol __ICFEDIT_region_ERAM1_start__ = 0x0;
|
||||
define symbol __ICFEDIT_region_ERAM1_end__ = 0x0;
|
||||
define symbol __ICFEDIT_region_ERAM2_start__ = 0x0;
|
||||
define symbol __ICFEDIT_region_ERAM2_end__ = 0x0;
|
||||
define symbol __ICFEDIT_region_ERAM3_start__ = 0x0;
|
||||
define symbol __ICFEDIT_region_ERAM3_end__ = 0x0;
|
||||
/*-Sizes-*/
|
||||
if (!isdefinedsymbol(__STACK_SIZE)) {
|
||||
define symbol __ICFEDIT_size_cstack__ = MBED_BOOT_STACK_SIZE;
|
||||
} else {
|
||||
define symbol __ICFEDIT_size_cstack__ = __STACK_SIZE;
|
||||
}
|
||||
|
||||
if (!isdefinedsymbol(__HEAP_SIZE)) {
|
||||
define symbol __ICFEDIT_size_heap__ = 0x20000;
|
||||
} else {
|
||||
define symbol __ICFEDIT_size_heap__ = __HEAP_SIZE;
|
||||
}
|
||||
/**** End of ICF editor section. ###ICF###*/
|
||||
|
||||
/* Size of the Cortex-M0+ application image */
|
||||
define symbol FLASH_CM0P_SIZE = 0x2000;
|
||||
|
||||
define memory mem with size = 4G;
|
||||
define region IROM1_region = mem:[from __ICFEDIT_region_IROM1_start__ to __ICFEDIT_region_IROM1_end__];
|
||||
define region IROM2_region = mem:[from __ICFEDIT_region_IROM2_start__ to __ICFEDIT_region_IROM2_end__];
|
||||
define region IROM3_region = mem:[from __ICFEDIT_region_IROM3_start__ to __ICFEDIT_region_IROM3_end__];
|
||||
define region IROM4_region = mem:[from __ICFEDIT_region_IROM4_start__ to __ICFEDIT_region_IROM4_end__];
|
||||
define region IROM5_region = mem:[from __ICFEDIT_region_IROM5_start__ to __ICFEDIT_region_IROM5_end__];
|
||||
define region IROM6_region = mem:[from __ICFEDIT_region_IROM6_start__ to __ICFEDIT_region_IROM6_end__];
|
||||
define region IROM7_region = mem:[from __ICFEDIT_region_IROM7_start__ to __ICFEDIT_region_IROM7_end__];
|
||||
define region IROM8_region = mem:[from __ICFEDIT_region_IROM8_start__ to __ICFEDIT_region_IROM8_end__];
|
||||
define region EROM1_region = mem:[from __ICFEDIT_region_EROM1_start__ to __ICFEDIT_region_EROM1_end__];
|
||||
define region IRAM1_region = mem:[from __ICFEDIT_region_IRAM1_start__ to __ICFEDIT_region_IRAM1_end__];
|
||||
|
||||
define block RAM_DATA {readwrite section .data};
|
||||
define block RAM_OTHER {readwrite section * };
|
||||
define block RAM_NOINIT {readwrite section .noinit};
|
||||
define block RAM_BSS {readwrite section .bss};
|
||||
define block RAM with fixed order {block RAM_DATA, block RAM_OTHER, block RAM_NOINIT, block RAM_BSS};
|
||||
|
||||
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
|
||||
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
|
||||
|
||||
define block CM0P_RO with size = FLASH_CM0P_SIZE { readonly section .cy_m0p_image };
|
||||
define block RO {first section .intvec, readonly};
|
||||
|
||||
/*-Initializations-*/
|
||||
initialize by copy { readwrite };
|
||||
do not initialize { section .noinit, section .intvec_ram };
|
||||
|
||||
/*-Placement-*/
|
||||
|
||||
/* Flash - Cortex-M0+ application image */
|
||||
place at start of IROM1_region { block CM0P_RO };
|
||||
|
||||
/* Flash - Cortex-M4 application image */
|
||||
place in IROM1_region { block RO };
|
||||
".cy_app_signature" : place at address (__ICFEDIT_region_IROM1_end__ - 0x200) { section .cy_app_signature };
|
||||
|
||||
/* Emulated EEPROM Flash area */
|
||||
".cy_em_eeprom" : place at start of IROM2_region { section .cy_em_eeprom };
|
||||
|
||||
/* Supervisory Flash - User Data */
|
||||
".cy_sflash_user_data" : place at start of IROM3_region { section .cy_sflash_user_data };
|
||||
|
||||
/* Supervisory Flash - NAR */
|
||||
".cy_sflash_nar" : place at start of IROM4_region { section .cy_sflash_nar };
|
||||
|
||||
/* Supervisory Flash - Public Key */
|
||||
".cy_sflash_public_key" : place at start of IROM5_region { section .cy_sflash_public_key };
|
||||
|
||||
/* Supervisory Flash - TOC2 */
|
||||
".cy_toc_part2" : place at start of IROM6_region { section .cy_toc_part2 };
|
||||
|
||||
/* Supervisory Flash - RTOC2 */
|
||||
".cy_rtoc_part2" : place at start of IROM7_region { section .cy_rtoc_part2 };
|
||||
|
||||
/* eFuse */
|
||||
".cy_efuse" : place at start of IROM8_region { section .cy_efuse };
|
||||
|
||||
/* Execute in Place (XIP). See the smif driver documentation for details. */
|
||||
".cy_xip" : place at start of EROM1_region { section .cy_xip };
|
||||
|
||||
/* RAM */
|
||||
place at start of IRAM1_region { readwrite section .intvec_ram};
|
||||
place in IRAM1_region { block RAM};
|
||||
place in IRAM1_region { block HEAP};
|
||||
place at end of IRAM1_region { block CSTACK };
|
||||
|
||||
/* These sections are used for additional metadata (silicon revision, Silicon/JTAG ID, etc.) storage. */
|
||||
".cymeta" : place at address mem : 0x90500000 { readonly section .cymeta };
|
||||
|
||||
|
||||
keep { section .cy_m0p_image,
|
||||
section .cy_app_signature,
|
||||
section .cy_em_eeprom,
|
||||
section .cy_sflash_user_data,
|
||||
section .cy_sflash_nar,
|
||||
section .cy_sflash_public_key,
|
||||
section .cy_toc_part2,
|
||||
section .cy_rtoc_part2,
|
||||
section .cy_efuse,
|
||||
section .cy_xip,
|
||||
section .cymeta,
|
||||
};
|
||||
|
||||
|
||||
/* The following symbols used by the cymcuelftool. */
|
||||
/* Flash */
|
||||
define exported symbol __cy_memory_0_start = 0x10000000;
|
||||
define exported symbol __cy_memory_0_length = 0x00200000;
|
||||
define exported symbol __cy_memory_0_row_size = 0x200;
|
||||
|
||||
/* Emulated EEPROM Flash area */
|
||||
define exported symbol __cy_memory_1_start = 0x14000000;
|
||||
define exported symbol __cy_memory_1_length = 0x8000;
|
||||
define exported symbol __cy_memory_1_row_size = 0x200;
|
||||
|
||||
/* Supervisory Flash */
|
||||
define exported symbol __cy_memory_2_start = 0x16000000;
|
||||
define exported symbol __cy_memory_2_length = 0x8000;
|
||||
define exported symbol __cy_memory_2_row_size = 0x200;
|
||||
|
||||
/* XIP */
|
||||
define exported symbol __cy_memory_3_start = 0x18000000;
|
||||
define exported symbol __cy_memory_3_length = 0x08000000;
|
||||
define exported symbol __cy_memory_3_row_size = 0x200;
|
||||
|
||||
/* eFuse */
|
||||
define exported symbol __cy_memory_4_start = 0x90700000;
|
||||
define exported symbol __cy_memory_4_length = 0x100000;
|
||||
define exported symbol __cy_memory_4_row_size = 1;
|
||||
|
||||
/* EOF */
|
File diff suppressed because it is too large
Load Diff
|
@ -1,670 +0,0 @@
|
|||
/***************************************************************************//**
|
||||
* \file system_psoc6.h
|
||||
* \version 2.40
|
||||
*
|
||||
* \brief Device system header file.
|
||||
*
|
||||
********************************************************************************
|
||||
* \copyright
|
||||
* Copyright 2016-2019 Cypress Semiconductor Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
|
||||
|
||||
#ifndef _SYSTEM_PSOC6_H_
|
||||
#define _SYSTEM_PSOC6_H_
|
||||
|
||||
/**
|
||||
* \addtogroup group_system_config
|
||||
* \{
|
||||
* Provides device startup, system configuration, and linker script files.
|
||||
* The system startup provides the followings features:
|
||||
* - See \ref group_system_config_device_initialization for the:
|
||||
* * \ref group_system_config_dual_core_device_initialization
|
||||
* * \ref group_system_config_single_core_device_initialization
|
||||
* - \ref group_system_config_device_memory_definition
|
||||
* - \ref group_system_config_heap_stack_config
|
||||
* - \ref group_system_config_merge_apps
|
||||
* - \ref group_system_config_default_handlers
|
||||
* - \ref group_system_config_device_vector_table
|
||||
* - \ref group_system_config_cm4_functions
|
||||
*
|
||||
* \section group_system_config_configuration Configuration Considerations
|
||||
*
|
||||
* \subsection group_system_config_device_memory_definition Device Memory Definition
|
||||
* The flash and RAM allocation for each CPU is defined by the linker scripts.
|
||||
* For dual-core devices, the physical flash and RAM memory is shared between the CPU cores.
|
||||
* 2 KB of RAM (allocated at the end of RAM) are reserved for system use.
|
||||
* For Single-Core devices the system reserves additional 80 bytes of RAM.
|
||||
* Using the reserved memory area for other purposes will lead to unexpected behavior.
|
||||
*
|
||||
* \note The linker files provided with the PDL are generic and handle all common
|
||||
* use cases. Your project may not use every section defined in the linker files.
|
||||
* In that case you may see warnings during the build process. To eliminate build
|
||||
* warnings in your project, you can simply comment out or remove the relevant
|
||||
* code in the linker file.
|
||||
*
|
||||
* <b>ARM GCC</b>\n
|
||||
* The flash and RAM sections for the CPU are defined in the linker files:
|
||||
* 'xx_yy.ld', where 'xx' is the device group, and 'yy' is the target CPU; for example,
|
||||
* 'cy8c6xx7_cm0plus.ld' and 'cy8c6xx7_cm4_dual.ld'.
|
||||
* \note If the start of the Cortex-M4 application image is changed, the value
|
||||
* of the of the \ref CY_CORTEX_M4_APPL_ADDR should also be changed. The
|
||||
* \ref CY_CORTEX_M4_APPL_ADDR macro should be used as the parameter for the
|
||||
* Cy_SysEnableCM4() function call.
|
||||
*
|
||||
* Change the flash and RAM sizes by editing the macros value in the
|
||||
* linker files for both CPUs:
|
||||
* - 'xx_cm0plus.ld', where 'xx' is the device group:
|
||||
* \code
|
||||
* flash (rx) : ORIGIN = 0x10000000, LENGTH = 0x00080000
|
||||
* ram (rwx) : ORIGIN = 0x08000000, LENGTH = 0x00024000
|
||||
* \endcode
|
||||
* - 'xx_cm4_dual.ld', where 'xx' is the device group:
|
||||
* \code
|
||||
* flash (rx) : ORIGIN = 0x10080000, LENGTH = 0x00080000
|
||||
* ram (rwx) : ORIGIN = 0x08024000, LENGTH = 0x00023800
|
||||
* \endcode
|
||||
*
|
||||
* Change the value of the \ref CY_CORTEX_M4_APPL_ADDR macro to the rom ORIGIN's
|
||||
* value in the 'xx_cm4_dual.ld' file, where 'xx' is the device group. Do this
|
||||
* by either:
|
||||
* - Passing the following commands to the compiler:\n
|
||||
* \code -D CY_CORTEX_M4_APPL_ADDR=0x10080000 \endcode
|
||||
* - Editing the \ref CY_CORTEX_M4_APPL_ADDR value in the 'system_xx.h', where 'xx' is device family:\n
|
||||
* \code #define CY_CORTEX_M4_APPL_ADDR (0x10080000u) \endcode
|
||||
*
|
||||
* <b>ARM MDK</b>\n
|
||||
* The flash and RAM sections for the CPU are defined in the linker files:
|
||||
* 'xx_yy.scat', where 'xx' is the device group, and 'yy' is the target CPU; for example,
|
||||
* 'cy8c6xx7_cm0plus.scat' and 'cy8c6xx7_cm4_dual.scat'.
|
||||
* \note If the start of the Cortex-M4 application image is changed, the value
|
||||
* of the of the \ref CY_CORTEX_M4_APPL_ADDR should also be changed. The
|
||||
* \ref CY_CORTEX_M4_APPL_ADDR macro should be used as the parameter for the \ref
|
||||
* Cy_SysEnableCM4() function call.
|
||||
*
|
||||
* \note The linker files provided with the PDL are generic and handle all common
|
||||
* use cases. Your project may not use every section defined in the linker files.
|
||||
* In that case you may see the warnings during the build process:
|
||||
* L6314W (no section matches pattern) and/or L6329W
|
||||
* (pattern only matches removed unused sections). In your project, you can
|
||||
* suppress the warning by passing the "--diag_suppress=L6314W,L6329W" option to
|
||||
* the linker. You can also comment out or remove the relevant code in the linker
|
||||
* file.
|
||||
*
|
||||
* Change the flash and RAM sizes by editing the macros value in the
|
||||
* linker files for both CPUs:
|
||||
* - 'xx_cm0plus.scat', where 'xx' is the device group:
|
||||
* \code
|
||||
* #define FLASH_START 0x10000000
|
||||
* #define FLASH_SIZE 0x00080000
|
||||
* #define RAM_START 0x08000000
|
||||
* #define RAM_SIZE 0x00024000
|
||||
* \endcode
|
||||
* - 'xx_cm4_dual.scat', where 'xx' is the device group:
|
||||
* \code
|
||||
* #define FLASH_START 0x10080000
|
||||
* #define FLASH_SIZE 0x00080000
|
||||
* #define RAM_START 0x08024000
|
||||
* #define RAM_SIZE 0x00023800
|
||||
* \endcode
|
||||
*
|
||||
* Change the value of the \ref CY_CORTEX_M4_APPL_ADDR macro to the FLASH_START
|
||||
* value in the 'xx_cm4_dual.scat' file,
|
||||
* where 'xx' is the device group. Do this by either:
|
||||
* - Passing the following commands to the compiler:\n
|
||||
* \code -D CY_CORTEX_M4_APPL_ADDR=0x10080000 \endcode
|
||||
* - Editing the \ref CY_CORTEX_M4_APPL_ADDR value in the 'system_xx.h', where
|
||||
* 'xx' is device family:\n
|
||||
* \code #define CY_CORTEX_M4_APPL_ADDR (0x10080000u) \endcode
|
||||
*
|
||||
* <b>IAR</b>\n
|
||||
* The flash and RAM sections for the CPU are defined in the linker files:
|
||||
* 'xx_yy.icf', where 'xx' is the device group, and 'yy' is the target CPU; for example,
|
||||
* 'cy8c6xx7_cm0plus.icf' and 'cy8c6xx7_cm4_dual.icf'.
|
||||
* \note If the start of the Cortex-M4 application image is changed, the value
|
||||
* of the of the \ref CY_CORTEX_M4_APPL_ADDR should also be changed. The
|
||||
* \ref CY_CORTEX_M4_APPL_ADDR macro should be used as the parameter for the \ref
|
||||
* Cy_SysEnableCM4() function call.
|
||||
*
|
||||
* Change the flash and RAM sizes by editing the macros value in the
|
||||
* linker files for both CPUs:
|
||||
* - 'xx_cm0plus.icf', where 'xx' is the device group:
|
||||
* \code
|
||||
* define symbol __ICFEDIT_region_IROM1_start__ = 0x10000000;
|
||||
* define symbol __ICFEDIT_region_IROM1_end__ = 0x10080000;
|
||||
* define symbol __ICFEDIT_region_IRAM1_start__ = 0x08000000;
|
||||
* define symbol __ICFEDIT_region_IRAM1_end__ = 0x08024000;
|
||||
* \endcode
|
||||
* - 'xx_cm4_dual.icf', where 'xx' is the device group:
|
||||
* \code
|
||||
* define symbol __ICFEDIT_region_IROM1_start__ = 0x10080000;
|
||||
* define symbol __ICFEDIT_region_IROM1_end__ = 0x10100000;
|
||||
* define symbol __ICFEDIT_region_IRAM1_start__ = 0x08024000;
|
||||
* define symbol __ICFEDIT_region_IRAM1_end__ = 0x08047800;
|
||||
* \endcode
|
||||
*
|
||||
* Change the value of the \ref CY_CORTEX_M4_APPL_ADDR macro to the
|
||||
* __ICFEDIT_region_IROM1_start__ value in the 'xx_cm4_dual.icf' file, where 'xx'
|
||||
* is the device group. Do this by either:
|
||||
* - Passing the following commands to the compiler:\n
|
||||
* \code -D CY_CORTEX_M4_APPL_ADDR=0x10080000 \endcode
|
||||
* - Editing the \ref CY_CORTEX_M4_APPL_ADDR value in the 'system_xx.h', where
|
||||
* 'xx' is device family:\n
|
||||
* \code #define CY_CORTEX_M4_APPL_ADDR (0x10080000u) \endcode
|
||||
*
|
||||
* \subsection group_system_config_device_initialization Device Initialization
|
||||
* After a power-on-reset (POR), the boot process is handled by the boot code
|
||||
* from the on-chip ROM that is always executed by the Cortex-M0+ core. The boot
|
||||
* code passes the control to the Cortex-M0+ startup code located in flash.
|
||||
*
|
||||
* \subsubsection group_system_config_dual_core_device_initialization Dual-Core Devices
|
||||
* The Cortex-M0+ startup code performs the device initialization by a call to
|
||||
* SystemInit() and then calls the main() function. The Cortex-M4 core is disabled
|
||||
* by default. Enable the core using the \ref Cy_SysEnableCM4() function.
|
||||
* See \ref group_system_config_cm4_functions for more details.
|
||||
* \note Startup code executes SystemInit() function for the both Cortex-M0+ and Cortex-M4 cores.
|
||||
* The function has a separate implementation on each core.
|
||||
* Both function implementations unlock and disable the WDT.
|
||||
* Therefore enable the WDT after both cores have been initialized.
|
||||
*
|
||||
* \subsubsection group_system_config_single_core_device_initialization Single-Core Devices
|
||||
* The Cortex-M0+ core is not user-accessible on these devices. In this case the
|
||||
* Flash Boot handles setup of the CM0+ core and starts the Cortex-M4 core.
|
||||
*
|
||||
* \subsection group_system_config_heap_stack_config Heap and Stack Configuration
|
||||
* There are two ways to adjust heap and stack configurations:
|
||||
* -# Editing source code files
|
||||
* -# Specifying via command line
|
||||
*
|
||||
* By default, the stack size is set to 0x00001000 and the heap size is set to 0x00000400.
|
||||
*
|
||||
* \subsubsection group_system_config_heap_stack_config_gcc ARM GCC
|
||||
* - <b>Editing source code files</b>\n
|
||||
* The heap and stack sizes are defined in the assembler startup files
|
||||
* (e.g. startup_psoc6_01_cm0plus.S and startup_psoc6_01_cm4.S).
|
||||
* Change the heap and stack sizes by modifying the following lines:\n
|
||||
* \code .equ Stack_Size, 0x00001000 \endcode
|
||||
* \code .equ Heap_Size, 0x00000400 \endcode
|
||||
*
|
||||
* - <b>Specifying via command line</b>\n
|
||||
* Change the heap and stack sizes passing the following commands to the compiler:\n
|
||||
* \code -D __STACK_SIZE=0x000000400 \endcode
|
||||
* \code -D __HEAP_SIZE=0x000000100 \endcode
|
||||
*
|
||||
* \subsubsection group_system_config_heap_stack_config_mdk ARM MDK
|
||||
* - <b>Editing source code files</b>\n
|
||||
* The heap and stack sizes are defined in the assembler startup files
|
||||
* (e.g. startup_psoc6_01_cm0plus.s and startup_psoc6_01_cm4.s).
|
||||
* Change the heap and stack sizes by modifying the following lines:\n
|
||||
* \code Stack_Size EQU 0x00001000 \endcode
|
||||
* \code Heap_Size EQU 0x00000400 \endcode
|
||||
*
|
||||
* - <b>Specifying via command line</b>\n
|
||||
* Change the heap and stack sizes passing the following commands to the assembler:\n
|
||||
* \code "--predefine=___STACK_SIZE SETA 0x000000400" \endcode
|
||||
* \code "--predefine=__HEAP_SIZE SETA 0x000000100" \endcode
|
||||
*
|
||||
* \subsubsection group_system_config_heap_stack_config_iar IAR
|
||||
* - <b>Editing source code files</b>\n
|
||||
* The heap and stack sizes are defined in the linker scatter files: 'xx_yy.icf',
|
||||
* where 'xx' is the device family, and 'yy' is the target CPU; for example,
|
||||
* cy8c6xx7_cm0plus.icf and cy8c6xx7_cm4_dual.icf.
|
||||
* Change the heap and stack sizes by modifying the following lines:\n
|
||||
* \code Stack_Size EQU 0x00001000 \endcode
|
||||
* \code Heap_Size EQU 0x00000400 \endcode
|
||||
*
|
||||
* - <b>Specifying via command line</b>\n
|
||||
* Change the heap and stack sizes passing the following commands to the
|
||||
* linker (including quotation marks):\n
|
||||
* \code --define_symbol __STACK_SIZE=0x000000400 \endcode
|
||||
* \code --define_symbol __HEAP_SIZE=0x000000100 \endcode
|
||||
*
|
||||
* \subsection group_system_config_merge_apps Merging CM0+ and CM4 Executables
|
||||
* The CM0+ project and linker script build the CM0+ application image. Similarly,
|
||||
* the CM4 linker script builds the CM4 application image. Each specifies
|
||||
* locations, sizes, and contents of sections in memory. See
|
||||
* \ref group_system_config_device_memory_definition for the symbols and default
|
||||
* values.
|
||||
*
|
||||
* The cymcuelftool is invoked by a post-build command. The precise project
|
||||
* setting is IDE-specific.
|
||||
*
|
||||
* The cymcuelftool combines the two executables. The tool examines the
|
||||
* executables to ensure that memory regions either do not overlap, or contain
|
||||
* identical bytes (shared). If there are no problems, it creates a new ELF file
|
||||
* with the merged image, without changing any of the addresses or data.
|
||||
*
|
||||
* \subsection group_system_config_default_handlers Default Interrupt Handlers Definition
|
||||
* The default interrupt handler functions are defined as weak functions to a dummy
|
||||
* handler in the startup file. The naming convention for the interrupt handler names
|
||||
* is \<interrupt_name\>_IRQHandler. A default interrupt handler can be overwritten in
|
||||
* user code by defining the handler function using the same name. For example:
|
||||
* \code
|
||||
* void scb_0_interrupt_IRQHandler(void)
|
||||
*{
|
||||
* ...
|
||||
*}
|
||||
* \endcode
|
||||
*
|
||||
* \subsection group_system_config_device_vector_table Vectors Table Copy from Flash to RAM
|
||||
* This process uses memory sections defined in the linker script. The startup
|
||||
* code actually defines the contents of the vector table and performs the copy.
|
||||
* \subsubsection group_system_config_device_vector_table_gcc ARM GCC
|
||||
* The linker script file is 'xx_yy.ld', where 'xx' is the device family, and
|
||||
* 'yy' is the target CPU; for example, cy8c6xx7_cm0plus.ld and cy8c6xx7_cm4_dual.ld.
|
||||
* It defines sections and locations in memory.\n
|
||||
* Copy interrupt vectors from flash to RAM: \n
|
||||
* From: \code LONG (__Vectors) \endcode
|
||||
* To: \code LONG (__ram_vectors_start__) \endcode
|
||||
* Size: \code LONG (__Vectors_End - __Vectors) \endcode
|
||||
* The vector table address (and the vector table itself) are defined in the
|
||||
* assembler startup files (e.g. startup_psoc6_01_cm0plus.S and startup_psoc6_01_cm4.S).
|
||||
* The code in these files copies the vector table from Flash to RAM.
|
||||
* \subsubsection group_system_config_device_vector_table_mdk ARM MDK
|
||||
* The linker script file is 'xx_yy.scat', where 'xx' is the device family,
|
||||
* and 'yy' is the target CPU; for example, cy8c6xx7_cm0plus.scat and
|
||||
* cy8c6xx7_cm4_dual.scat. The linker script specifies that the vector table
|
||||
* (RESET_RAM) shall be first in the RAM section.\n
|
||||
* RESET_RAM represents the vector table. It is defined in the assembler startup
|
||||
* files (e.g. startup_psoc6_01_cm0plus.s and startup_psoc6_01_cm4.s).
|
||||
* The code in these files copies the vector table from Flash to RAM.
|
||||
*
|
||||
* \subsubsection group_system_config_device_vector_table_iar IAR
|
||||
* The linker script file is 'xx_yy.icf', where 'xx' is the device family, and
|
||||
* 'yy' is the target CPU; for example, cy8c6xx7_cm0plus.icf and cy8c6xx7_cm4_dual.icf.
|
||||
* This file defines the .intvec_ram section and its location.
|
||||
* \code place at start of IRAM1_region { readwrite section .intvec_ram}; \endcode
|
||||
* The vector table address (and the vector table itself) are defined in the
|
||||
* assembler startup files (e.g. startup_psoc6_01_cm0plus.s and startup_psoc6_01_cm4.s).
|
||||
* The code in these files copies the vector table from Flash to RAM.
|
||||
*
|
||||
* \section group_system_config_more_information More Information
|
||||
* Refer to the <a href="..\..\pdl_user_guide.pdf">PDL User Guide</a> for the
|
||||
* more details.
|
||||
*
|
||||
* \section group_system_config_MISRA MISRA Compliance
|
||||
*
|
||||
* <table class="doxtable">
|
||||
* <tr>
|
||||
* <th>MISRA Rule</th>
|
||||
* <th>Rule Class (Required/Advisory)</th>
|
||||
* <th>Rule Description</th>
|
||||
* <th>Description of Deviation(s)</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>2.3</td>
|
||||
* <td>R</td>
|
||||
* <td>The character sequence // shall not be used within a comment.</td>
|
||||
* <td>The comments provide a useful WEB link to the documentation.</td>
|
||||
* </tr>
|
||||
* </table>
|
||||
*
|
||||
* \section group_system_config_changelog Changelog
|
||||
* <table class="doxtable">
|
||||
* <tr>
|
||||
* <th>Version</th>
|
||||
* <th>Changes</th>
|
||||
* <th>Reason for Change</th>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>2.40</td>
|
||||
* <td>Updated assembler files, C files, linker scripts.</td>
|
||||
* <td>Added Arm Compiler 6 support.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td rowspan="2">2.30</td>
|
||||
* <td>Added assembler files, linker scripts for Mbed OS.</td>
|
||||
* <td>Added Arm Mbed OS embedded operating system support.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>Updated linker scripts to extend the Flash and Ram memories size available for the CM4 core.</td>
|
||||
* <td>Enhanced PDL usability.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>2.20</td>
|
||||
* <td>Moved the Cy_IPC_SystemSemaInit(), Cy_IPC_SystemPipeInit() functions implementation from IPC to Startup.</td>
|
||||
* <td>Changed the IPC driver configuration method from compile time to run time.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td rowspan="2"> 2.10</td>
|
||||
* <td>Added constructor attribute to SystemInit() function declaration for ARM MDK compiler. \n
|
||||
* Removed $Sub$$main symbol for ARM MDK compiler.
|
||||
* </td>
|
||||
* <td>uVision Debugger support.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>Updated description of the Startup behavior for Single-Core Devices. \n
|
||||
* Added note about WDT disabling by SystemInit() function.
|
||||
* </td>
|
||||
* <td>Documentation improvement.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td rowspan="4"> 2.0</td>
|
||||
* <td>Added restoring of FLL registers to the default state in SystemInit() API for single core devices.
|
||||
* Single core device support.
|
||||
* </td>
|
||||
* <td></td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>Added Normal Access Restrictions, Public Key, TOC part2 and TOC part2 copy to Supervisory flash linker memory regions. \n
|
||||
* Renamed 'wflash' memory region to 'em_eeprom'.
|
||||
* </td>
|
||||
* <td>Linker scripts usability improvement.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>Added Cy_IPC_SystemSemaInit(), Cy_IPC_SystemPipeInit(), Cy_Flash_Init() functions call to SystemInit() API.</td>
|
||||
* <td>Reserved system resources for internal operations.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>Added clearing and releasing of IPC structure #7 (reserved for the Deep-Sleep operations) to SystemInit() API.</td>
|
||||
* <td>To avoid deadlocks in case of SW or WDT reset during Deep-Sleep entering.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td>1.0</td>
|
||||
* <td>Initial version</td>
|
||||
* <td></td>
|
||||
* </tr>
|
||||
* </table>
|
||||
*
|
||||
*
|
||||
* \defgroup group_system_config_macro Macro
|
||||
* \{
|
||||
* \defgroup group_system_config_system_macro System
|
||||
* \defgroup group_system_config_cm4_status_macro Cortex-M4 Status
|
||||
* \defgroup group_system_config_user_settings_macro User Settings
|
||||
* \}
|
||||
* \defgroup group_system_config_functions Functions
|
||||
* \{
|
||||
* \defgroup group_system_config_system_functions System
|
||||
* \defgroup group_system_config_cm4_functions Cortex-M4 Control
|
||||
* \}
|
||||
* \defgroup group_system_config_globals Global Variables
|
||||
*
|
||||
* \}
|
||||
*/
|
||||
|
||||
/**
|
||||
* \addtogroup group_system_config_system_functions
|
||||
* \{
|
||||
* \details
|
||||
* The following system functions implement CMSIS Core functions.
|
||||
* Refer to the [CMSIS documentation]
|
||||
* (http://www.keil.com/pack/doc/CMSIS/Core/html/group__system__init__gr.html "System and Clock Configuration")
|
||||
* for more details.
|
||||
* \}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Include files
|
||||
*******************************************************************************/
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Global preprocessor symbols/macros ('define')
|
||||
*******************************************************************************/
|
||||
#if ((defined(__GNUC__) && (__ARM_ARCH == 6) && (__ARM_ARCH_6M__ == 1)) || \
|
||||
(defined (__ICCARM__) && (__CORE__ == __ARM6M__)) || \
|
||||
(defined(__ARMCC_VERSION) && (__TARGET_ARCH_THUMB == 3)))
|
||||
#define CY_SYSTEM_CPU_CM0P 1UL
|
||||
#else
|
||||
#define CY_SYSTEM_CPU_CM0P 0UL
|
||||
#endif
|
||||
|
||||
#if defined (CY_PSOC_CREATOR_USED) && (CY_PSOC_CREATOR_USED == 1U)
|
||||
#include "cyfitter.h"
|
||||
#endif /* (CY_PSOC_CREATOR_USED) && (CY_PSOC_CREATOR_USED == 1U) */
|
||||
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* START OF USER SETTINGS HERE
|
||||
* ===========================
|
||||
*
|
||||
* All lines with '<<<' can be set by user.
|
||||
*
|
||||
*******************************************************************************/
|
||||
|
||||
/**
|
||||
* \addtogroup group_system_config_user_settings_macro
|
||||
* \{
|
||||
*/
|
||||
|
||||
#if defined (CYDEV_CLK_EXTCLK__HZ)
|
||||
#define CY_CLK_EXT_FREQ_HZ (CYDEV_CLK_EXTCLK__HZ)
|
||||
#else
|
||||
/***************************************************************************//**
|
||||
* External Clock Frequency (in Hz, [value]UL). If compiled within
|
||||
* PSoC Creator and the clock is enabled in the DWR, the value from DWR used.
|
||||
* Otherwise, edit the value below.
|
||||
* <i>(USER SETTING)</i>
|
||||
*******************************************************************************/
|
||||
#define CY_CLK_EXT_FREQ_HZ (24000000UL) /* <<< 24 MHz */
|
||||
#endif /* (CYDEV_CLK_EXTCLK__HZ) */
|
||||
|
||||
|
||||
#if defined (CYDEV_CLK_ECO__HZ)
|
||||
#define CY_CLK_ECO_FREQ_HZ (CYDEV_CLK_ECO__HZ)
|
||||
#else
|
||||
/***************************************************************************//**
|
||||
* \brief External crystal oscillator frequency (in Hz, [value]UL). If compiled
|
||||
* within PSoC Creator and the clock is enabled in the DWR, the value from DWR
|
||||
* used.
|
||||
* <i>(USER SETTING)</i>
|
||||
*******************************************************************************/
|
||||
#define CY_CLK_ECO_FREQ_HZ (24000000UL) /* <<< 24 MHz */
|
||||
#endif /* (CYDEV_CLK_ECO__HZ) */
|
||||
|
||||
|
||||
#if defined (CYDEV_CLK_ALTHF__HZ)
|
||||
#define CY_CLK_ALTHF_FREQ_HZ (CYDEV_CLK_ALTHF__HZ)
|
||||
#else
|
||||
/***************************************************************************//**
|
||||
* \brief Alternate high frequency (in Hz, [value]UL). If compiled within
|
||||
* PSoC Creator and the clock is enabled in the DWR, the value from DWR used.
|
||||
* Otherwise, edit the value below.
|
||||
* <i>(USER SETTING)</i>
|
||||
*******************************************************************************/
|
||||
#define CY_CLK_ALTHF_FREQ_HZ (32000000UL) /* <<< 32 MHz */
|
||||
#endif /* (CYDEV_CLK_ALTHF__HZ) */
|
||||
|
||||
|
||||
/***************************************************************************//**
|
||||
* \brief Start address of the Cortex-M4 application ([address]UL)
|
||||
* <i>(USER SETTING)</i>
|
||||
*******************************************************************************/
|
||||
#if !defined (CY_CORTEX_M4_APPL_ADDR)
|
||||
#define CY_CORTEX_M4_APPL_ADDR (CY_FLASH_BASE + 0x2000U) /* <<< 8 kB of flash is reserved for the Cortex-M0+ application */
|
||||
#endif /* (CY_CORTEX_M4_APPL_ADDR) */
|
||||
|
||||
|
||||
/***************************************************************************//**
|
||||
* \brief IPC Semaphores allocation ([value]UL).
|
||||
* <i>(USER SETTING)</i>
|
||||
*******************************************************************************/
|
||||
#define CY_IPC_SEMA_COUNT (128UL) /* <<< This will allow 128 (4*32) semaphores */
|
||||
|
||||
|
||||
/***************************************************************************//**
|
||||
* \brief IPC Pipe definitions ([value]UL).
|
||||
* <i>(USER SETTING)</i>
|
||||
*******************************************************************************/
|
||||
#define CY_IPC_MAX_ENDPOINTS (8UL) /* <<< 8 endpoints */
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* END OF USER SETTINGS HERE
|
||||
* =========================
|
||||
*
|
||||
*******************************************************************************/
|
||||
|
||||
/** \} group_system_config_user_settings_macro */
|
||||
|
||||
|
||||
/**
|
||||
* \addtogroup group_system_config_system_macro
|
||||
* \{
|
||||
*/
|
||||
|
||||
#if (CY_SYSTEM_CPU_CM0P == 1UL) || defined(CY_DOXYGEN)
|
||||
/** The Cortex-M0+ startup driver identifier */
|
||||
#define CY_STARTUP_M0P_ID ((uint32_t)((uint32_t)((0x0EU) & 0x3FFFU) << 18U))
|
||||
#endif /* (CY_SYSTEM_CPU_CM0P == 1UL) */
|
||||
|
||||
#if (CY_SYSTEM_CPU_CM0P != 1UL) || defined(CY_DOXYGEN)
|
||||
/** The Cortex-M4 startup driver identifier */
|
||||
#define CY_STARTUP_M4_ID ((uint32_t)((uint32_t)((0x0FU) & 0x3FFFU) << 18U))
|
||||
#endif /* (CY_SYSTEM_CPU_CM0P != 1UL) */
|
||||
|
||||
/** \} group_system_config_system_macro */
|
||||
|
||||
|
||||
/**
|
||||
* \addtogroup group_system_config_system_functions
|
||||
* \{
|
||||
*/
|
||||
extern void SystemInit(void);
|
||||
|
||||
extern void SystemCoreClockUpdate(void);
|
||||
/** \} group_system_config_system_functions */
|
||||
|
||||
|
||||
/**
|
||||
* \addtogroup group_system_config_cm4_functions
|
||||
* \{
|
||||
*/
|
||||
extern uint32_t Cy_SysGetCM4Status(void);
|
||||
extern void Cy_SysEnableCM4(uint32_t vectorTableOffset);
|
||||
extern void Cy_SysDisableCM4(void);
|
||||
extern void Cy_SysRetainCM4(void);
|
||||
extern void Cy_SysResetCM4(void);
|
||||
/** \} group_system_config_cm4_functions */
|
||||
|
||||
|
||||
/** \cond */
|
||||
extern void Default_Handler (void);
|
||||
|
||||
void Cy_SysIpcPipeIsrCm0(void);
|
||||
void Cy_SysIpcPipeIsrCm4(void);
|
||||
|
||||
extern void Cy_SystemInit(void);
|
||||
extern void Cy_SystemInitFpuEnable(void);
|
||||
|
||||
extern uint32_t cy_delayFreqHz;
|
||||
extern uint32_t cy_delayFreqKhz;
|
||||
extern uint8_t cy_delayFreqMhz;
|
||||
extern uint32_t cy_delay32kMs;
|
||||
/** \endcond */
|
||||
|
||||
|
||||
#if (CY_SYSTEM_CPU_CM0P == 1UL) || defined(CY_DOXYGEN)
|
||||
/**
|
||||
* \addtogroup group_system_config_cm4_status_macro
|
||||
* \{
|
||||
*/
|
||||
#define CY_SYS_CM4_STATUS_ENABLED (3U) /**< The Cortex-M4 core is enabled: power on, clock on, no isolate, no reset and no retain. */
|
||||
#define CY_SYS_CM4_STATUS_DISABLED (0U) /**< The Cortex-M4 core is disabled: power off, clock off, isolate, reset and no retain. */
|
||||
#define CY_SYS_CM4_STATUS_RETAINED (2U) /**< The Cortex-M4 core is retained. power off, clock off, isolate, no reset and retain. */
|
||||
#define CY_SYS_CM4_STATUS_RESET (1U) /**< The Cortex-M4 core is in the Reset mode: clock off, no isolated, no retain and reset. */
|
||||
/** \} group_system_config_cm4_status_macro */
|
||||
|
||||
#endif /* (CY_SYSTEM_CPU_CM0P == 1UL) */
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* IPC Configuration
|
||||
* =========================
|
||||
*******************************************************************************/
|
||||
/* IPC CY_PIPE default configuration */
|
||||
#define CY_SYS_CYPIPE_CLIENT_CNT (8UL)
|
||||
|
||||
#define CY_SYS_INTR_CYPIPE_MUX_EP0 (1UL) /* IPC CYPRESS PIPE */
|
||||
#define CY_SYS_INTR_CYPIPE_PRIOR_EP0 (1UL) /* Notifier Priority */
|
||||
#define CY_SYS_INTR_CYPIPE_PRIOR_EP1 (1UL) /* Notifier Priority */
|
||||
|
||||
#define CY_SYS_CYPIPE_CHAN_MASK_EP0 (0x0001UL << CY_IPC_CHAN_CYPIPE_EP0)
|
||||
#define CY_SYS_CYPIPE_CHAN_MASK_EP1 (0x0001UL << CY_IPC_CHAN_CYPIPE_EP1)
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
/*
|
||||
* The System pipe configuration defines the IPC channel number, interrupt
|
||||
* number, and the pipe interrupt mask for the endpoint.
|
||||
*
|
||||
* The format of the endPoint configuration
|
||||
* Bits[31:16] Interrupt Mask
|
||||
* Bits[15:8 ] IPC interrupt
|
||||
* Bits[ 7:0 ] IPC channel
|
||||
*/
|
||||
|
||||
/* System Pipe addresses */
|
||||
/* CyPipe defines */
|
||||
|
||||
#define CY_SYS_CYPIPE_INTR_MASK ( CY_SYS_CYPIPE_CHAN_MASK_EP0 | CY_SYS_CYPIPE_CHAN_MASK_EP1 )
|
||||
|
||||
#define CY_SYS_CYPIPE_CONFIG_EP0 ( (CY_SYS_CYPIPE_INTR_MASK << CY_IPC_PIPE_CFG_IMASK_Pos) \
|
||||
| (CY_IPC_INTR_CYPIPE_EP0 << CY_IPC_PIPE_CFG_INTR_Pos) \
|
||||
| CY_IPC_CHAN_CYPIPE_EP0)
|
||||
#define CY_SYS_CYPIPE_CONFIG_EP1 ( (CY_SYS_CYPIPE_INTR_MASK << CY_IPC_PIPE_CFG_IMASK_Pos) \
|
||||
| (CY_IPC_INTR_CYPIPE_EP1 << CY_IPC_PIPE_CFG_INTR_Pos) \
|
||||
| CY_IPC_CHAN_CYPIPE_EP1)
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
|
||||
/** \addtogroup group_system_config_globals
|
||||
* \{
|
||||
*/
|
||||
|
||||
extern uint32_t SystemCoreClock;
|
||||
extern uint32_t cy_BleEcoClockFreqHz;
|
||||
extern uint32_t cy_Hfclk0FreqHz;
|
||||
extern uint32_t cy_PeriClkFreqHz;
|
||||
|
||||
/** \} group_system_config_globals */
|
||||
|
||||
|
||||
|
||||
/** \cond INTERNAL */
|
||||
/*******************************************************************************
|
||||
* Backward compatibility macro. The following code is DEPRECATED and must
|
||||
* not be used in new projects
|
||||
*******************************************************************************/
|
||||
|
||||
/* BWC defines for functions related to enter/exit critical section */
|
||||
#define Cy_SaveIRQ Cy_SysLib_EnterCriticalSection
|
||||
#define Cy_RestoreIRQ Cy_SysLib_ExitCriticalSection
|
||||
#define CY_SYS_INTR_CYPIPE_EP0 (CY_IPC_INTR_CYPIPE_EP0)
|
||||
#define CY_SYS_INTR_CYPIPE_EP1 (CY_IPC_INTR_CYPIPE_EP1)
|
||||
|
||||
/** \endcond */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SYSTEM_PSOC6_H_ */
|
||||
|
||||
|
||||
/* [] END OF FILE */
|
|
@ -1,552 +0,0 @@
|
|||
/***************************************************************************//**
|
||||
* \file system_psoc6_cm4.c
|
||||
* \version 2.40
|
||||
*
|
||||
* The device system-source file.
|
||||
*
|
||||
********************************************************************************
|
||||
* \copyright
|
||||
* Copyright 2016-2019 Cypress Semiconductor Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "system_psoc6.h"
|
||||
#include "cy_device.h"
|
||||
#include "cy_device_headers.h"
|
||||
#include "cy_syslib.h"
|
||||
#include "cy_wdt.h"
|
||||
|
||||
#if !defined(CY_IPC_DEFAULT_CFG_DISABLE)
|
||||
#include "cy_ipc_sema.h"
|
||||
#include "cy_ipc_pipe.h"
|
||||
#include "cy_ipc_drv.h"
|
||||
|
||||
#if defined(CY_DEVICE_PSOC6ABLE2)
|
||||
#include "cy_flash.h"
|
||||
#endif /* defined(CY_DEVICE_PSOC6ABLE2) */
|
||||
#endif /* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* SystemCoreClockUpdate()
|
||||
*******************************************************************************/
|
||||
|
||||
/** Default HFClk frequency in Hz */
|
||||
#define CY_CLK_HFCLK0_FREQ_HZ_DEFAULT (8000000UL)
|
||||
|
||||
/** Default PeriClk frequency in Hz */
|
||||
#define CY_CLK_PERICLK_FREQ_HZ_DEFAULT (4000000UL)
|
||||
|
||||
/** Default SlowClk system core frequency in Hz */
|
||||
#define CY_CLK_SYSTEM_FREQ_HZ_DEFAULT (8000000UL)
|
||||
|
||||
/** IMO frequency in Hz */
|
||||
#define CY_CLK_IMO_FREQ_HZ (8000000UL)
|
||||
|
||||
/** HVILO frequency in Hz */
|
||||
#define CY_CLK_HVILO_FREQ_HZ (32000UL)
|
||||
|
||||
/** PILO frequency in Hz */
|
||||
#define CY_CLK_PILO_FREQ_HZ (32768UL)
|
||||
|
||||
/** WCO frequency in Hz */
|
||||
#define CY_CLK_WCO_FREQ_HZ (32768UL)
|
||||
|
||||
/** ALTLF frequency in Hz */
|
||||
#define CY_CLK_ALTLF_FREQ_HZ (32768UL)
|
||||
|
||||
|
||||
/**
|
||||
* Holds the SlowClk (Cortex-M0+) or FastClk (Cortex-M4) system core clock,
|
||||
* which is the system clock frequency supplied to the SysTick timer and the
|
||||
* processor core clock.
|
||||
* This variable implements CMSIS Core global variable.
|
||||
* Refer to the [CMSIS documentation]
|
||||
* (http://www.keil.com/pack/doc/CMSIS/Core/html/group__system__init__gr.html "System and Clock Configuration")
|
||||
* for more details.
|
||||
* This variable can be used by debuggers to query the frequency
|
||||
* of the debug timer or to configure the trace clock speed.
|
||||
*
|
||||
* \attention Compilers must be configured to avoid removing this variable in case
|
||||
* the application program is not using it. Debugging systems require the variable
|
||||
* to be physically present in memory so that it can be examined to configure the debugger. */
|
||||
uint32_t SystemCoreClock = CY_CLK_SYSTEM_FREQ_HZ_DEFAULT;
|
||||
|
||||
/** Holds the HFClk0 clock frequency. Updated by \ref SystemCoreClockUpdate(). */
|
||||
uint32_t cy_Hfclk0FreqHz = CY_CLK_HFCLK0_FREQ_HZ_DEFAULT;
|
||||
|
||||
/** Holds the PeriClk clock frequency. Updated by \ref SystemCoreClockUpdate(). */
|
||||
uint32_t cy_PeriClkFreqHz = CY_CLK_PERICLK_FREQ_HZ_DEFAULT;
|
||||
|
||||
/** Holds the Alternate high frequency clock in Hz. Updated by \ref SystemCoreClockUpdate(). */
|
||||
#if (defined (CY_IP_MXBLESS) && (CY_IP_MXBLESS == 1UL)) || defined (CY_DOXYGEN)
|
||||
uint32_t cy_BleEcoClockFreqHz = CY_CLK_ALTHF_FREQ_HZ;
|
||||
#endif /* (defined (CY_IP_MXBLESS) && (CY_IP_MXBLESS == 1UL)) || defined (CY_DOXYGEN) */
|
||||
|
||||
/* SCB->CPACR */
|
||||
#define SCB_CPACR_CP10_CP11_ENABLE (0xFUL << 20u)
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* SystemInit()
|
||||
*******************************************************************************/
|
||||
|
||||
/* CLK_FLL_CONFIG default values */
|
||||
#define CY_FB_CLK_FLL_CONFIG_VALUE (0x01000000u)
|
||||
#define CY_FB_CLK_FLL_CONFIG2_VALUE (0x00020001u)
|
||||
#define CY_FB_CLK_FLL_CONFIG3_VALUE (0x00002800u)
|
||||
#define CY_FB_CLK_FLL_CONFIG4_VALUE (0x000000FFu)
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* SystemCoreClockUpdate (void)
|
||||
*******************************************************************************/
|
||||
|
||||
/* Do not use these definitions directly in your application */
|
||||
#define CY_DELAY_MS_OVERFLOW_THRESHOLD (0x8000u)
|
||||
#define CY_DELAY_1K_THRESHOLD (1000u)
|
||||
#define CY_DELAY_1K_MINUS_1_THRESHOLD (CY_DELAY_1K_THRESHOLD - 1u)
|
||||
#define CY_DELAY_1M_THRESHOLD (1000000u)
|
||||
#define CY_DELAY_1M_MINUS_1_THRESHOLD (CY_DELAY_1M_THRESHOLD - 1u)
|
||||
uint32_t cy_delayFreqHz = CY_CLK_SYSTEM_FREQ_HZ_DEFAULT;
|
||||
|
||||
uint32_t cy_delayFreqKhz = (CY_CLK_SYSTEM_FREQ_HZ_DEFAULT + CY_DELAY_1K_MINUS_1_THRESHOLD) /
|
||||
CY_DELAY_1K_THRESHOLD;
|
||||
|
||||
uint8_t cy_delayFreqMhz = (uint8_t)((CY_CLK_SYSTEM_FREQ_HZ_DEFAULT + CY_DELAY_1M_MINUS_1_THRESHOLD) /
|
||||
CY_DELAY_1M_THRESHOLD);
|
||||
|
||||
uint32_t cy_delay32kMs = CY_DELAY_MS_OVERFLOW_THRESHOLD *
|
||||
((CY_CLK_SYSTEM_FREQ_HZ_DEFAULT + CY_DELAY_1K_MINUS_1_THRESHOLD) / CY_DELAY_1K_THRESHOLD);
|
||||
|
||||
#define CY_ROOT_PATH_SRC_IMO (0UL)
|
||||
#define CY_ROOT_PATH_SRC_EXT (1UL)
|
||||
#if (SRSS_ECO_PRESENT == 1U)
|
||||
#define CY_ROOT_PATH_SRC_ECO (2UL)
|
||||
#endif /* (SRSS_ECO_PRESENT == 1U) */
|
||||
#if (SRSS_ALTHF_PRESENT == 1U)
|
||||
#define CY_ROOT_PATH_SRC_ALTHF (3UL)
|
||||
#endif /* (SRSS_ALTHF_PRESENT == 1U) */
|
||||
#define CY_ROOT_PATH_SRC_DSI_MUX (4UL)
|
||||
#define CY_ROOT_PATH_SRC_DSI_MUX_HVILO (16UL)
|
||||
#define CY_ROOT_PATH_SRC_DSI_MUX_WCO (17UL)
|
||||
#if (SRSS_ALTLF_PRESENT == 1U)
|
||||
#define CY_ROOT_PATH_SRC_DSI_MUX_ALTLF (18UL)
|
||||
#endif /* (SRSS_ALTLF_PRESENT == 1U) */
|
||||
#if (SRSS_PILO_PRESENT == 1U)
|
||||
#define CY_ROOT_PATH_SRC_DSI_MUX_PILO (19UL)
|
||||
#endif /* (SRSS_PILO_PRESENT == 1U) */
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name: SystemInit
|
||||
****************************************************************************//**
|
||||
* \cond
|
||||
* Initializes the system:
|
||||
* - Restores FLL registers to the default state for single core devices.
|
||||
* - Unlocks and disables WDT.
|
||||
* - Calls Cy_PDL_Init() function to define the driver library.
|
||||
* - Calls the Cy_SystemInit() function, if compiled from PSoC Creator.
|
||||
* - Calls \ref SystemCoreClockUpdate().
|
||||
* \endcond
|
||||
*******************************************************************************/
|
||||
void SystemInit(void)
|
||||
{
|
||||
Cy_PDL_Init(CY_DEVICE_CFG);
|
||||
|
||||
#ifdef __CM0P_PRESENT
|
||||
#if (__CM0P_PRESENT == 0)
|
||||
/* Restore FLL registers to the default state as they are not restored by the ROM code */
|
||||
uint32_t copy = SRSS->CLK_FLL_CONFIG;
|
||||
copy &= ~SRSS_CLK_FLL_CONFIG_FLL_ENABLE_Msk;
|
||||
SRSS->CLK_FLL_CONFIG = copy;
|
||||
|
||||
copy = SRSS->CLK_ROOT_SELECT[0u];
|
||||
copy &= ~SRSS_CLK_ROOT_SELECT_ROOT_DIV_Msk; /* Set ROOT_DIV = 0*/
|
||||
SRSS->CLK_ROOT_SELECT[0u] = copy;
|
||||
|
||||
SRSS->CLK_FLL_CONFIG = CY_FB_CLK_FLL_CONFIG_VALUE;
|
||||
SRSS->CLK_FLL_CONFIG2 = CY_FB_CLK_FLL_CONFIG2_VALUE;
|
||||
SRSS->CLK_FLL_CONFIG3 = CY_FB_CLK_FLL_CONFIG3_VALUE;
|
||||
SRSS->CLK_FLL_CONFIG4 = CY_FB_CLK_FLL_CONFIG4_VALUE;
|
||||
|
||||
/* Unlock and disable WDT */
|
||||
Cy_WDT_Unlock();
|
||||
Cy_WDT_Disable();
|
||||
#endif /* (__CM0P_PRESENT == 0) */
|
||||
#endif /* __CM0P_PRESENT */
|
||||
|
||||
Cy_SystemInit();
|
||||
SystemCoreClockUpdate();
|
||||
|
||||
#if !defined(CY_IPC_DEFAULT_CFG_DISABLE)
|
||||
|
||||
#ifdef __CM0P_PRESENT
|
||||
#if (__CM0P_PRESENT == 0)
|
||||
/* Allocate and initialize semaphores for the system operations. */
|
||||
static uint32_t ipcSemaArray[CY_IPC_SEMA_COUNT / CY_IPC_SEMA_PER_WORD];
|
||||
(void) Cy_IPC_Sema_Init(CY_IPC_CHAN_SEMA, CY_IPC_SEMA_COUNT, ipcSemaArray);
|
||||
#else
|
||||
(void) Cy_IPC_Sema_Init(CY_IPC_CHAN_SEMA, 0ul, NULL);
|
||||
#endif /* (__CM0P_PRESENT) */
|
||||
#else
|
||||
(void) Cy_IPC_Sema_Init(CY_IPC_CHAN_SEMA, 0ul, NULL);
|
||||
#endif /* __CM0P_PRESENT */
|
||||
|
||||
|
||||
/********************************************************************************
|
||||
*
|
||||
* Initializes the system pipes. The system pipes are used by BLE and Flash.
|
||||
*
|
||||
* If the default startup file is not used, or SystemInit() is not called in your
|
||||
* project, call the following three functions prior to executing any flash or
|
||||
* EmEEPROM write or erase operation:
|
||||
* -# Cy_IPC_Sema_Init()
|
||||
* -# Cy_IPC_Pipe_Config()
|
||||
* -# Cy_IPC_Pipe_Init()
|
||||
* -# Cy_Flash_Init()
|
||||
*
|
||||
*******************************************************************************/
|
||||
/* Create an array of endpoint structures */
|
||||
static cy_stc_ipc_pipe_ep_t systemIpcPipeEpArray[CY_IPC_MAX_ENDPOINTS];
|
||||
|
||||
Cy_IPC_Pipe_Config(systemIpcPipeEpArray);
|
||||
|
||||
static cy_ipc_pipe_callback_ptr_t systemIpcPipeSysCbArray[CY_SYS_CYPIPE_CLIENT_CNT];
|
||||
|
||||
static const cy_stc_ipc_pipe_config_t systemIpcPipeConfigCm4 =
|
||||
{
|
||||
/* .ep0ConfigData */
|
||||
{
|
||||
/* .ipcNotifierNumber */ CY_IPC_INTR_CYPIPE_EP0,
|
||||
/* .ipcNotifierPriority */ CY_SYS_INTR_CYPIPE_PRIOR_EP0,
|
||||
/* .ipcNotifierMuxNumber */ CY_SYS_INTR_CYPIPE_MUX_EP0,
|
||||
/* .epAddress */ CY_IPC_EP_CYPIPE_CM0_ADDR,
|
||||
/* .epConfig */ CY_SYS_CYPIPE_CONFIG_EP0
|
||||
},
|
||||
/* .ep1ConfigData */
|
||||
{
|
||||
/* .ipcNotifierNumber */ CY_IPC_INTR_CYPIPE_EP1,
|
||||
/* .ipcNotifierPriority */ CY_SYS_INTR_CYPIPE_PRIOR_EP1,
|
||||
/* .ipcNotifierMuxNumber */ 0u,
|
||||
/* .epAddress */ CY_IPC_EP_CYPIPE_CM4_ADDR,
|
||||
/* .epConfig */ CY_SYS_CYPIPE_CONFIG_EP1
|
||||
},
|
||||
/* .endpointClientsCount */ CY_SYS_CYPIPE_CLIENT_CNT,
|
||||
/* .endpointsCallbacksArray */ systemIpcPipeSysCbArray,
|
||||
/* .userPipeIsrHandler */ &Cy_SysIpcPipeIsrCm4
|
||||
};
|
||||
|
||||
if (cy_device->flashPipeRequired != 0u)
|
||||
{
|
||||
Cy_IPC_Pipe_Init(&systemIpcPipeConfigCm4);
|
||||
}
|
||||
|
||||
#if defined(CY_DEVICE_PSOC6ABLE2)
|
||||
Cy_Flash_Init();
|
||||
#endif /* defined(CY_DEVICE_PSOC6ABLE2) */
|
||||
|
||||
#endif /* !defined(CY_IPC_DEFAULT_CFG_DISABLE) */
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name: Cy_SystemInit
|
||||
****************************************************************************//**
|
||||
*
|
||||
* The function is called during device startup. Once project compiled as part of
|
||||
* the PSoC Creator project, the Cy_SystemInit() function is generated by the
|
||||
* PSoC Creator.
|
||||
*
|
||||
* The function generated by PSoC Creator performs all of the necessary device
|
||||
* configuration based on the design settings. This includes settings from the
|
||||
* Design Wide Resources (DWR) such as Clocks and Pins as well as any component
|
||||
* configuration that is necessary.
|
||||
*
|
||||
*******************************************************************************/
|
||||
__WEAK void Cy_SystemInit(void)
|
||||
{
|
||||
/* Empty weak function. The actual implementation to be in the PSoC Creator
|
||||
* generated strong function.
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name: SystemCoreClockUpdate
|
||||
****************************************************************************//**
|
||||
*
|
||||
* Gets core clock frequency and updates \ref SystemCoreClock, \ref
|
||||
* cy_Hfclk0FreqHz, and \ref cy_PeriClkFreqHz.
|
||||
*
|
||||
* Updates global variables used by the \ref Cy_SysLib_Delay(), \ref
|
||||
* Cy_SysLib_DelayUs(), and \ref Cy_SysLib_DelayCycles().
|
||||
*
|
||||
*******************************************************************************/
|
||||
void SystemCoreClockUpdate (void)
|
||||
{
|
||||
uint32_t srcFreqHz;
|
||||
uint32_t pathFreqHz;
|
||||
uint32_t fastClkDiv;
|
||||
uint32_t periClkDiv;
|
||||
uint32_t rootPath;
|
||||
uint32_t srcClk;
|
||||
|
||||
/* Get root path clock for the high-frequency clock # 0 */
|
||||
rootPath = _FLD2VAL(SRSS_CLK_ROOT_SELECT_ROOT_MUX, SRSS->CLK_ROOT_SELECT[0u]);
|
||||
|
||||
/* Get source of the root path clock */
|
||||
srcClk = _FLD2VAL(SRSS_CLK_PATH_SELECT_PATH_MUX, SRSS->CLK_PATH_SELECT[rootPath]);
|
||||
|
||||
/* Get frequency of the source */
|
||||
switch (srcClk)
|
||||
{
|
||||
case CY_ROOT_PATH_SRC_IMO:
|
||||
srcFreqHz = CY_CLK_IMO_FREQ_HZ;
|
||||
break;
|
||||
|
||||
case CY_ROOT_PATH_SRC_EXT:
|
||||
srcFreqHz = CY_CLK_EXT_FREQ_HZ;
|
||||
break;
|
||||
|
||||
#if (SRSS_ECO_PRESENT == 1U)
|
||||
case CY_ROOT_PATH_SRC_ECO:
|
||||
srcFreqHz = CY_CLK_ECO_FREQ_HZ;
|
||||
break;
|
||||
#endif /* (SRSS_ECO_PRESENT == 1U) */
|
||||
|
||||
#if defined (CY_IP_MXBLESS) && (CY_IP_MXBLESS == 1UL) && (SRSS_ALTHF_PRESENT == 1U)
|
||||
case CY_ROOT_PATH_SRC_ALTHF:
|
||||
srcFreqHz = cy_BleEcoClockFreqHz;
|
||||
break;
|
||||
#endif /* defined (CY_IP_MXBLESS) && (CY_IP_MXBLESS == 1UL) && (SRSS_ALTHF_PRESENT == 1U) */
|
||||
|
||||
case CY_ROOT_PATH_SRC_DSI_MUX:
|
||||
{
|
||||
uint32_t dsi_src;
|
||||
dsi_src = _FLD2VAL(SRSS_CLK_DSI_SELECT_DSI_MUX, SRSS->CLK_DSI_SELECT[rootPath]);
|
||||
switch (dsi_src)
|
||||
{
|
||||
case CY_ROOT_PATH_SRC_DSI_MUX_HVILO:
|
||||
srcFreqHz = CY_CLK_HVILO_FREQ_HZ;
|
||||
break;
|
||||
|
||||
case CY_ROOT_PATH_SRC_DSI_MUX_WCO:
|
||||
srcFreqHz = CY_CLK_WCO_FREQ_HZ;
|
||||
break;
|
||||
|
||||
#if (SRSS_ALTLF_PRESENT == 1U)
|
||||
case CY_ROOT_PATH_SRC_DSI_MUX_ALTLF:
|
||||
srcFreqHz = CY_CLK_ALTLF_FREQ_HZ;
|
||||
break;
|
||||
#endif /* (SRSS_ALTLF_PRESENT == 1U) */
|
||||
|
||||
#if (SRSS_PILO_PRESENT == 1U)
|
||||
case CY_ROOT_PATH_SRC_DSI_MUX_PILO:
|
||||
srcFreqHz = CY_CLK_PILO_FREQ_HZ;
|
||||
break;
|
||||
#endif /* (SRSS_PILO_PRESENT == 1U) */
|
||||
|
||||
default:
|
||||
srcFreqHz = CY_CLK_HVILO_FREQ_HZ;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
srcFreqHz = CY_CLK_EXT_FREQ_HZ;
|
||||
break;
|
||||
}
|
||||
|
||||
if (rootPath == 0UL)
|
||||
{
|
||||
/* FLL */
|
||||
bool fllLocked = ( 0UL != _FLD2VAL(SRSS_CLK_FLL_STATUS_LOCKED, SRSS->CLK_FLL_STATUS));
|
||||
bool fllOutputOutput = ( 3UL == _FLD2VAL(SRSS_CLK_FLL_CONFIG3_BYPASS_SEL, SRSS->CLK_FLL_CONFIG3));
|
||||
bool fllOutputAuto = ((0UL == _FLD2VAL(SRSS_CLK_FLL_CONFIG3_BYPASS_SEL, SRSS->CLK_FLL_CONFIG3)) ||
|
||||
(1UL == _FLD2VAL(SRSS_CLK_FLL_CONFIG3_BYPASS_SEL, SRSS->CLK_FLL_CONFIG3)));
|
||||
if ((fllOutputAuto && fllLocked) || fllOutputOutput)
|
||||
{
|
||||
uint32_t fllMult;
|
||||
uint32_t refDiv;
|
||||
uint32_t outputDiv;
|
||||
|
||||
fllMult = _FLD2VAL(SRSS_CLK_FLL_CONFIG_FLL_MULT, SRSS->CLK_FLL_CONFIG);
|
||||
refDiv = _FLD2VAL(SRSS_CLK_FLL_CONFIG2_FLL_REF_DIV, SRSS->CLK_FLL_CONFIG2);
|
||||
outputDiv = _FLD2VAL(SRSS_CLK_FLL_CONFIG_FLL_OUTPUT_DIV, SRSS->CLK_FLL_CONFIG) + 1UL;
|
||||
|
||||
pathFreqHz = ((srcFreqHz / refDiv) * fllMult) / outputDiv;
|
||||
}
|
||||
else
|
||||
{
|
||||
pathFreqHz = srcFreqHz;
|
||||
}
|
||||
}
|
||||
else if ((rootPath == 1UL) || (rootPath == 2UL))
|
||||
{
|
||||
/* PLL */
|
||||
bool pllLocked = ( 0UL != _FLD2VAL(SRSS_CLK_PLL_STATUS_LOCKED, SRSS->CLK_PLL_STATUS[rootPath - 1UL]));
|
||||
bool pllOutputOutput = ( 3UL == _FLD2VAL(SRSS_CLK_PLL_CONFIG_BYPASS_SEL, SRSS->CLK_PLL_CONFIG[rootPath - 1UL]));
|
||||
bool pllOutputAuto = ((0UL == _FLD2VAL(SRSS_CLK_PLL_CONFIG_BYPASS_SEL, SRSS->CLK_PLL_CONFIG[rootPath - 1UL])) ||
|
||||
(1UL == _FLD2VAL(SRSS_CLK_PLL_CONFIG_BYPASS_SEL, SRSS->CLK_PLL_CONFIG[rootPath - 1UL])));
|
||||
if ((pllOutputAuto && pllLocked) || pllOutputOutput)
|
||||
{
|
||||
uint32_t feedbackDiv;
|
||||
uint32_t referenceDiv;
|
||||
uint32_t outputDiv;
|
||||
|
||||
feedbackDiv = _FLD2VAL(SRSS_CLK_PLL_CONFIG_FEEDBACK_DIV, SRSS->CLK_PLL_CONFIG[rootPath - 1UL]);
|
||||
referenceDiv = _FLD2VAL(SRSS_CLK_PLL_CONFIG_REFERENCE_DIV, SRSS->CLK_PLL_CONFIG[rootPath - 1UL]);
|
||||
outputDiv = _FLD2VAL(SRSS_CLK_PLL_CONFIG_OUTPUT_DIV, SRSS->CLK_PLL_CONFIG[rootPath - 1UL]);
|
||||
|
||||
pathFreqHz = ((srcFreqHz * feedbackDiv) / referenceDiv) / outputDiv;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
pathFreqHz = srcFreqHz;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Direct */
|
||||
pathFreqHz = srcFreqHz;
|
||||
}
|
||||
|
||||
/* Get frequency after hf_clk pre-divider */
|
||||
pathFreqHz = pathFreqHz >> _FLD2VAL(SRSS_CLK_ROOT_SELECT_ROOT_DIV, SRSS->CLK_ROOT_SELECT[0u]);
|
||||
cy_Hfclk0FreqHz = pathFreqHz;
|
||||
|
||||
/* Fast Clock Divider */
|
||||
fastClkDiv = 1u + _FLD2VAL(CPUSS_CM4_CLOCK_CTL_FAST_INT_DIV, CPUSS->CM4_CLOCK_CTL);
|
||||
|
||||
/* Peripheral Clock Divider */
|
||||
periClkDiv = 1u + _FLD2VAL(CPUSS_CM0_CLOCK_CTL_PERI_INT_DIV, CPUSS->CM0_CLOCK_CTL);
|
||||
cy_PeriClkFreqHz = pathFreqHz / periClkDiv;
|
||||
|
||||
pathFreqHz = pathFreqHz / fastClkDiv;
|
||||
SystemCoreClock = pathFreqHz;
|
||||
|
||||
/* Sets clock frequency for Delay API */
|
||||
cy_delayFreqHz = SystemCoreClock;
|
||||
cy_delayFreqMhz = (uint8_t)((cy_delayFreqHz + CY_DELAY_1M_MINUS_1_THRESHOLD) / CY_DELAY_1M_THRESHOLD);
|
||||
cy_delayFreqKhz = (cy_delayFreqHz + CY_DELAY_1K_MINUS_1_THRESHOLD) / CY_DELAY_1K_THRESHOLD;
|
||||
cy_delay32kMs = CY_DELAY_MS_OVERFLOW_THRESHOLD * cy_delayFreqKhz;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name: Cy_SystemInitFpuEnable
|
||||
****************************************************************************//**
|
||||
*
|
||||
* Enables the FPU if it is used. The function is called from the startup file.
|
||||
*
|
||||
*******************************************************************************/
|
||||
void Cy_SystemInitFpuEnable(void)
|
||||
{
|
||||
#if defined (__FPU_USED) && (__FPU_USED == 1U)
|
||||
uint32_t interruptState;
|
||||
interruptState = Cy_SysLib_EnterCriticalSection();
|
||||
SCB->CPACR |= SCB_CPACR_CP10_CP11_ENABLE;
|
||||
__DSB();
|
||||
__ISB();
|
||||
Cy_SysLib_ExitCriticalSection(interruptState);
|
||||
#endif /* (__FPU_USED) && (__FPU_USED == 1U) */
|
||||
}
|
||||
|
||||
|
||||
#if !defined(CY_IPC_DEFAULT_CFG_DISABLE)
|
||||
/*******************************************************************************
|
||||
* Function Name: Cy_SysIpcPipeIsrCm4
|
||||
****************************************************************************//**
|
||||
*
|
||||
* This is the interrupt service routine for the system pipe.
|
||||
*
|
||||
*******************************************************************************/
|
||||
void Cy_SysIpcPipeIsrCm4(void)
|
||||
{
|
||||
Cy_IPC_Pipe_ExecuteCallback(CY_IPC_EP_CYPIPE_CM4_ADDR);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
* Function Name: Cy_MemorySymbols
|
||||
****************************************************************************//**
|
||||
*
|
||||
* The intention of the function is to declare boundaries of the memories for the
|
||||
* MDK compilers. For the rest of the supported compilers, this is done using
|
||||
* linker configuration files. The following symbols used by the cymcuelftool.
|
||||
*
|
||||
*******************************************************************************/
|
||||
#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION < 6010050)
|
||||
__asm void Cy_MemorySymbols(void)
|
||||
{
|
||||
/* Flash */
|
||||
EXPORT __cy_memory_0_start
|
||||
EXPORT __cy_memory_0_length
|
||||
EXPORT __cy_memory_0_row_size
|
||||
|
||||
/* Working Flash */
|
||||
EXPORT __cy_memory_1_start
|
||||
EXPORT __cy_memory_1_length
|
||||
EXPORT __cy_memory_1_row_size
|
||||
|
||||
/* Supervisory Flash */
|
||||
EXPORT __cy_memory_2_start
|
||||
EXPORT __cy_memory_2_length
|
||||
EXPORT __cy_memory_2_row_size
|
||||
|
||||
/* XIP */
|
||||
EXPORT __cy_memory_3_start
|
||||
EXPORT __cy_memory_3_length
|
||||
EXPORT __cy_memory_3_row_size
|
||||
|
||||
/* eFuse */
|
||||
EXPORT __cy_memory_4_start
|
||||
EXPORT __cy_memory_4_length
|
||||
EXPORT __cy_memory_4_row_size
|
||||
|
||||
/* Flash */
|
||||
__cy_memory_0_start EQU __cpp(CY_FLASH_BASE)
|
||||
__cy_memory_0_length EQU __cpp(CY_FLASH_SIZE)
|
||||
__cy_memory_0_row_size EQU 0x200
|
||||
|
||||
/* Flash region for EEPROM emulation */
|
||||
__cy_memory_1_start EQU __cpp(CY_EM_EEPROM_BASE)
|
||||
__cy_memory_1_length EQU __cpp(CY_EM_EEPROM_SIZE)
|
||||
__cy_memory_1_row_size EQU 0x200
|
||||
|
||||
/* Supervisory Flash */
|
||||
__cy_memory_2_start EQU __cpp(CY_SFLASH_BASE)
|
||||
__cy_memory_2_length EQU __cpp(CY_SFLASH_SIZE)
|
||||
__cy_memory_2_row_size EQU 0x200
|
||||
|
||||
/* XIP */
|
||||
__cy_memory_3_start EQU __cpp(CY_XIP_BASE)
|
||||
__cy_memory_3_length EQU __cpp(CY_XIP_SIZE)
|
||||
__cy_memory_3_row_size EQU 0x200
|
||||
|
||||
/* eFuse */
|
||||
__cy_memory_4_start EQU __cpp(0x90700000)
|
||||
__cy_memory_4_length EQU __cpp(0x100000)
|
||||
__cy_memory_4_row_size EQU __cpp(1)
|
||||
}
|
||||
#endif /* defined (__ARMCC_VERSION) && (__ARMCC_VERSION < 6010050) */
|
||||
|
||||
|
||||
/* [] END OF FILE */
|
|
@ -1,85 +0,0 @@
|
|||
/*
|
||||
* mbed Microcontroller Library
|
||||
* Copyright (c) 2017-2018 Future Electronics
|
||||
* Copyright (c) 2019 Cypress Semiconductor Corporation
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file defines hardware resources reserved by device-generated code. These
|
||||
* resources are accessed directly by the Peripheral Driver library (PDL).
|
||||
*
|
||||
* There are four classes of resources that must be declared here:
|
||||
* 1 CYCFG_ASSIGNED_PORTS macro defines which ports and pins are reserved.
|
||||
* You define these as a colon separated list of ports and pins reserved
|
||||
* using macro SRM_PORT(port_num, pins), once for each reserved port.
|
||||
* SRM_PORT macro arguments are port number (in the range 0 ... 14) and
|
||||
* pins, which is a hex value with a bit set for each reserved pin on a port.
|
||||
*
|
||||
* 2 CYCFG_ASSIGNED_DIVIDERS macro defines which clock dividers are reserved.
|
||||
* You define these as a colon separated list of dividers reserved
|
||||
* using macro SRM_DIVIDER(type, reservations), once for each required
|
||||
* divider type.
|
||||
* SRM_DIVIDER arguments are divider type (one of cy_en_divider_types_t
|
||||
* values) and reservations, which is a hex mask value with a bit set for
|
||||
* each reserved divider of a given type.
|
||||
*
|
||||
* 3 CYCFG_ASSIGNED_SCBS macro defines which SCB blocks are reserved.
|
||||
* You define these as a colon separated list of SCBs reserved using
|
||||
* macro SRM_SCB(n), which argument is SCB number in a range 0 ... 7.
|
||||
*
|
||||
* 4 CYCFG_ASSIGNED_TCPWM macro defines which TCPWM blocks are reserved.
|
||||
* You define these as a colon separated list of TCPWMs reserved using
|
||||
* macro SRM_TCPWM(n), which argument is TCPWM number in a range 0 ... 31.
|
||||
*
|
||||
* Examples:
|
||||
* #define CYCFG_ASSIGNED_PORTS SRM_PORT(0, 0x30), SRM_PORT(5, 0x03)
|
||||
*
|
||||
* #define CYCFG_ASSIGNED_DIVIDERS SRM_DIVIDER(CY_SYSCLK_DIV_8_BIT, 0x01)
|
||||
*
|
||||
* #define CYCFG_ASSIGNED_SCBS SRM_SCB(2)
|
||||
*
|
||||
* #define CYCFG_ASSIGNED_TCPWMS
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/* P0_0 and P0_1 reserved for WCO,
|
||||
* P1_0 reserved for CSD TX,
|
||||
* P2_0 ... P2_5 reserved for SDHC
|
||||
* P6-4, P6-6 and P6_7 reserved for SWD,
|
||||
* P7_1, P7_2 and P7_7 reserved for CSD Capacitors
|
||||
* P8_1 ... P8_7 reserved for CSD Buttons
|
||||
* P11_2 ... P11_7 reserved for QSPI
|
||||
* P14_0 ... P14_1 reserved for USB
|
||||
*/
|
||||
#define CYCFG_ASSIGNED_PORTS SRM_PORT(0, 0x03), SRM_PORT(1, 0x01),\
|
||||
SRM_PORT(2, 0x3f), SRM_PORT(6, 0xd0),\
|
||||
SRM_PORT(7, 0x86), SRM_PORT(8, 0xfe),\
|
||||
SRM_PORT(11, 0xfc), SRM_PORT(14, 0x03)
|
||||
|
||||
/*
|
||||
* 8-bit divider 4 reserved for CSD
|
||||
* 16-bit divider 0 reserved for USB
|
||||
*/
|
||||
#define CYCFG_ASSIGNED_DIVIDERS SRM_DIVIDER(CY_SYSCLK_DIV_8_BIT, 0x10), \
|
||||
SRM_DIVIDER(CY_SYSCLK_DIV_16_BIT, 0x01)
|
||||
|
||||
#define CYCFG_ASSIGNED_SCBS
|
||||
|
||||
#define CYCFG_ASSIGNED_TCPWMS
|
||||
|
||||
/* End of File */
|
|
@ -1,7 +0,0 @@
|
|||
README for PSoC 6 Cortex M0+ PSA target
|
||||
=======================================
|
||||
|
||||
Please note that this is still in active development, and that a bootloader
|
||||
component is still planned to be added. Because of that when using it refrain
|
||||
from using 256KB at the Flash end to allow for room for the additional
|
||||
components to be added in the future.
|
File diff suppressed because it is too large
Load Diff
|
@ -1,166 +0,0 @@
|
|||
/* mbed Microcontroller Library
|
||||
*
|
||||
* \copyright
|
||||
|
||||
* (c) 2018, Cypress Semiconductor Corporation
|
||||
* or a subsidiary of Cypress Semiconductor Corporation. All rights
|
||||
* reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef _CYPROTECTION_H_
|
||||
#define _CYPROTECTION_H_
|
||||
|
||||
#include "cy_prot.h"
|
||||
|
||||
#define MPU_SMPU_SUBREGIONS_NUMB (8u)
|
||||
/* MPU is not used yet */
|
||||
#define CPUSS_PROT_MPU_STRUCT_NR (0u)
|
||||
|
||||
#define CPUSS_PROT_PPU_GR_STRUCT_NR (16u)
|
||||
#define CPUSS_PROT_PPU_PROG_STRUCT_NR (16u)
|
||||
#define CPUSS_PROT_PPU_FX_SL_STRUCT_NR (16u)
|
||||
#define CPUSS_PROT_PPU_FX_RG_STRUCT_NR (29u)
|
||||
|
||||
#define CPUSS_PROT_PPU_FX_RG_START_ADDR (0x40201000UL)
|
||||
|
||||
#define PRIVILEGED_MODE (1u)
|
||||
#define UNPRIVILEGED_MODE (0u)
|
||||
#define NONSECURE_MODE (1u)
|
||||
#define SECURE_MODE (0u)
|
||||
|
||||
/* PPU Group existing bitmask - 11001011111 */
|
||||
#define PERI_PPU_GR_MMIO_EXIST_BITMASK 0x65F
|
||||
/* PPU MMIO1 Group Fixed Region existing bitmask - 10 */
|
||||
#define PERI_PPU_GR_MMIO1_EXIST_BITMASK 0x2
|
||||
/* PPU MMIO2 Group Fixed Region existing bitmask - 11001111111111 */
|
||||
#define PERI_PPU_GR_MMIO2_EXIST_BITMASK 0x33FF
|
||||
/* PPU MMIO3 Group Fixed Region existing bitmask - 1111101111111 */
|
||||
#define PERI_PPU_GR_MMIO3_EXIST_BITMASK 0x1F7F
|
||||
/* PPU MMIO4 Group Fixed Region existing bitmask - 101 */
|
||||
#define PERI_PPU_GR_MMIO4_EXIST_BITMASK 0x5
|
||||
/* PPU MMIO6 Group Fixed Region existing bitmask - 1111111111 */
|
||||
#define PERI_PPU_GR_MMIO6_EXIST_BITMASK 0x3FF
|
||||
/* PPU MMIO9 Group Fixed Region existing bitmask - 11 */
|
||||
#define PERI_PPU_GR_MMIO9_EXIST_BITMASK 0x3
|
||||
/* PPU MMIO10 Group Fixed Region existing bitmask - 111 */
|
||||
#define PERI_PPU_GR_MMIO10_EXIST_BITMASK 0x7
|
||||
|
||||
|
||||
/* TODO: There is no SWPU configuration part */
|
||||
typedef struct {
|
||||
uint32_t* address; /**< Base address of the memory region (Only applicable to slave) */
|
||||
cy_en_prot_size_t regionSize; /**< Size of the memory region (Only applicable to slave) */
|
||||
uint8_t subregions; /**< Mask of the 8 subregions to disable (Only applicable to slave) */
|
||||
cy_en_prot_perm_t userPermission; /**< User permissions for the region */
|
||||
cy_en_prot_perm_t privPermission; /**< Privileged permissions for the region */
|
||||
bool secure; /**< Non Secure = 0, Secure = 1 */
|
||||
bool pcMatch; /**< Access evaluation = 0, Matching = 1 */
|
||||
uint16_t pcMask; /**< Mask of allowed protection context(s) */
|
||||
PROT_SMPU_SMPU_STRUCT_Type* prot_region; /* protection region */
|
||||
cy_en_prot_perm_t userMstPermission; /**< User permissions for the region */
|
||||
cy_en_prot_perm_t privMstPermission; /**< Privileged permissions for the region */
|
||||
uint16_t pcMstMask; /**< Master Mask of allowed protection context(s) */
|
||||
} cy_smpu_region_config_t;
|
||||
|
||||
/*
|
||||
* See Cy_Prot_ConfigBusMaster function description for parameters meaning
|
||||
*
|
||||
* act_pcMask specifies active PC for Cy_Prot_SetActivePC function
|
||||
*/
|
||||
typedef struct {
|
||||
en_prot_master_t busMaster;
|
||||
bool privileged;
|
||||
bool secure;
|
||||
uint32_t pcMask;
|
||||
uint32_t act_pc;
|
||||
} cy_bus_master_config_t;
|
||||
|
||||
/** Configuration structure for Fixed Group (GR) PPU (PPU_GR) struct initialization */
|
||||
typedef struct
|
||||
{
|
||||
cy_en_prot_perm_t userPermission; /**< User permissions for the region */
|
||||
cy_en_prot_perm_t privPermission; /**< Privileged permissions for the region */
|
||||
bool secure; /**< Non Secure = 0, Secure = 1 */
|
||||
bool pcMatch; /**< Access evaluation = 0, Matching = 1 */
|
||||
uint16_t pcMask; /**< Mask of allowed protection context(s) */
|
||||
cy_en_prot_perm_t userMstPermission; /**< Master User permissions for the region */
|
||||
cy_en_prot_perm_t privMstPermission; /**< Master Privileged permissions for the region */
|
||||
bool secureMst; /**< Non Secure = 0, Secure = 1 Master */
|
||||
uint16_t pcMstMask; /**< Master Mask of allowed protection context(s) */
|
||||
PERI_PPU_GR_Type *pPpuStr; /**< Ppu structure address */
|
||||
} cy_ppu_fixed_gr_cfg_t;
|
||||
/** Configuration structure for Fixed Region (RG) PPU (PPU_RG) struct initialization */
|
||||
typedef struct
|
||||
{
|
||||
cy_en_prot_perm_t userPermission; /**< User permissions for the region */
|
||||
cy_en_prot_perm_t privPermission; /**< Privileged permissions for the region */
|
||||
bool secure; /**< Non Secure = 0, Secure = 1 */
|
||||
bool pcMatch; /**< Access evaluation = 0, Matching = 1 */
|
||||
uint16_t pcMask; /**< Mask of allowed protection context(s) */
|
||||
cy_en_prot_perm_t userMstPermission; /**< Master User permissions for the region */
|
||||
cy_en_prot_perm_t privMstPermission; /**< Master Privileged permissions for the region */
|
||||
bool secureMst; /**< Non Secure = 0, Secure = 1 Master */
|
||||
uint16_t pcMstMask; /**< Master Mask of allowed protection context(s) */
|
||||
PERI_GR_PPU_RG_Type *pPpuStr; /**< Ppu structure address */
|
||||
} cy_ppu_fixed_rg_cfg_t;
|
||||
/** Configuration structure for Fixed Slave (SL) PPU (PPU_SL) struct initialization */
|
||||
typedef struct
|
||||
{
|
||||
cy_en_prot_perm_t userPermission; /**< User permissions for the region */
|
||||
cy_en_prot_perm_t privPermission; /**< Privileged permissions for the region */
|
||||
bool secure; /**< Non Secure = 0, Secure = 1 */
|
||||
bool pcMatch; /**< Access evaluation = 0, Matching = 1 */
|
||||
uint16_t pcMask; /**< Mask of allowed protection context(s) */
|
||||
cy_en_prot_perm_t userMstPermission; /**< Master User permissions for the region */
|
||||
cy_en_prot_perm_t privMstPermission; /**< Master Privileged permissions for the region */
|
||||
bool secureMst; /**< Non Secure = 0, Secure = 1 Master */
|
||||
uint16_t pcMstMask; /**< Master Mask of allowed protection context(s) */
|
||||
PERI_GR_PPU_SL_Type *pPpuStr; /**< Ppu structure address */
|
||||
} cy_ppu_fixed_sl_cfg_t;
|
||||
|
||||
/** Configuration structure for Programmable (PROG) PPU (PPU_PR) struct initialization */
|
||||
typedef struct
|
||||
{
|
||||
uint32_t* address; /**< Base address of the memory region (Only applicable to slave) */
|
||||
cy_en_prot_size_t regionSize; /**< Size of the memory region (Only applicable to slave) */
|
||||
uint8_t subregions; /**< Mask of the 8 subregions to disable (Only applicable to slave) */
|
||||
cy_en_prot_perm_t userPermission; /**< User permissions for the region */
|
||||
cy_en_prot_perm_t privPermission; /**< Privileged permissions for the region */
|
||||
bool secure; /**< Non Secure = 0, Secure = 1 */
|
||||
bool pcMatch; /**< Access evaluation = 0, Matching = 1 */
|
||||
uint16_t pcMask; /**< Mask of allowed protection context(s) */
|
||||
cy_en_prot_perm_t userMstPermission; /**< Master User permissions for the region */
|
||||
cy_en_prot_perm_t privMstPermission; /**< Master Privileged permissions for the region */
|
||||
bool secureMst; /**< Non Secure = 0, Secure = 1 Master */
|
||||
uint16_t pcMstMask; /**< Master Mask of allowed protection context(s) */
|
||||
PERI_PPU_PR_Type *pPpuStr; /**< Ppu structure address */
|
||||
} cy_ppu_prog_cfg_t;
|
||||
|
||||
cy_en_prot_status_t smpu_protect(cy_smpu_region_config_t smpu_config_arr[], uint32_t arr_length);
|
||||
cy_en_prot_status_t smpu_config_unprotected(const cy_stc_smpu_cfg_t *smpu_config);
|
||||
cy_en_prot_status_t ppu_fixed_rg_protect(cy_ppu_fixed_rg_cfg_t ppu_config_arr[], uint32_t arr_length);
|
||||
cy_en_prot_status_t ppu_fixed_sl_protect(cy_ppu_fixed_sl_cfg_t ppu_config_arr[], uint32_t arr_length);
|
||||
cy_en_prot_status_t ppu_prog_protect(cy_ppu_prog_cfg_t ppu_config_arr[], uint32_t arr_length);
|
||||
cy_en_prot_status_t ppu_fixed_gr_protect(cy_ppu_fixed_gr_cfg_t ppu_config_arr[], uint32_t arr_length);
|
||||
cy_en_prot_status_t bus_masters_protect(cy_bus_master_config_t bus_masters_config_arr[], uint32_t arr_length);
|
||||
|
||||
uint8_t isPeripheralAccessAllowed(uint32_t perStartAddr, uint32_t perSize,
|
||||
uint8_t privModeFlag, uint8_t nsecureFlag, enum cy_en_prot_pc_t protectionCtx, cy_en_prot_perm_t accessType);
|
||||
uint8_t isMemoryAccessAllowed(uint32_t memStartAddr, uint32_t memSize,
|
||||
uint8_t privModeFlag, uint8_t nsecureFlag, enum cy_en_prot_pc_t protectionCtx, cy_en_prot_perm_t accessType);
|
||||
|
||||
#endif /* _CYPROTECTION_H_ */
|
File diff suppressed because it is too large
Load Diff
|
@ -1,100 +0,0 @@
|
|||
/* Copyright (c) 2017-2018 ARM Limited
|
||||
* Copyright 2018-2019 Cypress Semiconductor Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
/* -------------------------------------- Includes ----------------------------------- */
|
||||
|
||||
#include "spm_api.h"
|
||||
#include "cy_sysint.h"
|
||||
#include "spm_internal.h"
|
||||
|
||||
#ifdef PU_ENABLE
|
||||
#include "cyprotection_config.h"
|
||||
#endif // PU_ENABLE
|
||||
|
||||
|
||||
/* -------------------------------------- HAL API ------------------------------------ */
|
||||
|
||||
// These implementations are meant to be used only for SPM running on PSoC6 M0+ core.
|
||||
|
||||
void spm_hal_start_nspe(void)
|
||||
{
|
||||
Cy_SysEnableCM4(PSA_NON_SECURE_ROM_START);
|
||||
}
|
||||
|
||||
void spm_hal_memory_protection_init(void)
|
||||
{
|
||||
#ifdef PU_ENABLE
|
||||
cy_en_prot_status_t status = CY_PROT_SUCCESS;
|
||||
|
||||
/* smpu */
|
||||
status = smpu_protect((cy_smpu_region_config_t *)flash_spm_smpu_config, sizeof(flash_spm_smpu_config) / sizeof(flash_spm_smpu_config[0]));
|
||||
CY_ASSERT(status == CY_PROT_SUCCESS); // TODO: Panic instead
|
||||
status = smpu_protect((cy_smpu_region_config_t *)sram_spm_smpu_config, sizeof(sram_spm_smpu_config) / sizeof(sram_spm_smpu_config[0]));
|
||||
CY_ASSERT(status == CY_PROT_SUCCESS); // TODO: Panic instead
|
||||
status = smpu_config_unprotected(&default_smpu_master_config);
|
||||
CY_ASSERT(status == CY_PROT_SUCCESS); // TODO: Panic instead
|
||||
|
||||
/* fixed region ppu */
|
||||
#ifndef INITIAL_ROT_PROTECTION_AVAILABLE
|
||||
status = ppu_fixed_rg_protect((cy_ppu_fixed_rg_cfg_t *)fixed_rg_pc0_ppu_config, sizeof(fixed_rg_pc0_ppu_config) / sizeof(fixed_rg_pc0_ppu_config[0]));
|
||||
CY_ASSERT(status == CY_PROT_SUCCESS); // TODO: Panic instead
|
||||
#endif /* INITIAL_ROT_PROTECTION_AVAILABLE */
|
||||
#ifndef INITIAL_PROTECTION_AVAILABLE
|
||||
status = ppu_fixed_rg_protect((cy_ppu_fixed_rg_cfg_t *)fixed_rg_spm_ppu_config, sizeof(fixed_rg_spm_ppu_config) / sizeof(fixed_rg_spm_ppu_config[0]));
|
||||
CY_ASSERT(status == CY_PROT_SUCCESS); // TODO: Panic instead
|
||||
#endif /* INITIAL_PROTECTION_AVAILABLE */
|
||||
status = ppu_fixed_rg_protect((cy_ppu_fixed_rg_cfg_t *)fixed_rg_any_ppu_config, sizeof(fixed_rg_any_ppu_config) / sizeof(fixed_rg_any_ppu_config[0]));
|
||||
CY_ASSERT(status == CY_PROT_SUCCESS); // TODO: Panic instead
|
||||
/* fixed slave ppu */
|
||||
#ifndef INITIAL_ROT_PROTECTION_AVAILABLE
|
||||
status = ppu_fixed_sl_protect((cy_ppu_fixed_sl_cfg_t *)fixed_sl_pc0_ppu_config, sizeof(fixed_sl_pc0_ppu_config) / sizeof(fixed_sl_pc0_ppu_config[0]));
|
||||
CY_ASSERT(status == CY_PROT_SUCCESS); // TODO: Panic instead
|
||||
#endif /* INITIAL_ROT_PROTECTION_AVAILABLE */
|
||||
#ifndef INITIAL_PROTECTION_AVAILABLE
|
||||
status = ppu_fixed_sl_protect((cy_ppu_fixed_sl_cfg_t *)fixed_sl_spm_ppu_config, sizeof(fixed_sl_spm_ppu_config) / sizeof(fixed_sl_spm_ppu_config[0]));
|
||||
CY_ASSERT(status == CY_PROT_SUCCESS); // TODO: Panic instead
|
||||
#endif /* INITIAL_PROTECTION_AVAILABLE */
|
||||
status = ppu_fixed_sl_protect((cy_ppu_fixed_sl_cfg_t *)fixed_sl_any_ppu_config, sizeof(fixed_sl_any_ppu_config) / sizeof(fixed_sl_any_ppu_config[0]));
|
||||
CY_ASSERT(status == CY_PROT_SUCCESS); // TODO: Panic instead
|
||||
/* programmable ppu */
|
||||
#ifndef INITIAL_ROT_PROTECTION_AVAILABLE
|
||||
status = ppu_prog_protect((cy_ppu_prog_cfg_t *)prog_pc0_ppu_config, sizeof(prog_pc0_ppu_config) / sizeof(prog_pc0_ppu_config[0]));
|
||||
CY_ASSERT(status == CY_PROT_SUCCESS); // TODO: Panic instead
|
||||
#endif /* INITIAL_ROT_PROTECTION_AVAILABLE */
|
||||
#ifndef INITIAL_PROTECTION_AVAILABLE
|
||||
status = ppu_prog_protect((cy_ppu_prog_cfg_t *)prog_spm_ppu_config, sizeof(prog_spm_ppu_config) / sizeof(prog_spm_ppu_config[0]));
|
||||
CY_ASSERT(status == CY_PROT_SUCCESS); // TODO: Panic instead
|
||||
#endif /* INITIAL_PROTECTION_AVAILABLE */
|
||||
/* fixed group ppu */
|
||||
#ifndef INITIAL_ROT_PROTECTION_AVAILABLE
|
||||
status = ppu_fixed_gr_protect((cy_ppu_fixed_gr_cfg_t *)fixed_gr_pc0_ppu_config, sizeof(fixed_gr_pc0_ppu_config) / sizeof(fixed_gr_pc0_ppu_config[0]));
|
||||
CY_ASSERT(status == CY_PROT_SUCCESS); // TODO: Panic instead
|
||||
#endif /* INITIAL_ROT_PROTECTION_AVAILABLE */
|
||||
#ifndef INITIAL_PROTECTION_AVAILABLE
|
||||
status = ppu_fixed_gr_protect((cy_ppu_fixed_gr_cfg_t *)fixed_gr_spm_ppu_config, sizeof(fixed_gr_spm_ppu_config) / sizeof(fixed_gr_spm_ppu_config[0]));
|
||||
CY_ASSERT(status == CY_PROT_SUCCESS); // TODO: Panic instead
|
||||
#endif /* INITIAL_PROTECTION_AVAILABLE */
|
||||
|
||||
/* bus masters */
|
||||
#ifndef INITIAL_ROT_PROTECTION_AVAILABLE
|
||||
status = bus_masters_protect((cy_bus_master_config_t *)bus_masters_config, sizeof(bus_masters_config) / sizeof(bus_masters_config[0]));
|
||||
CY_ASSERT(status == CY_PROT_SUCCESS); // TODO: Panic instead
|
||||
#endif /* INITIAL_PROTECTION_AVAILABLE */
|
||||
#endif /* PU_ENABLE */
|
||||
}
|
|
@ -1,119 +0,0 @@
|
|||
/* Copyright (c) 2017-2018 ARM Limited
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
/* -------------------------------------- Includes ----------------------------------- */
|
||||
|
||||
#include "spm_api.h"
|
||||
#include "device.h"
|
||||
#include "cyip_ipc.h"
|
||||
#include "cy_ipc_drv.h"
|
||||
#include "cy_syslib.h"
|
||||
#include "cy_sysint.h"
|
||||
#include "psoc6_utils.h"
|
||||
#include "mbed_error.h"
|
||||
|
||||
#if (CY_CPU_CORTEX_M0P)
|
||||
#include "device.h"
|
||||
#include "psoc6_utils.h"
|
||||
#include "mbed_error.h"
|
||||
#endif /* (CY_CPU_CORTEX_M0P) */
|
||||
|
||||
|
||||
|
||||
/* ------------------------------------ Definitions ---------------------------------- */
|
||||
|
||||
#define SPM_IPC_CHANNEL 8u
|
||||
#define SPM_IPC_NOTIFY_CM0P_INTR (CY_IPC_INTR_SPARE + 2) // CM4 to CM0+ notify interrupt number
|
||||
#define SPM_IPC_NOTIFY_CM4_INTR (CY_IPC_INTR_SPARE + 1) // CM0+ to CM4 notify interrupt number
|
||||
|
||||
|
||||
|
||||
/* ---------------------------------- Static Globals --------------------------------- */
|
||||
|
||||
static IPC_STRUCT_Type *ipc_channel_handle;
|
||||
static IPC_INTR_STRUCT_Type *ipc_interrupt_ptr;
|
||||
|
||||
|
||||
|
||||
/* ------------------------ Platform's Functions Implementation ---------------------- */
|
||||
|
||||
void ipc_interrupt_handler(void)
|
||||
{
|
||||
// Call ARM's interrupt handler
|
||||
spm_mailbox_irq_callback();
|
||||
|
||||
// Clear the interrupt and make a dummy read to avoid double interrupt occurrence:
|
||||
// - The double interrupt’s triggering is caused by buffered write operations on bus
|
||||
// - The dummy read of the status register is indeed required to make sure previous write completed before leaving ISR
|
||||
// Note: This is a direct clear using the IPC interrupt register and not clear of an NVIC register
|
||||
Cy_IPC_Drv_ClearInterrupt(ipc_interrupt_ptr, CY_IPC_NO_NOTIFICATION, (1uL << SPM_IPC_CHANNEL));
|
||||
}
|
||||
|
||||
void mailbox_init(void)
|
||||
{
|
||||
// Interrupts configuration
|
||||
// * See ce216795_common.h for occupied interrupts
|
||||
// -----------------------------------------------
|
||||
|
||||
// Configure interrupts ISR / MUX and priority
|
||||
cy_stc_sysint_t ipc_intr_Config;
|
||||
|
||||
#if (CY_CPU_CORTEX_M4)
|
||||
ipc_intr_Config.intrSrc = (IRQn_Type)cpuss_interrupts_ipc_0_IRQn + SPM_IPC_NOTIFY_CM4_INTR;
|
||||
ipc_intr_Config.intrPriority = 1;
|
||||
#else
|
||||
ipc_intr_Config.intrSrc = CY_M0_CORE_IRQ_CHANNEL_PSA_MAILBOX;
|
||||
ipc_intr_Config.cm0pSrc = (cy_en_intr_t)cpuss_interrupts_ipc_0_IRQn + SPM_IPC_NOTIFY_CM0P_INTR; // Must match the interrupt we trigger using NOTIFY on CM4
|
||||
ipc_intr_Config.intrPriority = 1;
|
||||
if (cy_m0_nvic_reserve_channel(CY_M0_CORE_IRQ_CHANNEL_PSA_MAILBOX, CY_PSA_MAILBOX_IRQN_ID) == (IRQn_Type)(-1)) {
|
||||
error("PSA SPM Mailbox NVIC channel reservation conflict.");
|
||||
}
|
||||
#endif /* (CY_CPU_CORTEX_M4) */
|
||||
|
||||
(void)Cy_SysInt_Init(&ipc_intr_Config, ipc_interrupt_handler);
|
||||
|
||||
// Set specific NOTIFY interrupt mask only.
|
||||
// Only the interrupt sources with their masks enabled can trigger the interrupt.
|
||||
#if (CY_CPU_CORTEX_M4)
|
||||
ipc_interrupt_ptr = Cy_IPC_Drv_GetIntrBaseAddr(SPM_IPC_NOTIFY_CM4_INTR);
|
||||
#else
|
||||
ipc_interrupt_ptr = Cy_IPC_Drv_GetIntrBaseAddr(SPM_IPC_NOTIFY_CM0P_INTR);
|
||||
#endif /* (CY_CPU_CORTEX_M4) */
|
||||
CY_ASSERT(ipc_interrupt_ptr != NULL);
|
||||
Cy_IPC_Drv_SetInterruptMask(ipc_interrupt_ptr, 0x0, 1 << SPM_IPC_CHANNEL);
|
||||
|
||||
// Enable the interrupt
|
||||
NVIC_EnableIRQ(ipc_intr_Config.intrSrc);
|
||||
|
||||
ipc_channel_handle = Cy_IPC_Drv_GetIpcBaseAddress(SPM_IPC_CHANNEL);
|
||||
CY_ASSERT(ipc_channel_handle != NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* -------------------------------------- HAL API ------------------------------------ */
|
||||
|
||||
void spm_hal_mailbox_notify(void)
|
||||
{
|
||||
CY_ASSERT(ipc_channel_handle != NULL);
|
||||
#if (CY_CPU_CORTEX_M4)
|
||||
Cy_IPC_Drv_AcquireNotify(ipc_channel_handle, (1uL << SPM_IPC_NOTIFY_CM0P_INTR));
|
||||
#else
|
||||
Cy_IPC_Drv_AcquireNotify(ipc_channel_handle, (1uL << SPM_IPC_NOTIFY_CM4_INTR));
|
||||
#endif /* (CY_CPU_CORTEX_M4) */
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
Permissive Binary License
|
||||
|
||||
Version 1.0, December 2018
|
||||
|
||||
Redistribution. Redistribution and use in binary form, without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
1) Redistributions must reproduce the above copyright notice and the
|
||||
following disclaimer in the documentation and/or other materials
|
||||
provided with the distribution.
|
||||
|
||||
2) Unless to the extent explicitly permitted by law, no reverse
|
||||
engineering, decompilation, or disassembly of this software is
|
||||
permitted.
|
||||
|
||||
3) Redistribution as part of a software development kit must include the
|
||||
accompanying file named DEPENDENCIES and any dependencies listed in
|
||||
that file.
|
||||
|
||||
4) 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.
|
||||
|
||||
Limited patent license. The copyright holders (and contributors) grant a
|
||||
worldwide, non-exclusive, no-charge, royalty-free patent license to
|
||||
make, have made, use, offer to sell, sell, import, and otherwise
|
||||
transfer this software, where such license applies only to those patent
|
||||
claims licensable by the copyright holders (and contributors) that are
|
||||
necessarily infringed by this software. This patent license shall not
|
||||
apply to any combinations that include this software. No hardware is
|
||||
licensed hereunder.
|
||||
|
||||
If you institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the software
|
||||
itself infringes your patent(s), then your rights granted under this
|
||||
license shall terminate as of the date such litigation is filed.
|
||||
|
||||
DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
CONTRIBUTORS "AS IS." 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
|
||||
HOLDERS 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.
|
|
@ -1,12 +0,0 @@
|
|||
|
||||
This directory tree contains Secure images released under Permissive Binary License.
|
||||
|
||||
Build by mbed-cli using GNU Arm Embedded - version 6.3.1
|
||||
|
||||
These images were compiled by the following command:
|
||||
|
||||
```
|
||||
python tools/psa/release.py -m CY8CKIT_062_WIFI_BT_M0_PSA
|
||||
```
|
||||
|
||||
To update the prebuilt binaries run the previous commands.
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,119 +0,0 @@
|
|||
/* Copyright (c) 2017-2018 ARM Limited
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
/* -------------------------------------- Includes ----------------------------------- */
|
||||
|
||||
#include "spm_api.h"
|
||||
#include "device.h"
|
||||
#include "cyip_ipc.h"
|
||||
#include "cy_ipc_drv.h"
|
||||
#include "cy_syslib.h"
|
||||
#include "cy_sysint.h"
|
||||
#include "psoc6_utils.h"
|
||||
#include "mbed_error.h"
|
||||
|
||||
#if (CY_CPU_CORTEX_M0P)
|
||||
#include "device.h"
|
||||
#include "psoc6_utils.h"
|
||||
#include "mbed_error.h"
|
||||
#endif /* (CY_CPU_CORTEX_M0P) */
|
||||
|
||||
|
||||
|
||||
/* ------------------------------------ Definitions ---------------------------------- */
|
||||
|
||||
#define SPM_IPC_CHANNEL 8u
|
||||
#define SPM_IPC_NOTIFY_CM0P_INTR (CY_IPC_INTR_SPARE + 2) // CM4 to CM0+ notify interrupt number
|
||||
#define SPM_IPC_NOTIFY_CM4_INTR (CY_IPC_INTR_SPARE + 1) // CM0+ to CM4 notify interrupt number
|
||||
|
||||
|
||||
|
||||
/* ---------------------------------- Static Globals --------------------------------- */
|
||||
|
||||
static IPC_STRUCT_Type *ipc_channel_handle;
|
||||
static IPC_INTR_STRUCT_Type *ipc_interrupt_ptr;
|
||||
|
||||
|
||||
|
||||
/* ------------------------ Platform's Functions Implementation ---------------------- */
|
||||
|
||||
void ipc_interrupt_handler(void)
|
||||
{
|
||||
// Call ARM's interrupt handler
|
||||
spm_mailbox_irq_callback();
|
||||
|
||||
// Clear the interrupt and make a dummy read to avoid double interrupt occurrence:
|
||||
// - The double interrupt’s triggering is caused by buffered write operations on bus
|
||||
// - The dummy read of the status register is indeed required to make sure previous write completed before leaving ISR
|
||||
// Note: This is a direct clear using the IPC interrupt register and not clear of an NVIC register
|
||||
Cy_IPC_Drv_ClearInterrupt(ipc_interrupt_ptr, CY_IPC_NO_NOTIFICATION, (1uL << SPM_IPC_CHANNEL));
|
||||
}
|
||||
|
||||
void mailbox_init(void)
|
||||
{
|
||||
// Interrupts configuration
|
||||
// * See ce216795_common.h for occupied interrupts
|
||||
// -----------------------------------------------
|
||||
|
||||
// Configure interrupts ISR / MUX and priority
|
||||
cy_stc_sysint_t ipc_intr_Config;
|
||||
|
||||
#if (CY_CPU_CORTEX_M4)
|
||||
ipc_intr_Config.intrSrc = (IRQn_Type)cpuss_interrupts_ipc_0_IRQn + SPM_IPC_NOTIFY_CM4_INTR;
|
||||
ipc_intr_Config.intrPriority = 1;
|
||||
#else
|
||||
ipc_intr_Config.intrSrc = CY_M0_CORE_IRQ_CHANNEL_PSA_MAILBOX;
|
||||
ipc_intr_Config.cm0pSrc = (cy_en_intr_t)cpuss_interrupts_ipc_0_IRQn + SPM_IPC_NOTIFY_CM0P_INTR; // Must match the interrupt we trigger using NOTIFY on CM4
|
||||
ipc_intr_Config.intrPriority = 1;
|
||||
if (cy_m0_nvic_reserve_channel(CY_M0_CORE_IRQ_CHANNEL_PSA_MAILBOX, CY_PSA_MAILBOX_IRQN_ID) == (IRQn_Type)(-1)) {
|
||||
error("PSA SPM Mailbox NVIC channel reservation conflict.");
|
||||
}
|
||||
#endif /* (CY_CPU_CORTEX_M4) */
|
||||
|
||||
(void)Cy_SysInt_Init(&ipc_intr_Config, ipc_interrupt_handler);
|
||||
|
||||
// Set specific NOTIFY interrupt mask only.
|
||||
// Only the interrupt sources with their masks enabled can trigger the interrupt.
|
||||
#if (CY_CPU_CORTEX_M4)
|
||||
ipc_interrupt_ptr = Cy_IPC_Drv_GetIntrBaseAddr(SPM_IPC_NOTIFY_CM4_INTR);
|
||||
#else
|
||||
ipc_interrupt_ptr = Cy_IPC_Drv_GetIntrBaseAddr(SPM_IPC_NOTIFY_CM0P_INTR);
|
||||
#endif /* (CY_CPU_CORTEX_M4) */
|
||||
CY_ASSERT(ipc_interrupt_ptr != NULL);
|
||||
Cy_IPC_Drv_SetInterruptMask(ipc_interrupt_ptr, 0x0, 1 << SPM_IPC_CHANNEL);
|
||||
|
||||
// Enable the interrupt
|
||||
NVIC_EnableIRQ(ipc_intr_Config.intrSrc);
|
||||
|
||||
ipc_channel_handle = Cy_IPC_Drv_GetIpcBaseAddress(SPM_IPC_CHANNEL);
|
||||
CY_ASSERT(ipc_channel_handle != NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* -------------------------------------- HAL API ------------------------------------ */
|
||||
|
||||
void spm_hal_mailbox_notify(void)
|
||||
{
|
||||
CY_ASSERT(ipc_channel_handle != NULL);
|
||||
#if (CY_CPU_CORTEX_M4)
|
||||
Cy_IPC_Drv_AcquireNotify(ipc_channel_handle, (1uL << SPM_IPC_NOTIFY_CM0P_INTR));
|
||||
#else
|
||||
Cy_IPC_Drv_AcquireNotify(ipc_channel_handle, (1uL << SPM_IPC_NOTIFY_CM4_INTR));
|
||||
#endif /* (CY_CPU_CORTEX_M4) */
|
||||
}
|
|
@ -8398,56 +8398,6 @@
|
|||
},
|
||||
"program_cycle_s": 10
|
||||
},
|
||||
"CY8CKIT_062_WIFI_BT_M0_PSA": {
|
||||
"inherits": ["SPE_Target", "CY8CKIT_062_WIFI_BT_M0"],
|
||||
"components_add": ["SPM_MAILBOX", "FLASHIAP"],
|
||||
"extra_labels_add": ["PSA", "MBED_SPM"],
|
||||
"macros_add": [
|
||||
"MBED_TICKLESS",
|
||||
"MBEDTLS_PSA_CRYPTO_SPM",
|
||||
"PU_ENABLE"
|
||||
],
|
||||
"deliver_to_target": "CY8CKIT_062_WIFI_BT_PSA",
|
||||
"delivery_dir": "TARGET_Cypress/TARGET_PSOC6/TARGET_CY8CKIT_062_WIFI_BT_PSA/prebuilt",
|
||||
"overrides": {
|
||||
"secure-rom-start": "0x10000000",
|
||||
"secure-rom-size": "0x40000",
|
||||
"non-secure-rom-start": "0x10040000",
|
||||
"non-secure-rom-size": "0xB8000",
|
||||
"secure-ram-start": "0x08000000",
|
||||
"secure-ram-size": "0x10000",
|
||||
"non-secure-ram-start": "0x08010000",
|
||||
"non-secure-ram-size": "0x37500",
|
||||
"shared-ram-start": "0x08047500",
|
||||
"shared-ram-size": "0x100",
|
||||
"public-ram-start": "0x08047600",
|
||||
"public-ram-size": "0x200"
|
||||
}
|
||||
},
|
||||
"CY8CKIT_062_WIFI_BT_PSA": {
|
||||
"inherits": ["NSPE_Target", "CY8CKIT_062_WIFI_BT"],
|
||||
"extra_labels_add": ["PSA", "MBED_SPM"],
|
||||
"extra_labels_remove": ["CM0P_SLEEP"],
|
||||
"components_add": ["SPM_MAILBOX", "FLASHIAP"],
|
||||
"device_has_remove": ["CRC"],
|
||||
"hex_filename": "psa_release_1.0.hex",
|
||||
"overrides": {
|
||||
"secure-rom-start": "0x10000000",
|
||||
"secure-rom-size": "0x40000",
|
||||
"non-secure-rom-start": "0x10040000",
|
||||
"non-secure-rom-size": "0xB8000",
|
||||
"secure-ram-start": "0x08000000",
|
||||
"secure-ram-size": "0x10000",
|
||||
"non-secure-ram-start": "0x08010000",
|
||||
"non-secure-ram-size": "0x37500",
|
||||
"shared-ram-start": "0x08047500",
|
||||
"shared-ram-size": "0x100",
|
||||
"public-ram-start": "0x08047600",
|
||||
"public-ram-size": "0x200"
|
||||
},
|
||||
"sectors": [[268435456, 512]],
|
||||
"bootloader_supported": true
|
||||
},
|
||||
"CY8CMOD_062_4343W": {
|
||||
"inherits": ["MCU_PSOC6_M4"],
|
||||
"features": ["BLE"],
|
||||
|
|
|
@ -136,8 +136,7 @@ class CodeBlocks(GccArm):
|
|||
'NRF51_DK': 'board/nordic_nrf51_dk.cfg',
|
||||
'FUTURE_SEQUANA': 'board/cy8ckit_062_ble.cfg',
|
||||
'FUTURE_SEQUANA_M0': 'board/cy8ckit_062_ble.cfg',
|
||||
'CY8CKIT_062_WIFI_BT': 'board/cy8ckit_062_ble.cfg',
|
||||
'CY8CKIT_062_WIFI_BT_M0': 'board/cy8ckit_062_ble.cfg'
|
||||
'CY8CKIT_062_WIFI_BT': 'board/cy8ckit_062_ble.cfg'
|
||||
}
|
||||
|
||||
if self.target in openocd_board:
|
||||
|
|
|
@ -252,16 +252,3 @@ def test_parameters_and_config_macros_to_macros():
|
|||
|
||||
macro_list = Config._parameters_and_config_macros_to_macros(params, macros)
|
||||
assert macro_list == ["CUSTOM_MACRO_NAME=1"]
|
||||
|
||||
|
||||
@pytest.mark.parametrize("target_start_size", [
|
||||
("CY8CKIT_062_WIFI_BT_PSA", 0x10040000, 0xB8000),
|
||||
("CY8CKIT_062_WIFI_BT_M0_PSA", 0x10000000, 0x40000)
|
||||
])
|
||||
def test_PSA_overrides(target_start_size):
|
||||
target, start, size = target_start_size
|
||||
set_targets_json_location()
|
||||
config = Config(target)
|
||||
roms = config.get_all_active_memories(ROM_ALL_MEMORIES)
|
||||
assert("ROM" in roms)
|
||||
assert(roms["ROM"] == [start, size])
|
||||
|
|
Loading…
Reference in New Issue