- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
can I use the programming port, for example of CY8C4146AXI-S453, as I/O?
Thanks
Henry
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
To visualize what Bob-san taught us a little, I made a sample project
schematic
When I see Pins in DWR (Design Wide Resources)
P3[2] and P3[3] are used for SWD
So I access System in the Design Wide Resources in the Workspace Explorer
When I double clicked "System"
Then click "v" in the right of Debug Select. (Default is SWD (serial wire debug)) to change the mode to GPIO
Now Debug Select is GPIO
When I accessed the Pins again, the reservation if P3[2] and P3[3] are cleared
So we can assign GPIO to these pins
main.c
=================
#include "project.h"
#define LED_ON 0u
#define LED_OFF 1u
#define SW_ON 0u
#define SW_OFF 1u
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
for(;;)
{
if (SW_Read() == SW_ON) {
LED_Write(LED_ON) ;
} else {
LED_Write(LED_OFF) ;
}
}
}
=================
Note: Needless to say, with this configuration we can program the device
but we can not use debugger.
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, you may. Just take care that the connected hardware does not go wild during the programming.
Setup: In Creator system view change the "Debug select" to GPIO.
Programming can be done using Kitprog or Miniprog.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
To visualize what Bob-san taught us a little, I made a sample project
schematic
When I see Pins in DWR (Design Wide Resources)
P3[2] and P3[3] are used for SWD
So I access System in the Design Wide Resources in the Workspace Explorer
When I double clicked "System"
Then click "v" in the right of Debug Select. (Default is SWD (serial wire debug)) to change the mode to GPIO
Now Debug Select is GPIO
When I accessed the Pins again, the reservation if P3[2] and P3[3] are cleared
So we can assign GPIO to these pins
main.c
=================
#include "project.h"
#define LED_ON 0u
#define LED_OFF 1u
#define SW_ON 0u
#define SW_OFF 1u
int main(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
for(;;)
{
if (SW_Read() == SW_ON) {
LED_Write(LED_ON) ;
} else {
LED_Write(LED_OFF) ;
}
}
}
=================
Note: Needless to say, with this configuration we can program the device
but we can not use debugger.
moto