Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

Changing programming clock speed in ModusToolbox and Cypress Programmer – KBA232936

Changing programming clock speed in ModusToolbox and Cypress Programmer – KBA232936

Chelladurai
Community Manager
Community Manager
Community Manager
100 sign-ins 50 questions asked 50 sign-ins

Version: **

Both ModusToolbox and Cypress Programmer use OpenOCD underneath to communicate with the device. So, to change the programming clock speed, you will have to modify the configuration files (.cfg files) in OpenOCD in both cases.

ModusToolbox:

The OpenOCD commands in ModusToolbox are in the Debugger tab of Run Configurations (Run > Run Configurations). The commands call the appropriate configuration files according to the target device selected. For example, for the CY8CKIT-062-WiFi-BT device, the psoc6.cfg file is called as follows:

Chelladurai_0-1624511379203.png

The OpenOCD files and folders are in <ModusToolbox installation directory>\tools_2.x\openocd. The psoc6.cfg file calls the psoc6_common.cfg file, which in turn calls the mxs40_common.cfg file. This file contains the adapter speed 2000 command, which sets the programming clock speed to 2 MHz.

Change this command to alter the programming clock frequency. Note that file names and file locations may change; if these files do not exist or do not contain the command, traverse through the configuration files starting with the file in the Config options.

For PSoC 6 2M device, the sequence is psoc6_2m.cfg > psoc6_common.cfg > mxs40_common.cfg. Similarly, for PSoC 64 and PSoC 4 devices, corresponding configuration files are called, which contain the adapter speed command.

The following table provides details on the files that need to be edited for all the devices. File names and locations correspond to ModusToolbox 2.3 release that uses OpenOCD 4.2.0.

Device Family

File to be modified

File location

PSoC 4

psoc4.cfg

\openocd\scripts\target\

PSoC 6

mxs40_common.cfg

\openocd\scripts\target\mxs40\

PSoC 64

psoc6_secure_common.cfg

\openocd\scripts\target\mxs40\

Note:

  • The file locations are relative to ModusToolbox tools directory. By default, the tools directory is - C:\Users\<user_name>\ModusToolbox\tools_2.x

Cypress Programmer:

Cypress Programmer installation includes OpenOCD. The openocd folder in the installation directory contains all the configuration files.

You can determine the configuration file used by Cypress Programmer for a particular device from the generated logs.

For example, for the CY8CKIT-062-WiFi-BT device, the kit_CY8CKIT_062_WiFi_BT.cfg file is used as shown. This file in turn calls cpu_CY8CKIT_062_WiFi_BT.cfg, followed by cpu_CY8CKIT_062_BLE.cfg and psoc6.cfg, psoc6_common.cfg.

The psoc6_common.cfg file contains the adapter speed 2000 command, which needs to be modified to change the programming clock speed. Note that the filenames and file locations may change in the future; if these files do not exist or do not contain the command, traverse through the configuration files starting with the file in the generated log.

Chelladurai_1-1624511639061.png

The following table provides details on the configuration files that need to be edited for all the devices. File names and locations correspond to Cypress Programmer 3.0 release, which uses OpenOCD 3.0.0.

Device Family

File to be modified

File location

PSoC 4

psoc4.cfg

\openocd\scripts\target\

PSoC 6

psoc6_common.cfg

\openocd\scripts\target\

PSoC 64

psoc6_secure_common.cfg

\openocd\scripts\target\

 
Note:

  • The file locations are relative to the Cypress Programmer installation directory. The default installation directory is - C:\Program Files (x86)\Cypress\Cypress Programmer 3.0\  
0 Likes
554 Views