Application Note
42 of 45
001-84858 Rev. *N
2021-03-23
PSoC 4 Programming Using an External Microcontroller (HSSP)
Appendix D: HSSP Functions
Function
Description
functions. Returns “true” if all SWD transactions succeeded (ACKed).
Write_IO
Writes a 32-bit data into the specified address of the CPU address space.
This function is implemented by using the Write_DAP() function. Returns
“true” if all SWD transactions succeeded.
Table 18
Function in
Timeout.h
Function
Description
DelayHundredUs()
Introduces a delay of 100 µs to generate an active LOW pulse signal lasting
for 100 µs on the XRES pin.
Table 19
Functions in
DataFetch.h
Function
Description
HEX_ReadSiliconId()
Copies the device silicon ID data from the
HexImage.c
file to an
indicated destination array.
HEX_ReadRowData()
Copies the flash row data from the
HexImage.c
file to an indicated
destination array. The flash row number is also passed as a
parameter to this function.
HEX_ReadRowProtectionData()
Copies the flash row protection data from the
HexImage.c
file to an
indicated destination array. The byte size of the protection data is
also passed as a parameter to this function.
HEX_ReadChipProtectionData
Copies the chip protection data from the
HexImage.c
file to an
indicated destination.
HEX_ReadChecksumData()
Copies the checksum data from the
HexImage.c
file to an indicated
destination.
GetFlashRowCount()
Returns the total number of flash rows in the target device from the
HexImage.c
file.
Table 20
Functions in
ProgrammingSteps.h
Function
Description
DeviceAcquire()
Enters the programming mode and acquires the target device.
VerifySiliconId()
Verifies whether the silicon ID of the target device and the hex file
match.
EraseAllFlash()
Erases the entire flash memory of the target device, including the
flash protection data.
ChecksumPrivileged()
Calculates the checksum of the privileged data in flash.
ProgramFlash()
Programs the flash memory of the target device.
VerifyFlash()
Verifies whether the flash data programmed to the target device
matches the hex file flash data.
ProgramProtectionSettings()
Programs the row protection data and chip protection data to the
target device.
VerifyProtectionSettings()
Verifies whether the row protection data and chip protection data
programmed to the target device matches the data in the hex file.