Skip to content

Commit 6522179

Browse files
committed
Adding CE220263 PSoC6 GPIO
1 parent 59be32f commit 6522179

File tree

7 files changed

+777
-0
lines changed

7 files changed

+777
-0
lines changed
290 KB
Binary file not shown.

CE220263_PSoC6_GPIO/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#
2+
# This makefile is just here so that typing 'make' in this directory
3+
# works. This makefile just includes the modus.mk. The modus.mk name
4+
# is special in IDE environments and is a trigger so that the IDE knows
5+
# this is a modus compliant example that supports the IDE related targets
6+
#
7+
8+
include modus.mk

CE220263_PSoC6_GPIO/Source/main.c

Lines changed: 356 additions & 0 deletions
Large diffs are not rendered by default.

CE220263_PSoC6_GPIO/design.modus

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Design version="10" xmlns="http://cypress.com/xsd/cydesignfile_v1">
3+
<ToolInfo version="1.0.0"/>
4+
<Device mpn="CY8C6247BZI-D54"/>
5+
<Libraries>
6+
<Library name="psoc6sw" version="1.1"/>
7+
</Libraries>
8+
<ConfiguratorData/>
9+
<BlockConfig>
10+
<Pins>
11+
<Block location="ioss[0].port[0].pin[3]" alias="KIT_RGB1_R" template="mxs40pin" version="1.0">
12+
<Param id="DriveModes" value="CY_GPIO_DM_STRONG_IN_OFF"/>
13+
<Param id="initialState" value="1"/>
14+
<Param id="vtrip" value="CY_GPIO_VTRIP_CMOS"/>
15+
<Param id="isrTrigger" value="CY_GPIO_INTR_DISABLE"/>
16+
<Param id="slewRate" value="CY_GPIO_SLEW_FAST"/>
17+
<Param id="driveStrength" value="CY_GPIO_DRIVE_FULL"/>
18+
<Param id="sioOutputBuffer" value="true"/>
19+
<Param id="inFlash" value="true"/>
20+
</Block>
21+
<Block location="ioss[0].port[0].pin[4]" alias="KIT_BTN1" template="mxs40pin" version="1.0">
22+
<Param id="DriveModes" value="CY_GPIO_DM_PULLDOWN"/>
23+
<Param id="initialState" value="1"/>
24+
<Param id="vtrip" value="CY_GPIO_VTRIP_CMOS"/>
25+
<Param id="isrTrigger" value="CY_GPIO_INTR_FALLING"/>
26+
<Param id="slewRate" value="CY_GPIO_SLEW_FAST"/>
27+
<Param id="driveStrength" value="CY_GPIO_DRIVE_FULL"/>
28+
<Param id="sioOutputBuffer" value="true"/>
29+
<Param id="inFlash" value="true"/>
30+
</Block>
31+
<Block location="ioss[0].port[11].pin[1]" alias="KIT_RGB1_B" template="mxs40pin" version="1.0">
32+
<Param id="DriveModes" value="CY_GPIO_DM_STRONG_IN_OFF"/>
33+
<Param id="initialState" value="1"/>
34+
<Param id="vtrip" value="CY_GPIO_VTRIP_CMOS"/>
35+
<Param id="isrTrigger" value="CY_GPIO_INTR_DISABLE"/>
36+
<Param id="slewRate" value="CY_GPIO_SLEW_FAST"/>
37+
<Param id="driveStrength" value="CY_GPIO_DRIVE_FULL"/>
38+
<Param id="sioOutputBuffer" value="true"/>
39+
<Param id="inFlash" value="true"/>
40+
</Block>
41+
<Block location="ioss[0].port[13].pin[7]" alias="KIT_LED2" template="mxs40pin" version="1.0">
42+
<Param id="DriveModes" value="CY_GPIO_DM_STRONG_IN_OFF"/>
43+
<Param id="initialState" value="1"/>
44+
<Param id="vtrip" value="CY_GPIO_VTRIP_CMOS"/>
45+
<Param id="isrTrigger" value="CY_GPIO_INTR_DISABLE"/>
46+
<Param id="slewRate" value="CY_GPIO_SLEW_FAST"/>
47+
<Param id="driveStrength" value="CY_GPIO_DRIVE_FULL"/>
48+
<Param id="sioOutputBuffer" value="true"/>
49+
<Param id="inFlash" value="true"/>
50+
</Block>
51+
<Block location="ioss[0].port[1].pin[1]" alias="KIT_RGB1_G" template="mxs40pin" version="1.0">
52+
<Param id="DriveModes" value="CY_GPIO_DM_STRONG_IN_OFF"/>
53+
<Param id="initialState" value="1"/>
54+
<Param id="vtrip" value="CY_GPIO_VTRIP_CMOS"/>
55+
<Param id="isrTrigger" value="CY_GPIO_INTR_DISABLE"/>
56+
<Param id="slewRate" value="CY_GPIO_SLEW_FAST"/>
57+
<Param id="driveStrength" value="CY_GPIO_DRIVE_FULL"/>
58+
<Param id="sioOutputBuffer" value="true"/>
59+
<Param id="inFlash" value="true"/>
60+
</Block>
61+
<Block location="ioss[0].port[1].pin[5]" alias="KIT_LED1" template="mxs40pin" version="1.0">
62+
<Param id="DriveModes" value="CY_GPIO_DM_STRONG_IN_OFF"/>
63+
<Param id="initialState" value="1"/>
64+
<Param id="vtrip" value="CY_GPIO_VTRIP_CMOS"/>
65+
<Param id="isrTrigger" value="CY_GPIO_INTR_DISABLE"/>
66+
<Param id="slewRate" value="CY_GPIO_SLEW_FAST"/>
67+
<Param id="driveStrength" value="CY_GPIO_DRIVE_FULL"/>
68+
<Param id="sioOutputBuffer" value="true"/>
69+
<Param id="inFlash" value="true"/>
70+
</Block>
71+
<Block location="ioss[0].port[6].pin[4]" alias="SWO" template="mxs40pin" version="1.0">
72+
<Param id="DriveModes" value="CY_GPIO_DM_STRONG_IN_OFF"/>
73+
<Param id="initialState" value="1"/>
74+
<Param id="vtrip" value="CY_GPIO_VTRIP_CMOS"/>
75+
<Param id="isrTrigger" value="CY_GPIO_INTR_DISABLE"/>
76+
<Param id="slewRate" value="CY_GPIO_SLEW_FAST"/>
77+
<Param id="driveStrength" value="CY_GPIO_DRIVE_FULL"/>
78+
<Param id="sioOutputBuffer" value="true"/>
79+
<Param id="inFlash" value="true"/>
80+
</Block>
81+
<Block location="ioss[0].port[6].pin[6]" alias="SWDIO" template="mxs40pin" version="1.0">
82+
<Param id="DriveModes" value="CY_GPIO_DM_PULLUP"/>
83+
<Param id="initialState" value="1"/>
84+
<Param id="vtrip" value="CY_GPIO_VTRIP_CMOS"/>
85+
<Param id="isrTrigger" value="CY_GPIO_INTR_DISABLE"/>
86+
<Param id="slewRate" value="CY_GPIO_SLEW_FAST"/>
87+
<Param id="driveStrength" value="CY_GPIO_DRIVE_FULL"/>
88+
<Param id="sioOutputBuffer" value="true"/>
89+
<Param id="inFlash" value="true"/>
90+
</Block>
91+
<Block location="ioss[0].port[6].pin[7]" alias="SWCLK" template="mxs40pin" version="1.0">
92+
<Param id="DriveModes" value="CY_GPIO_DM_PULLDOWN"/>
93+
<Param id="initialState" value="1"/>
94+
<Param id="vtrip" value="CY_GPIO_VTRIP_CMOS"/>
95+
<Param id="isrTrigger" value="CY_GPIO_INTR_DISABLE"/>
96+
<Param id="slewRate" value="CY_GPIO_SLEW_FAST"/>
97+
<Param id="driveStrength" value="CY_GPIO_DRIVE_FULL"/>
98+
<Param id="sioOutputBuffer" value="true"/>
99+
<Param id="inFlash" value="true"/>
100+
</Block>
101+
</Pins>
102+
<Platform>
103+
<Block location="cpuss[0].dap[0]" alias="" template="mxs40dap" version="1.0">
104+
<Param id="dbgMode" value="SWD"/>
105+
<Param id="traceEnable" value="false"/>
106+
</Block>
107+
<Block location="srss[0].clock[0]" alias="" template="mxs40sysclocks" version="1.1"/>
108+
<Block location="srss[0].clock[0].fastclk[0]" alias="" template="mxs40fastclk" version="1.0">
109+
<Param id="divider" value="1"/>
110+
</Block>
111+
<Block location="srss[0].clock[0].hfclk[0]" alias="" template="mxs40hfclk" version="1.1">
112+
<Param id="sourceClockNumber" value="1"/>
113+
<Param id="divider" value="1"/>
114+
</Block>
115+
<Block location="srss[0].clock[0].ilo[0]" alias="" template="mxs40ilo" version="1.0">
116+
<Param id="hibernate" value="true"/>
117+
</Block>
118+
<Block location="srss[0].clock[0].imo[0]" alias="" template="mxs40imo" version="1.0">
119+
<Param id="trim" value="1"/>
120+
</Block>
121+
<Block location="srss[0].clock[0].lfclk[0]" alias="" template="mxs40lfclk" version="1.1">
122+
<Param id="sourceClock" value="ilo"/>
123+
</Block>
124+
<Block location="srss[0].clock[0].pathmux[0]" alias="" template="mxs40pathmux" version="1.0">
125+
<Param id="sourceClock" value="imo"/>
126+
</Block>
127+
<Block location="srss[0].clock[0].pathmux[1]" alias="" template="mxs40pathmux" version="1.0">
128+
<Param id="sourceClock" value="imo"/>
129+
</Block>
130+
<Block location="srss[0].clock[0].pathmux[2]" alias="" template="mxs40pathmux" version="1.0">
131+
<Param id="sourceClock" value="imo"/>
132+
</Block>
133+
<Block location="srss[0].clock[0].pathmux[3]" alias="" template="mxs40pathmux" version="1.0">
134+
<Param id="sourceClock" value="imo"/>
135+
</Block>
136+
<Block location="srss[0].clock[0].pathmux[4]" alias="" template="mxs40pathmux" version="1.0">
137+
<Param id="sourceClock" value="imo"/>
138+
</Block>
139+
<Block location="srss[0].clock[0].periclk[0]" alias="" template="mxs40periclk" version="1.0">
140+
<Param id="divider" value="2"/>
141+
</Block>
142+
<Block location="srss[0].clock[0].pll[0]" alias="" template="mxs40pll" version="1.0">
143+
<Param id="lowFrequencyMode" value="false"/>
144+
<Param id="configuration" value="auto"/>
145+
<Param id="desiredFrequency" value="144.000"/>
146+
<Param id="optimization" value="MinPower"/>
147+
</Block>
148+
<Block location="srss[0].clock[0].slowclk[0]" alias="" template="mxs40slowclk" version="1.0">
149+
<Param id="divider" value="1"/>
150+
</Block>
151+
<Block location="srss[0].power[0]" alias="" template="mxs40power" version="1.1">
152+
<Param id="pwrMode" value="LDO_1_1"/>
153+
<Param id="pmicEnable" value="false"/>
154+
<Param id="backupSrc" value="VDDD"/>
155+
<Param id="vddaMv" value="3300"/>
156+
<Param id="vdddMv" value="3300"/>
157+
<Param id="vBackupMv" value="3300"/>
158+
<Param id="vddNsMv" value="3300"/>
159+
<Param id="vddio0Mv" value="3300"/>
160+
<Param id="vddio1Mv" value="3300"/>
161+
</Block>
162+
</Platform>
163+
</BlockConfig>
164+
<Netlist>
165+
<Net>
166+
<Port name="cpuss[0].dap[0].swj_swclk_tclk[0]"/>
167+
<Port name="ioss[0].port[6].pin[7].digital_in[0]"/>
168+
</Net>
169+
<Net>
170+
<Port name="cpuss[0].dap[0].swj_swdio_tms[0]"/>
171+
<Port name="ioss[0].port[6].pin[6].digital_inout[0]"/>
172+
</Net>
173+
<Net>
174+
<Port name="cpuss[0].dap[0].swj_swo_tdo[0]"/>
175+
<Port name="ioss[0].port[6].pin[4].digital_out[0]"/>
176+
</Net>
177+
</Netlist>
178+
</Design>

CE220263_PSoC6_GPIO/modus.mk

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
# This is a file used and owned by the ModusToolbox IDE. Users should not modify this file.
2+
DEVICE=CY8C6247BZI-D54
3+
################################################################################
4+
# \file modus.mk
5+
# \version 1.0
6+
#
7+
# \brief
8+
# This file has two purposes.
9+
# - The first purpose is to provide information to the makefile build system.
10+
# - The second purpose is to provide information to any IDE about the example.
11+
# Therefore, this file should not contain anything other than make variables.
12+
#
13+
################################################################################
14+
# \copyright
15+
# Copyright 2018-2019 Cypress Semiconductor Corporation
16+
# SPDX-License-Identifier: Apache-2.0
17+
#
18+
# Licensed under the Apache License, Version 2.0 (the "License");
19+
# you may not use this file except in compliance with the License.
20+
# You may obtain a copy of the License at
21+
#
22+
# http://www.apache.org/licenses/LICENSE-2.0
23+
#
24+
# Unless required by applicable law or agreed to in writing, software
25+
# distributed under the License is distributed on an "AS IS" BASIS,
26+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27+
# See the License for the specific language governing permissions and
28+
# limitations under the License.
29+
################################################################################
30+
31+
#
32+
# Toolchain, its optimization level and the configuration (Debug/Release) type
33+
#
34+
TOOLCHAIN=GCC
35+
OPTIMIZATION = Og
36+
CONFIG = Debug
37+
38+
# Define custom linker script location (<ABSOLUTE PATH>/customScript.ld)
39+
# CY_MAINAPP_CM0P_LINKER_SCRIPT=
40+
# CY_MAINAPP_CM4_LINKER_SCRIPT=
41+
42+
#
43+
# Vector Floating-point flag (soft/hard) selection
44+
#
45+
VFP_FLAG = soft
46+
47+
#
48+
# The target platform for the example
49+
#
50+
PLATFORMS_VERSION = 1.0
51+
PLATFORM=PSOC6_DUAL_CORE
52+
53+
#
54+
# The default name of this example
55+
#
56+
CY_EXAMPLE_NAME = CE220263_PSoC_6_MCU_GPIO_Pins
57+
58+
#
59+
# Description of the example project to display
60+
#
61+
CY_EXAMPLE_DESCRIPTION = This example demonstrates GPIO pin operation on the PSoC 6 MCU, using ModusToolbox IDE.
62+
63+
#
64+
# New project dialog inclusion
65+
#
66+
CY_SHOW_NEW_PROJECT = true
67+
68+
#
69+
# Valid platforms for this example
70+
#
71+
CY_VALID_PLATFORMS = PSOC6_DUAL_CORE PSOC6_SINGLE_CORE
72+
73+
#
74+
# This is the required SDK for this example
75+
#
76+
CY_REQUIRED_SDK = Cypress SDK[1.1]
77+
78+
#
79+
# Valid devices for this example. If empty, this example works for all devices
80+
#
81+
CY_VALID_DEVICES = $(CY_DEVICES_WITH_MAX_SPEED_MHZ_150)
82+
83+
#
84+
# The source code for the CM0+ application
85+
#
86+
CY_APP_CM0P_SOURCE =
87+
88+
#
89+
# The source code for the CM4 application
90+
#
91+
CY_APP_CM4_SOURCE = \
92+
Source/main.c \
93+
readme.txt \
94+
95+
#
96+
# Paths to use for ModusToolbox IDE
97+
#
98+
CY_LOCAL_INCLUDE_CM0P = $(CY_GENERATED_DIR)/$(CYMAINAPP_CM0P_NAME)
99+
CY_LOCAL_INCLUDE_CM4 = $(CY_GENERATED_DIR)/$(CYMAINAPP_CM4_NAME)
100+
101+
#
102+
# Includes specific to the CM0+ application
103+
#
104+
APP_MAINAPP_CM0P_INCLUDES = \
105+
-IGeneratedSource\
106+
-I$(CY_LOCAL_INCLUDE_CM0P)/Source_cm0p
107+
108+
#
109+
# Includes specific to the CM4 application
110+
#
111+
APP_MAINAPP_CM4_INCLUDES = \
112+
-IGeneratedSource\
113+
-I$(CY_LOCAL_INCLUDE_CM4)/Source
114+
115+
#
116+
# Compiler flags specific to the CM0+ application
117+
#
118+
APP_MAINAPP_CM0P_FLAGS =
119+
120+
#
121+
# Compiler flags specific to the CM4 application
122+
#
123+
APP_MAINAPP_CM4_FLAGS =
124+
125+
#
126+
# Defines specific to the CM0+ application
127+
#
128+
APP_MAINAPP_CM0P_DEFINES = \
129+
-DAPP_NAME='"$(CY_EXAMPLE_NAME)_cm0p"'
130+
131+
#
132+
# Defines specific to the CM4 application
133+
#
134+
APP_MAINAPP_CM4_DEFINES = \
135+
-DAPP_NAME='"$(CY_EXAMPLE_NAME)_cm4"'
136+
137+
#
138+
# Software components needed by CM0+
139+
#
140+
CY_MAINAPP_CM0P_SWCOMP_USED = \
141+
142+
#
143+
# Software components needed by CM4
144+
#
145+
CY_MAINAPP_SWCOMP_USED = \
146+
147+
#
148+
# Other libraries (.a) needed by the CM0+ application
149+
#
150+
APP_MAINAPP_CM0P_LIBS = \
151+
152+
#
153+
# Other libraries (.a) needed by the CM4 application
154+
#
155+
APP_MAINAPP_CM4_LIBS = \
156+
157+
#
158+
# The path to the design.modus file
159+
#
160+
CYCONFIG_DESIGN_MODUS = design.modus
161+
162+
#
163+
# Additional (non-core) set of generated source files
164+
#
165+
CYCONFIG_GENERATED_SOURCES = \
166+
167+
#
168+
# Check that the CYSDK environment variable exists
169+
#
170+
ifndef CYSDK
171+
$(error The SDK must be defined via the CYSDK environment variable)
172+
endif
173+
174+
#
175+
# Include the main makefile for building this type of example
176+
#
177+
include $(CYSDK)/libraries/platforms-$(PLATFORMS_VERSION)/common/find_platform.mk

0 commit comments

Comments
 (0)