Calculating Hssp Timeout Parameters; Device_Acquire_Timeout - Infineon PSoC 4 Quick Start Quide

Table of Contents

Advertisement

PSoC 4 Programming Using an External Microcontroller (HSSP)

Calculating HSSP Timeout Parameters

5
Calculating HSSP Timeout Parameters
Modify the values of the timeout parameters defined in the Timeout.h file according to the host programmer
used.
A separate test project, "C_Hssp_TimeoutCalc," is provided with the application note. This project illustrates
the procedure to calculate the timeout parameters for a PSoC 5LP host programmer. Create a similar test
project for any other host programmer to calculate those timeout values.
The test project provides test functions in two files: TimeoutCalc.h andTimeoutCalc.c. These test functions
toggle a test pin during code execution. The timeout parameters are measured by measuring the LOW pulse
width of the signal on the test pin using an oscilloscope.
To calculate these timeout parameters, see the explanation in the macro definitions in the TimeoutCalc.h
header file of the project. Now look at the significance of each of these timeout values:
5.1

DEVICE_ACQUIRE_TIMEOUT

This macro is used in the function DeviceAcquire()in the ProgrammingSteps.c file. To program the device,
the device must be acquired within the maximum time window for acquiring the device after you do a device
reset using the XRES pin. Maximum time window for acquiring the device is defined:
Table 9
Timeout for Acquiring Device
Device Family
PSoC40xx
PSoC41/42xx
PSoC4xxxM
PSoC 4xxxL
PSoC4xx7_BLE / PSoC4xx8_BLE
PSoC 4000S/ PSoC 4100S/ PSoC 4100PS
PSoC 4100S Plus
Note:
The recommended minimum frequency of the SWDCK clock, which meets the timing requirement
to acquire the device, is 1.5 MHz. See the "Step 1. Acquire Chip" subsection of the programming
specifications document of the respective device listed in the
more details.
The device-acquiring sequence consists of two steps:
Do a line Reset, which is a standard ARM command to reset the debug access port (DAP).
1.
Read the DAP.
2.
DEVICE_ACQUIRE_TIMEOUT indicates the maximum number of times a host can send the device-acquiring
sequence in a specific time window after device reset as given in
To calculate this macro, uncomment the TestModeTimeout() function in the main.c file of the project, and
then program the device.
1 The timeout for acquiring the device in the case of Power Cycle mode programming must be longer, ~ 30 ms.
Application Note
Related Documentation
Table
9.
13 of 45
1
Timeout (ms)
2.0
1.5
2.0
2.0
2.0
2.0
5.0
section for
001-84858 Rev. *N
2021-03-23

Advertisement

Table of Contents
loading

This manual is also suitable for:

An84858

Table of Contents