Skip to content

Commit 0e33dd7

Browse files
author
Seppo Takalo
authored
Merge pull request #11080 from kyle-cypress/pr/cy8ckit-062s2-43012
Add target for CY8CKIT_062S2_43012
2 parents 0d6a3be + 40557ce commit 0e33dd7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+12891
-0
lines changed

features/lwipstack/mbed_lib.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,20 @@
217217
"pbuf-pool-size": 48,
218218
"mem-size": 65536
219219
},
220+
"CY8CKIT_062S2_43012": {
221+
"tcpip-thread-stacksize": 8192,
222+
"default-thread-stacksize": 640,
223+
"ppp-thread-stacksize": 896,
224+
"memp-num-tcp-seg": 24,
225+
"tcp-socket-max": 10,
226+
"udp-socket-max":10,
227+
"socket-max":18,
228+
"tcp-mss": 1540,
229+
"tcp-snd-buf": "(6 * TCP_MSS)",
230+
"tcp-wnd": "(TCP_MSS * 6)",
231+
"pbuf-pool-size": 96,
232+
"mem-size": 92610
233+
},
220234
"MIMXRT1050_EVK": {
221235
"mem-size": 36560
222236
},
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*******************************************************************************
2+
* File Name: cycfg.c
3+
*
4+
* Description:
5+
* Wrapper function to initialize all generated code.
6+
* This file was automatically generated and should not be modified.
7+
*
8+
********************************************************************************
9+
* Copyright 2017-2019 Cypress Semiconductor Corporation
10+
* SPDX-License-Identifier: Apache-2.0
11+
*
12+
* Licensed under the Apache License, Version 2.0 (the "License");
13+
* you may not use this file except in compliance with the License.
14+
* You may obtain a copy of the License at
15+
*
16+
* http://www.apache.org/licenses/LICENSE-2.0
17+
*
18+
* Unless required by applicable law or agreed to in writing, software
19+
* distributed under the License is distributed on an "AS IS" BASIS,
20+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21+
* See the License for the specific language governing permissions and
22+
* limitations under the License.
23+
********************************************************************************/
24+
25+
#include "cycfg.h"
26+
27+
void init_cycfg_all(void)
28+
{
29+
init_cycfg_system();
30+
init_cycfg_clocks();
31+
init_cycfg_routing();
32+
init_cycfg_peripherals();
33+
init_cycfg_pins();
34+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/*******************************************************************************
2+
* File Name: cycfg.h
3+
*
4+
* Description:
5+
* Simple wrapper header containing all generated files.
6+
* This file was automatically generated and should not be modified.
7+
*
8+
********************************************************************************
9+
* Copyright 2017-2019 Cypress Semiconductor Corporation
10+
* SPDX-License-Identifier: Apache-2.0
11+
*
12+
* Licensed under the Apache License, Version 2.0 (the "License");
13+
* you may not use this file except in compliance with the License.
14+
* You may obtain a copy of the License at
15+
*
16+
* http://www.apache.org/licenses/LICENSE-2.0
17+
*
18+
* Unless required by applicable law or agreed to in writing, software
19+
* distributed under the License is distributed on an "AS IS" BASIS,
20+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21+
* See the License for the specific language governing permissions and
22+
* limitations under the License.
23+
********************************************************************************/
24+
25+
#if !defined(CYCFG_H)
26+
#define CYCFG_H
27+
28+
#if defined(__cplusplus)
29+
extern "C" {
30+
#endif
31+
32+
#include "cycfg_notices.h"
33+
#include "cycfg_system.h"
34+
#include "cycfg_clocks.h"
35+
#include "cycfg_routing.h"
36+
#include "cycfg_peripherals.h"
37+
#include "cycfg_pins.h"
38+
39+
void init_cycfg_all(void);
40+
41+
42+
#if defined(__cplusplus)
43+
}
44+
#endif
45+
46+
47+
#endif /* CYCFG_H */
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*******************************************************************************
2+
* File Name: cycfg_clocks.c
3+
*
4+
* Description:
5+
* Clock configuration
6+
* This file was automatically generated and should not be modified.
7+
*
8+
********************************************************************************
9+
* Copyright 2017-2019 Cypress Semiconductor Corporation
10+
* SPDX-License-Identifier: Apache-2.0
11+
*
12+
* Licensed under the Apache License, Version 2.0 (the "License");
13+
* you may not use this file except in compliance with the License.
14+
* You may obtain a copy of the License at
15+
*
16+
* http://www.apache.org/licenses/LICENSE-2.0
17+
*
18+
* Unless required by applicable law or agreed to in writing, software
19+
* distributed under the License is distributed on an "AS IS" BASIS,
20+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21+
* See the License for the specific language governing permissions and
22+
* limitations under the License.
23+
********************************************************************************/
24+
25+
#include "cycfg_clocks.h"
26+
27+
28+
void init_cycfg_clocks(void)
29+
{
30+
Cy_SysClk_PeriphDisableDivider(CY_SYSCLK_DIV_16_BIT, 0U);
31+
Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_16_BIT, 0U, 51U);
32+
Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_16_BIT, 0U);
33+
34+
Cy_SysClk_PeriphDisableDivider(CY_SYSCLK_DIV_16_BIT, 1U);
35+
Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_16_BIT, 1U, 77U);
36+
Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_16_BIT, 1U);
37+
38+
Cy_SysClk_PeriphDisableDivider(CY_SYSCLK_DIV_8_BIT, 0U);
39+
Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_8_BIT, 0U, 0U);
40+
Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_8_BIT, 0U);
41+
42+
Cy_SysClk_PeriphDisableDivider(CY_SYSCLK_DIV_8_BIT, 1U);
43+
Cy_SysClk_PeriphSetDivider(CY_SYSCLK_DIV_8_BIT, 1U, 5U);
44+
Cy_SysClk_PeriphEnableDivider(CY_SYSCLK_DIV_8_BIT, 1U);
45+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/*******************************************************************************
2+
* File Name: cycfg_clocks.h
3+
*
4+
* Description:
5+
* Clock configuration
6+
* This file was automatically generated and should not be modified.
7+
*
8+
********************************************************************************
9+
* Copyright 2017-2019 Cypress Semiconductor Corporation
10+
* SPDX-License-Identifier: Apache-2.0
11+
*
12+
* Licensed under the Apache License, Version 2.0 (the "License");
13+
* you may not use this file except in compliance with the License.
14+
* You may obtain a copy of the License at
15+
*
16+
* http://www.apache.org/licenses/LICENSE-2.0
17+
*
18+
* Unless required by applicable law or agreed to in writing, software
19+
* distributed under the License is distributed on an "AS IS" BASIS,
20+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21+
* See the License for the specific language governing permissions and
22+
* limitations under the License.
23+
********************************************************************************/
24+
25+
#if !defined(CYCFG_CLOCKS_H)
26+
#define CYCFG_CLOCKS_H
27+
28+
#include "cycfg_notices.h"
29+
#include "cy_sysclk.h"
30+
31+
#if defined(__cplusplus)
32+
extern "C" {
33+
#endif
34+
35+
#define CYBSP_DEBUG_UART_CLK_DIV_ENABLED 1U
36+
#define CYBSP_DEBUG_UART_CLK_DIV_HW CY_SYSCLK_DIV_16_BIT
37+
#define CYBSP_DEBUG_UART_CLK_DIV_NUM 0U
38+
#define CYBSP_BT_UART_CLK_DIV_ENABLED 1U
39+
#define CYBSP_BT_UART_CLK_DIV_HW CY_SYSCLK_DIV_16_BIT
40+
#define CYBSP_BT_UART_CLK_DIV_NUM 1U
41+
#define CYBSP_CSD_CLK_DIV_ENABLED 1U
42+
#define CYBSP_CSD_CLK_DIV_HW CY_SYSCLK_DIV_8_BIT
43+
#define CYBSP_CSD_CLK_DIV_NUM 0U
44+
#define CYBSP_CSD_COMM_CLK_DIV_ENABLED 1U
45+
#define CYBSP_CSD_COMM_CLK_DIV_HW CY_SYSCLK_DIV_8_BIT
46+
#define CYBSP_CSD_COMM_CLK_DIV_NUM 1U
47+
48+
void init_cycfg_clocks(void);
49+
50+
#if defined(__cplusplus)
51+
}
52+
#endif
53+
54+
55+
#endif /* CYCFG_CLOCKS_H */
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*******************************************************************************
2+
* File Name: cycfg_notices.h
3+
*
4+
* Description:
5+
* Contains warnings and errors that occurred while generating code for the
6+
* design.
7+
* This file was automatically generated and should not be modified.
8+
*
9+
********************************************************************************
10+
* Copyright 2017-2019 Cypress Semiconductor Corporation
11+
* SPDX-License-Identifier: Apache-2.0
12+
*
13+
* Licensed under the Apache License, Version 2.0 (the "License");
14+
* you may not use this file except in compliance with the License.
15+
* You may obtain a copy of the License at
16+
*
17+
* http://www.apache.org/licenses/LICENSE-2.0
18+
*
19+
* Unless required by applicable law or agreed to in writing, software
20+
* distributed under the License is distributed on an "AS IS" BASIS,
21+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22+
* See the License for the specific language governing permissions and
23+
* limitations under the License.
24+
********************************************************************************/
25+
26+
#if !defined(CYCFG_NOTICES_H)
27+
#define CYCFG_NOTICES_H
28+
29+
30+
#endif /* CYCFG_NOTICES_H */
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
/*******************************************************************************
2+
* File Name: cycfg_peripherals.c
3+
*
4+
* Description:
5+
* Peripheral Hardware Block configuration
6+
* This file was automatically generated and should not be modified.
7+
*
8+
********************************************************************************
9+
* Copyright 2017-2019 Cypress Semiconductor Corporation
10+
* SPDX-License-Identifier: Apache-2.0
11+
*
12+
* Licensed under the Apache License, Version 2.0 (the "License");
13+
* you may not use this file except in compliance with the License.
14+
* You may obtain a copy of the License at
15+
*
16+
* http://www.apache.org/licenses/LICENSE-2.0
17+
*
18+
* Unless required by applicable law or agreed to in writing, software
19+
* distributed under the License is distributed on an "AS IS" BASIS,
20+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21+
* See the License for the specific language governing permissions and
22+
* limitations under the License.
23+
********************************************************************************/
24+
25+
#include "cycfg_peripherals.h"
26+
27+
cy_stc_csd_context_t cy_csd_0_context =
28+
{
29+
.lockKey = CY_CSD_NONE_KEY,
30+
};
31+
const cy_stc_scb_uart_config_t CYBSP_BT_UART_config =
32+
{
33+
.uartMode = CY_SCB_UART_STANDARD,
34+
.enableMutliProcessorMode = false,
35+
.smartCardRetryOnNack = false,
36+
.irdaInvertRx = false,
37+
.irdaEnableLowPowerReceiver = false,
38+
.oversample = 8,
39+
.enableMsbFirst = false,
40+
.dataWidth = 8UL,
41+
.parity = CY_SCB_UART_PARITY_NONE,
42+
.stopBits = CY_SCB_UART_STOP_BITS_1,
43+
.enableInputFilter = false,
44+
.breakWidth = 11UL,
45+
.dropOnFrameError = false,
46+
.dropOnParityError = false,
47+
.receiverAddress = 0x0UL,
48+
.receiverAddressMask = 0x0UL,
49+
.acceptAddrInFifo = false,
50+
.enableCts = true,
51+
.ctsPolarity = CY_SCB_UART_ACTIVE_LOW,
52+
.rtsRxFifoLevel = 63,
53+
.rtsPolarity = CY_SCB_UART_ACTIVE_LOW,
54+
.rxFifoTriggerLevel = 1UL,
55+
.rxFifoIntEnableMask = 0UL,
56+
.txFifoTriggerLevel = 63UL,
57+
.txFifoIntEnableMask = 0UL,
58+
};
59+
const cy_stc_scb_ezi2c_config_t CYBSP_CSD_COMM_config =
60+
{
61+
.numberOfAddresses = CY_SCB_EZI2C_ONE_ADDRESS,
62+
.slaveAddress1 = 8U,
63+
.slaveAddress2 = 0U,
64+
.subAddressSize = CY_SCB_EZI2C_SUB_ADDR16_BITS,
65+
.enableWakeFromSleep = false,
66+
};
67+
const cy_stc_scb_uart_config_t CYBSP_DEBUG_UART_config =
68+
{
69+
.uartMode = CY_SCB_UART_STANDARD,
70+
.enableMutliProcessorMode = false,
71+
.smartCardRetryOnNack = false,
72+
.irdaInvertRx = false,
73+
.irdaEnableLowPowerReceiver = false,
74+
.oversample = 12,
75+
.enableMsbFirst = false,
76+
.dataWidth = 9UL,
77+
.parity = CY_SCB_UART_PARITY_NONE,
78+
.stopBits = CY_SCB_UART_STOP_BITS_1,
79+
.enableInputFilter = false,
80+
.breakWidth = 11UL,
81+
.dropOnFrameError = false,
82+
.dropOnParityError = false,
83+
.receiverAddress = 0x0UL,
84+
.receiverAddressMask = 0x0UL,
85+
.acceptAddrInFifo = false,
86+
.enableCts = true,
87+
.ctsPolarity = CY_SCB_UART_ACTIVE_HIGH,
88+
.rtsRxFifoLevel = 63,
89+
.rtsPolarity = CY_SCB_UART_ACTIVE_LOW,
90+
.rxFifoTriggerLevel = 63UL,
91+
.rxFifoIntEnableMask = 0UL,
92+
.txFifoTriggerLevel = 63UL,
93+
.txFifoIntEnableMask = 0UL,
94+
};
95+
cy_en_sd_host_card_capacity_t CYBSP_RADIO_cardCapacity = CY_SD_HOST_SDSC;
96+
cy_en_sd_host_card_type_t CYBSP_RADIO_cardType = CY_SD_HOST_NOT_EMMC;
97+
uint32_t CYBSP_RADIO_rca = 0u;
98+
const cy_stc_sd_host_init_config_t CYBSP_RADIO_config =
99+
{
100+
.emmc = false,
101+
.dmaType = CY_SD_HOST_DMA_SDMA,
102+
.enableLedControl = false,
103+
};
104+
cy_stc_sd_host_sd_card_config_t CYBSP_RADIO_card_cfg =
105+
{
106+
.lowVoltageSignaling = false,
107+
.busWidth = CY_SD_HOST_BUS_WIDTH_4_BIT,
108+
.cardType = &CYBSP_RADIO_cardType,
109+
.rca = &CYBSP_RADIO_rca,
110+
.cardCapacity = &CYBSP_RADIO_cardCapacity,
111+
};
112+
const cy_stc_smif_config_t CYBSP_QSPI_config =
113+
{
114+
.mode = (uint32_t)CY_SMIF_NORMAL,
115+
.deselectDelay = CYBSP_QSPI_DESELECT_DELAY,
116+
.rxClockSel = (uint32_t)CY_SMIF_SEL_INV_INTERNAL_CLK,
117+
.blockEvent = (uint32_t)CY_SMIF_BUS_ERROR,
118+
};
119+
const cy_stc_mcwdt_config_t CYBSP_MCWDT_config =
120+
{
121+
.c0Match = 32768U,
122+
.c1Match = 32768U,
123+
.c0Mode = CY_MCWDT_MODE_NONE,
124+
.c1Mode = CY_MCWDT_MODE_NONE,
125+
.c2ToggleBit = 16U,
126+
.c2Mode = CY_MCWDT_MODE_NONE,
127+
.c0ClearOnMatch = false,
128+
.c1ClearOnMatch = false,
129+
.c0c1Cascade = true,
130+
.c1c2Cascade = false,
131+
};
132+
const cy_stc_rtc_config_t CYBSP_RTC_config =
133+
{
134+
.sec = 0U,
135+
.min = 0U,
136+
.hour = 12U,
137+
.amPm = CY_RTC_AM,
138+
.hrFormat = CY_RTC_24_HOURS,
139+
.dayOfWeek = CY_RTC_SUNDAY,
140+
.date = 1U,
141+
.month = CY_RTC_JANUARY,
142+
.year = 0U,
143+
};
144+
145+
146+
void init_cycfg_peripherals(void)
147+
{
148+
Cy_SysClk_PeriphAssignDivider(PCLK_CSD_CLOCK, CY_SYSCLK_DIV_8_BIT, 0U);
149+
150+
Cy_SysClk_PeriphAssignDivider(PCLK_SCB2_CLOCK, CY_SYSCLK_DIV_16_BIT, 1U);
151+
152+
Cy_SysClk_PeriphAssignDivider(PCLK_SCB3_CLOCK, CY_SYSCLK_DIV_8_BIT, 1U);
153+
154+
Cy_SysClk_PeriphAssignDivider(PCLK_SCB5_CLOCK, CY_SYSCLK_DIV_16_BIT, 0U);
155+
}

0 commit comments

Comments
 (0)