Application Note
21 of 45
001-84858 Rev. *N
2021-03-23
PSoC 4 Programming Using an External Microcontroller (HSSP)
Testing the Example Projects
9
Testing the Example Projects
The project file
HexImage.h
defines parameters CY8C40xx_FAMILY, CY8C4xxxM_FAMILY, CY8C4xx7_BL_FAMILY,
CY8C4xx8_BL_FAMILY, CY8C4xxxL_FAMILY, CY8C40xxS_FAMILY, CY8C41xxS_FAMILY, CY8C41xxS_PLUS_FAMILY,
and CY8C41xxPS_FAMILY. These parameters are automatically set to 1 if the hex file parser application for the
respective family is used to generate the
HexImage.c
and
HexImage.h
files.
9.1
For CY8CKIT
-
038 PSoC
4 Development Kit
To test the HSSP project on a PSoC 4 processor module (
using
PSoC 5LP as the host, use the A_Hssp_Programmer project attached with the application note. Program the
project in PSoC 5LP of the
to help you make the connections between the host
and target. Pressing SW2 starts the HSSP operation.
PSoC 4200
PSoC 5LP
(Host)
V
DDD
V
DDD
SWDCLK (P0[1])
XRES (P0[2])
SWDIO (P0[0])
GND
SWDCLK ( P3[3] )
XRES
SWDIO ( P3[2] )
V
DD
V
SSD
1.8
– 5.5 V
0.1 uF
CY8CKIT-050 with
mounted character
LCD
CY8CKIT-038 PSoC 4
processor module on
CY8CKIT-001 with LCD
P1[6]
SW2
P1[6]
Figure 4
Host/Target Connections
The hex file included by default in this project toggles pin P1[6] of PSoC 4 at 1-
Hz frequency and displays “PSoC
Programmed” on the character LCD mounted on the
after a successful programming
operation. To start programming, press SW2 on the PSoC 5LP host. If programming is successful, pin P1[6]
begins to toggle and the character LCD displays the message. If programming is unsuccessful, PSoC 5LP
displays the cause of the error on the LCD mounted on the PSoC 5LP kit.
Note:
If you are using any other host programmer, modify the source code as explained in
HSSP Application to a Host Programmer
. Then, test the project by making the basic
connections illustrated in
9.2
For Kits with Onboard PSoC 5LP Programmer (KitProg)
To test the HSSP project on the kits listed in
, use the B_Hssp_Pioneer project attached with this
application note. Using this kit, you do not need an external host microcontroller; PSoC 5LP is present as an
onboard microcontroller.
The onboard PSoC 5LP has bootloader firmware that can load and run new bootloadable applications through
USB. Therefore, the HSSP project is built as a bootloadable project, and you can download
the
B_Hssp_Pioneer.cyacd
project to PSoC 5LP via USB to be used as an HSSP host programmer.
This project uses a USB-to-UART component to display the programming outputs on a HyperTerminal, which is
a standard program used for serial communication.