├── .editorconfig ├── .gitattributes ├── .gitignore ├── KitProg3.cydsn ├── DAP.c ├── DAP.h ├── DAP_config.h ├── DAP_vendor.c ├── DAP_vendor.h ├── Doxyfile ├── Generated_Source │ └── PSoC5 │ │ ├── USBFS_episr.c │ │ ├── USBFS_vnd.c │ │ ├── isr_RTSDelay.c │ │ └── isr_SWDXRES.c ├── JTAG_DP.c ├── KitProg3.cydwr ├── KitProg3.cyprj ├── SWD_v3_0 │ ├── SWD_v3_0.cysym │ └── SWD_v3_0.v ├── SW_DP.c ├── TopDesign │ └── TopDesign.cysch ├── app_switch.c ├── app_switch.h ├── bridgesInterface.c ├── bridgesInterface.h ├── build_number.h ├── commandprocessor.h ├── device.h ├── hwid_data.c ├── images │ ├── CY_google.jpg │ ├── CyLogo.eps │ ├── CyLogo.pdf │ ├── doxygen.sty │ ├── footer.tex │ └── header.tex ├── jtag.h ├── kitprog.h ├── led.c ├── led.h ├── main.c ├── make_doc.bat ├── mutex.c ├── mutex.h ├── power.c ├── power.h ├── swd.c ├── swd.h ├── usb_user_hid.c ├── usbinterface.c ├── usbinterface.h ├── version.c └── version.h ├── KitProg3.cywrk ├── KitProg3_Bootloader.cydsn ├── KitProg3_Bootloader.cydwr ├── KitProg3_Bootloader.cyprj ├── TopDesign │ └── TopDesign.cysch ├── cyapicallbacks.h └── main.c ├── KitProg3_Library.cylib ├── B_SPI_Master_v2_50 │ ├── B_SPI_Master_v2_50.cysym │ └── B_SPI_Master_v2_50.v ├── KitProg3_Library.cyprj └── SPI_Master_v2_50 │ ├── API │ ├── SPI_Master.c │ ├── SPI_Master.h │ ├── SPI_MasterINT.c │ ├── SPI_Master_PM.c │ └── SPI_Master_PVT.h │ ├── Custom │ ├── Properties │ │ ├── Resources.Designer.cs │ │ └── Resources.resx │ ├── cyadditional.cs │ ├── cyspimcontrol.Designer.cs │ ├── cyspimcontrol.cs │ ├── cyspimcontrol.resx │ ├── cyspimcontroladv.Designer.cs │ ├── cyspimcontroladv.cs │ ├── cyspimcontroladv.resx │ ├── cyspimcustomizer.cs │ └── cyspimparameters.cs │ ├── SPI_Master_Bidir.cymacro │ ├── SPI_Master_Fll_Dplx.cymacro │ ├── SPI_Master_v2_50.cysch │ ├── SPI_Master_v2_50.cystate │ ├── SPI_Master_v2_50.cysym │ ├── SPI_Master_v2_50.docx │ └── SPI_Master_v2_50.pdf ├── LICENSE.txt ├── README.md ├── RELEASE.md ├── drivers ├── KitProg2 │ ├── KitProg2UART.cat │ └── KitProg2UART.inf ├── KitProg3 │ ├── KitProg3 │ │ └── Win7 │ │ │ ├── KitProg3.inf │ │ │ └── kitprog3.cat │ └── KitProg3UART │ │ ├── KitProg3UART.inf │ │ └── kitprog3uart.cat └── MiniProg4 │ ├── MiniProg4 │ └── Win7 │ │ ├── Win7x64 │ │ ├── MiniProg4.inf │ │ └── miniprog4.cat │ │ └── Win7x86 │ │ ├── MiniProg4.inf │ │ └── miniprog4.cat │ └── MiniProg4UART │ ├── Win10 │ ├── Win10x64 │ │ ├── MiniProg4UART.inf │ │ └── miniprog4uart.cat │ └── Win10x86 │ │ ├── MiniProg4UART.inf │ │ └── miniprog4uart.cat │ ├── Win7 │ ├── Win7x64 │ │ ├── MiniProg4UART.inf │ │ └── miniprog4uart.cat │ └── Win7x86 │ │ ├── MiniProg4UART.inf │ │ └── miniprog4uart.cat │ └── Win8.1 │ ├── Win8.1x64 │ ├── MiniProg4UART.inf │ └── miniprog4uart.cat │ └── Win8.1x86 │ ├── MiniProg4UART.inf │ └── miniprog4uart.cat └── third_party_licenses ├── kitprog3 └── NOTICE.txt └── kp-firmware ├── Apache_License.txt ├── CMSIS-DAP EULA.PDF └── Third Party Licenses.txt /.editorconfig: -------------------------------------------------------------------------------- 1 | # top-most EditorConfig file 2 | root = true 3 | 4 | # Common file settings. 5 | [*] 6 | charset = utf-8 7 | indent_style = space 8 | indent_size = 4 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.c text eol=crlf 2 | *.h text eol=crlf 3 | *.sh text eol=lf 4 | *.bash text eol=lf 5 | KitProg3.inf binary 6 | KitProg3UART.inf binary -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Backups 2 | /Backup/* 3 | # Compiled files 4 | /**/Release/* 5 | /**/Debug/* 6 | # Build logs 7 | /**/*.log 8 | # Generated export 9 | /**/Export/* 10 | # Generated sources 11 | /KitProg3.cydsn/codegentemp/* 12 | /KitProg3.cydsn/Generated_Source/PSoC5/* 13 | /KitProg3_Bootloader.cydsn/codegentemp/* 14 | /KitProg3_Bootloader.cydsn/Generated_Source/PSoC5/* 15 | # Mandatory files 16 | !/KitProg3.cydsn/Generated_Source/PSoC5/isr_RTSDelay.c 17 | !/KitProg3.cydsn/Generated_Source/PSoC5/isr_SWDXRES.c 18 | !/KitProg3.cydsn/Generated_Source/PSoC5/USBFS_episr.c 19 | !/KitProg3.cydsn/Generated_Source/PSoC5/USBFS_vnd.c 20 | # PSoC Creator's supplementary files 21 | *.cycdx 22 | *.cyfit 23 | *.cyprj.* 24 | *.rpt 25 | *.svd 26 | *_timing.html 27 | *.cywrk.* 28 | -------------------------------------------------------------------------------- /KitProg3.cydsn/DAP_vendor.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************//** 2 | * @file DAP_vendor.h 3 | * 4 | * @brief 5 | * This file contains the function prototypes and constants used in 6 | * the DAP_vendor.c 7 | * 8 | * @version KitProg3 v2.60 9 | */ 10 | /* 11 | * Related Documents: 12 | * 002-27868 - KITPROG3 V1.2X EROS 13 | * 002-23369 - KITPROG3 IROS 14 | * 002-26377 - KITPROG3 1.1X TEST PLAN 15 | * 16 | * 17 | ****************************************************************************** 18 | * (c) (2018-2025), Cypress Semiconductor Corporation (an Infineon company) 19 | * or an affiliate of Cypress Semiconductor Corporation. All rights reserved. 20 | * 21 | * This software, associated documentation and materials ("Software") is 22 | * owned by Cypress Semiconductor Corporation or one of its 23 | * affiliates ("Cypress") and is protected by and subject to worldwide 24 | * patent protection (United States and foreign), United States copyright 25 | * laws and international treaty provisions. Therefore, you may use this 26 | * Software only as provided in the license agreement accompanying the 27 | * software package from which you obtained this Software ("EULA"). If 28 | * no EULA applies, then any reproduction, modification, translation, 29 | * compilation, or representation of this Software is prohibited without 30 | * the express written permission of Cypress. 31 | * 32 | * Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO 33 | * WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, 34 | * BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED 35 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 36 | * PARTICULAR PURPOSE. Cypress reserves the right to make 37 | * changes to the Software without notice. Cypress does not assume any 38 | * liability arising out of the application or use of the Software or any 39 | * product or circuit described in the Software. Cypress does not authorize 40 | * its products for use in any products where a malfunction or failure 41 | * of the Cypress product may reasonably be expected to result in significant 42 | * property damage, injury or death ("High Risk Product"). 43 | * By including Cypress's product in a High Risk Product, the manufacturer 44 | * of such system or application assumes all risk of such use and in doing 45 | * so agrees to indemnify Cypress against all liability. 46 | *****************************************************************************/ 47 | 48 | #ifndef DAP_VENDOR_H 49 | #define DAP_VENDOR_H 50 | 51 | #include 52 | #include 53 | #include "device.h" 54 | #include "swd.h" 55 | 56 | 57 | #define KHPI_VER "2.04" 58 | #define KHPI_VER_MAJOR (2u) 59 | #define KHPI_VER_MINOR (4u) 60 | 61 | #define CMD_STAT_SUCCESS (0x00u) 62 | #define CMD_STAT_WAIT (0x01u) 63 | #define CMD_STAT_VOLT_SET_FAILED (0x80u) 64 | #define CMD_STAT_FAIL_INV_PAR (0x81u) 65 | #define CMD_STAT_FAIL_OP_FAIL (0x82u) 66 | 67 | #define LED_STATE_READY (0x00u) 68 | #define LED_STATE_PROGRAMMING (0x01u) 69 | #define LED_STATE_SUCCESS (0x02u) 70 | #define LED_STATE_ERROR (0x03u) 71 | 72 | #define MODE_BOOTLOADER (0x00u) 73 | #define MODE_CMSIS_DAP2X (0x01u) 74 | #define MODE_CMSIS_DAP1X (0x02u) 75 | #define MODE_CUSTOM_APP (0x03u) 76 | #define MODE_CMSIS_DAP2X_DOUBLEUARTS (0x04u) 77 | 78 | #define SWD_XFER_SIZE (0x04u) 79 | 80 | #define ID_DAP_V0_LEN (0x0cu) 81 | #define ID_DAP_DEF_CASE_RESP_LEN (0x01u) 82 | #define CMD_CODE_CMD_STAT_LEN (0x02u) 83 | #define CMD_CODE_CMD_STAT_ERR_LEN (0x03u) 84 | #define ID_DAP_V4_LEN (0x08u) 85 | #define ID_DAP_V17_VALUE_OFFSET (0x02u) 86 | 87 | #define RESP_85_SIZE_IMM (0x02u) 88 | 89 | #define I2C_AVAILABILITY_MASK (0x01u) 90 | #define SPI_AVAILIBILITY_MASK (0x02u) 91 | #define DAPH_AVAILIBILITY_MASK (0x04u) 92 | #define DAPB_AVAILIBILITY_MASK (0x08u) 93 | #define ON_OFF_SW_AVAILIBILITY_MASK (0x10u) 94 | #define VMEAS_AVAILIBILITY_MASK (0x20u) 95 | #define GPIO_AVAILIBILITY_MASK (0x40u) 96 | 97 | #define ONE_LED_KIT_MASK (0x01u) 98 | #define THREE_LED_KIT_MASK (0x03u) 99 | 100 | #define ONE_UART_MASK (0x10u) 101 | #define TWO_UART_MASK (0x20u) 102 | 103 | /* Maximum divider that can be applied to SPI clock */ 104 | #define SPI_DIVIDER_MAX (((uint32_t)(UINT16_MAX))/2u) 105 | 106 | /* In-component internal frequency divided applied to SPI clock */ 107 | #define SPI_COMP_DIVIDER (0x02u) 108 | 109 | /* Minimum divider that can be applied to SPI clock */ 110 | #define SPI_DIVIDER_MIN (0x02u) 111 | 112 | /* Supported SPI SS pins */ 113 | #define SPI_SS_LINES_MASK (0x07u) 114 | #define SPI_SS_LINES_E_MASK (0x01u) 115 | 116 | #define I2C_SPEEDS_MASK (0x0fu) 117 | 118 | #define GPIO_PIN_35_MASK (0x10u) 119 | #define GPIO_PIN_36_MASK (0x20u) 120 | 121 | #define CMD_POWER_SET (0x10u) 122 | #define CMD_POWER_GET (0x11u) 123 | #define CMD_POWER_OFF (0x00u) 124 | #define CMD_POWER_ON (0x01u) 125 | #define CMD_POWER_VOLT_SET (0x02u) 126 | 127 | #define PROB_CAP_RESP_LEN (15u) 128 | 129 | #define POWER_1000_MV (1000u) 130 | #define POWER_NOT_ACHIEVED (0x80u) 131 | 132 | #define CUSTOM_APP_ID (1u) 133 | #define TIMER_CSTICK_RATE (800u) 134 | #define TIMER_CSTICK_HALF_RATE (400u) 135 | #define MAX_TIMEOUT_IN_SECONDS (30u) 136 | 137 | #define PSOC5_SIID (0x6970122Eu) 138 | #define UNIQUE_ID_VALID (0x00u) 139 | #define UNIQUE_ID_INVALID (0xFFu) 140 | #define UNIQUE_ID_ADDRESS (CYDEV_EE_BASE + 16u) 141 | #define PRI_UART_FLOW_CTRL_BYTE (8u) 142 | #define SEC_UART_FLOW_CTRL_BYTE (9u) 143 | #define UART_MODE_ADDRESS (CYDEV_EE_BASE + PRI_UART_FLOW_CTRL_BYTE) 144 | #define CRC8_2S_COMP_BASE (0x0100u) 145 | 146 | #define UID_CY8CKIT_062S2_AI (0x0041u) 147 | #define UID_CY8CPROTO_041TP (0x0044u) 148 | #define UID_CY8CPROTO_040T_MS (0x0045u) 149 | #define MBED_ID_CY8CKIT_062S2_AI "1914" 150 | #define MBED_ID_CY8CPROTO_041TP "1915" 151 | #define MBED_ID_CY8CPROTO_040T_MS "1916" 152 | #define MBED_ID_UNSPECIFIED "19FF" 153 | #define RESP_UID_PROG_OPT_AI (9u) 154 | #define UID_PROG_OPT_DAPLINK (0x0Bu) 155 | #define RESP_UID_CHECKSUM_AI (62u) 156 | #define UID_CHECKSUM_AI (0xFAu) 157 | #define UID_CHECKSUM_041TP (0xBFu) 158 | #define UID_CHECKSUM_040T_MS (0x46u) 159 | 160 | /* Enum for Basic DAP Vendor Response */ 161 | enum 162 | { 163 | GENERAL_RESPONSE_COMMAND = 0u, 164 | GENERAL_RESPONSE_STATUS = 1u, 165 | GENERAL_RESPONSE_RESULT = 2u, 166 | }; 167 | 168 | /* Enum for Basic DAP Vendor Request */ 169 | enum 170 | { 171 | GENERAL_REQUEST_COMMAND = 0u, 172 | GENERAL_REQUEST_SUBCOMMAND = 1u, 173 | }; 174 | 175 | /* Enum for GPIO Request */ 176 | enum 177 | { 178 | GPIO_REQUEST_COMMAND = 0u, 179 | GPIO_REQUEST_PIN = 1u, 180 | GPIO_REQUEST_STATE_MODE = 2u, 181 | }; 182 | 183 | /* Enum for Get/Set UART flow control mode */ 184 | enum 185 | { 186 | CONFIG_UART_REQUEST_COMMAND = 1u, 187 | CONFIG_UART_REQUEST_PORT = 2u, 188 | CONFIG_UART_REQUEST_MODE = 3u, 189 | }; 190 | 191 | /* Function prototypes */ 192 | void HandleReset(void); 193 | void HandleModeSwitch(const uint8_t *request, uint8_t *response); 194 | uint32_t HandleLedCmd(const uint8_t *request, uint8_t *response); 195 | uint32_t HandleAcquire(const uint8_t *request, uint8_t *response); 196 | uint32_t GetCapabilities(const uint8_t *request, uint8_t *response); 197 | uint32_t GetSetPower(const uint8_t *request, uint8_t *response); 198 | void WaitVendorResponse(void); 199 | uint32_t SetAcquireOption(const uint8_t *request, uint8_t *response); 200 | uint32_t GetUidData(const uint8_t *request, uint8_t *response); 201 | extern uint32_t GetSetHwContol(const uint8_t *request, uint8_t *response); 202 | 203 | #endif /* DAP_VENDOR_H */ 204 | 205 | -------------------------------------------------------------------------------- /KitProg3.cydsn/Generated_Source/PSoC5/USBFS_vnd.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************//** 2 | * \file USBFS_vnd.c 3 | * \version 3.20 4 | * 5 | * \brief 6 | * This file contains the USB vendor request handler. 7 | * 8 | ******************************************************************************** 9 | * \copyright 10 | * Copyright 2008-2016, Cypress Semiconductor Corporation. All rights reserved. 11 | * You may use this file only in accordance with the license, terms, conditions, 12 | * disclaimers, and limitations in the end user license agreement accompanying 13 | * the software package with which this file was provided. 14 | *******************************************************************************/ 15 | 16 | #include "USBFS_pvt.h" 17 | 18 | 19 | #if(USBFS_EXTERN_VND == USBFS_FALSE) 20 | 21 | /*************************************** 22 | * Vendor Specific Declarations 23 | ***************************************/ 24 | 25 | /* `#START VENDOR_SPECIFIC_DECLARATIONS` Place your declaration here */ 26 | #include "kitprog.h" 27 | /* `#END` */ 28 | 29 | 30 | /******************************************************************************* 31 | * Function Name: USBFS_HandleVendorRqst 32 | ****************************************************************************//** 33 | * 34 | * This routine provide users with a method to implement vendor specific 35 | * requests. 36 | * 37 | * To implement vendor specific requests, add your code in this function to 38 | * decode and disposition the request. If the request is handled, your code 39 | * must set the variable "requestHandled" to TRUE, indicating that the 40 | * request has been handled. 41 | * 42 | * \return 43 | * requestHandled. 44 | * 45 | * \reentrant 46 | * No. 47 | * 48 | *******************************************************************************/ 49 | uint8 USBFS_HandleVendorRqst(void) 50 | { 51 | uint8 requestHandled = USBFS_FALSE; 52 | 53 | /* Check request direction: D2H or H2D. */ 54 | if (0u != (USBFS_bmRequestTypeReg & USBFS_RQST_DIR_D2H)) 55 | { 56 | /* Handle direction from device to host. */ 57 | 58 | switch (USBFS_bRequestReg) 59 | { 60 | case USBFS_GET_EXTENDED_CONFIG_DESCRIPTOR: 61 | #if defined(USBFS_ENABLE_MSOS_STRING) 62 | USBFS_currentTD.pData = (volatile uint8 *) &USBFS_MSOS_CONFIGURATION_DESCR[0u]; 63 | USBFS_currentTD.count = USBFS_MSOS_CONFIGURATION_DESCR[0u]; 64 | requestHandled = USBFS_InitControlRead(); 65 | #endif /* (USBFS_ENABLE_MSOS_STRING) */ 66 | break; 67 | 68 | default: 69 | break; 70 | } 71 | } 72 | 73 | /* `#START VENDOR_SPECIFIC_CODE` Place your vendor specific request here */ 74 | 75 | /* service the vendor specific command. VendorCmd() defined in the USBFS_commandInterface.c */ 76 | requestHandled = USBFS_InitControlRead(); 77 | 78 | /* `#END` */ 79 | 80 | #ifdef USBFS_HANDLE_VENDOR_RQST_CALLBACK 81 | if (USBFS_FALSE == requestHandled) 82 | { 83 | requestHandled = USBFS_HandleVendorRqst_Callback(); 84 | } 85 | #endif /* (USBFS_HANDLE_VENDOR_RQST_CALLBACK) */ 86 | 87 | return (requestHandled); 88 | } 89 | 90 | 91 | /******************************************************************************* 92 | * Additional user functions supporting Vendor Specific Requests 93 | ********************************************************************************/ 94 | 95 | /* `#START VENDOR_SPECIFIC_FUNCTIONS` Place any additional functions here */ 96 | 97 | /* `#END` */ 98 | 99 | 100 | #endif /* USBFS_EXTERN_VND */ 101 | 102 | 103 | /* [] END OF FILE */ 104 | -------------------------------------------------------------------------------- /KitProg3.cydsn/SWD_v3_0/SWD_v3_0.cysym: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Infineon/KitProg3/b81f81489ed6ac43451fac3c585e36b53ef6fe49/KitProg3.cydsn/SWD_v3_0/SWD_v3_0.cysym -------------------------------------------------------------------------------- /KitProg3.cydsn/TopDesign/TopDesign.cysch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Infineon/KitProg3/b81f81489ed6ac43451fac3c585e36b53ef6fe49/KitProg3.cydsn/TopDesign/TopDesign.cysch -------------------------------------------------------------------------------- /KitProg3.cydsn/app_switch.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************//** 2 | * @file app_switch.c 3 | * 4 | * @brief 5 | * Provides the source code to handle the application switching 6 | * for the bootloadable project. 7 | * 8 | * @version KitProg3 v2.60 9 | */ 10 | /* 11 | * Related Documents: 12 | * 002-27868 - KITPROG3 V1.2X EROS 13 | * 002-23369 - KITPROG3 IROS 14 | * 002-26377 - KITPROG3 1.1X TEST PLAN 15 | * 16 | * 17 | ****************************************************************************** 18 | * (c) (2018-2021), Cypress Semiconductor Corporation (an Infineon company) 19 | * or an affiliate of Cypress Semiconductor Corporation. All rights reserved. 20 | * 21 | * This software, associated documentation and materials ("Software") is 22 | * owned by Cypress Semiconductor Corporation or one of its 23 | * affiliates ("Cypress") and is protected by and subject to worldwide 24 | * patent protection (United States and foreign), United States copyright 25 | * laws and international treaty provisions. Therefore, you may use this 26 | * Software only as provided in the license agreement accompanying the 27 | * software package from which you obtained this Software ("EULA"). If 28 | * no EULA applies, then any reproduction, modification, translation, 29 | * compilation, or representation of this Software is prohibited without 30 | * the express written permission of Cypress. 31 | * 32 | * Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO 33 | * WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, 34 | * BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED 35 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 36 | * PARTICULAR PURPOSE. Cypress reserves the right to make 37 | * changes to the Software without notice. Cypress does not assume any 38 | * liability arising out of the application or use of the Software or any 39 | * product or circuit described in the Software. Cypress does not authorize 40 | * its products for use in any products where a malfunction or failure 41 | * of the Cypress product may reasonably be expected to result in significant 42 | * property damage, injury or death ("High Risk Product"). 43 | * By including Cypress's product in a High Risk Product, the manufacturer 44 | * of such system or application assumes all risk of such use and in doing 45 | * so agrees to indemnify Cypress against all liability. 46 | *****************************************************************************/ 47 | 48 | #include "app_switch.h" 49 | #include "Bootloadable.h" 50 | 51 | 52 | /******************************************************************************* 53 | * Function Name: Bootloadable_WriteFlashByte 54 | ****************************************************************************//** 55 | * 56 | * \brief 57 | * This API writes to flash the specified data. 58 | * 59 | * \param address 60 | * The address in flash. 61 | * 62 | * \param inputValue 63 | * One-byte data. 64 | * 65 | * \return 66 | * A status of the writing to flash procedure. 67 | * 68 | *******************************************************************************/ 69 | static cystatus Bootloadable_WriteFlashByte(const uint32_t address, const uint8_t inputValue) 70 | { 71 | cystatus result = CYRET_SUCCESS; 72 | uint32_t flsAddr = address - CYDEV_FLASH_BASE; 73 | uint8_t rowData[CYDEV_FLS_ROW_SIZE]; 74 | 75 | #if !(CY_PSOC4) 76 | uint8_t arrayId = ( uint8_t )(flsAddr / CYDEV_FLS_SECTOR_SIZE); 77 | #endif /* !(CY_PSOC4) */ 78 | 79 | #if (CY_PSOC4) 80 | uint16_t rowNum = ( uint16_t )(flsAddr / CYDEV_FLS_ROW_SIZE); 81 | #else 82 | uint16_t rowNum = ( uint16_t )((flsAddr % CYDEV_FLS_SECTOR_SIZE) / CYDEV_FLS_ROW_SIZE); 83 | #endif /* (CY_PSOC4) */ 84 | 85 | uint32_t baseAddr = address - (address % CYDEV_FLS_ROW_SIZE); 86 | uint16_t idx; 87 | 88 | for(idx = 0u; idx < CYDEV_FLS_ROW_SIZE; idx++) 89 | { 90 | rowData[idx] = (uint8_t)Bootloadable_GET_CODE_DATA(baseAddr + idx); 91 | } 92 | 93 | rowData[address % CYDEV_FLS_ROW_SIZE] = inputValue; 94 | 95 | #if(CY_PSOC4) 96 | result = CySysFlashWriteRow((uint32_t) rowNum, rowData); 97 | #else 98 | result = CyWriteRowData(arrayId, rowNum, rowData); 99 | #endif /* (CY_PSOC4) */ 100 | 101 | #if(CY_PSOC5) 102 | /*************************************************************************** 103 | * When writing to flash, data in the instruction cache can become stale. 104 | * Therefore, the cache data does not correlate to the data just written to 105 | * flash. A call to CyFlushCache() is required to invalidate the data in the 106 | * cache and force fresh information to be loaded from flash. 107 | ***************************************************************************/ 108 | CyFlushCache(); 109 | #endif /* (CY_PSOC5) */ 110 | return (result); 111 | } 112 | 113 | 114 | /******************************************************************************* 115 | * Function Name: Bootloadable_SetActiveApplication 116 | ****************************************************************************//** 117 | * 118 | * \brief 119 | * Sets the application which will be loaded after a next reset event. 120 | * 121 | * \details 122 | * Theory: 123 | * This API sets in the Flash (metadata section) the given active application 124 | * number. 125 | * 126 | * NOTE The active application number is not set directly, but the boolean 127 | * mark instead means that the application is active or not for the relative 128 | * metadata. Both metadata sections are updated. For example, if the second 129 | * application is to be set active, then in the metadata section for the first 130 | * application there will be a "0" written, which means that it is not active, and 131 | * for the second metadata section there will be a "1" written, which means that it is 132 | * active. 133 | * 134 | * NOTE Intended for the combination project type ONLY! 135 | * 136 | * \param appId 137 | * The active application number to be written to flash (metadata section) 138 | * NOTE Possible values are: 139 | * 0 - for the first application 140 | * 1 - for the second application. 141 | * Any other number is considered invalid. 142 | * 143 | * \return 144 | * A status of writing to flash operation. 145 | * \n CYRET_SUCCESS - Returned if appId was successfully changed. 146 | * \n CYRET_BAD_PARAM - Returned if the parameter appID passed to the function has the 147 | * same value as the active application ID. 148 | * \note - The other non-zero value is considered as a failure during writing to flash. 149 | * 150 | * \note - This API does not update Bootloader_activeApp variable. 151 | * 152 | *******************************************************************************/ 153 | cystatus Bootloadable_SetActiveApplication(uint8_t appId) 154 | { 155 | cystatus result = CYRET_SUCCESS; 156 | uint8_t buff[CYDEV_FLS_ROW_SIZE + CYDEV_ECC_ROW_SIZE]; 157 | 158 | /* Use CySetTemp API to initialize SPC. */ 159 | /* This step enables writing to flash memory. */ 160 | /* It's required to change number of active application. */ 161 | if (CYRET_SUCCESS != CySetTemp()) 162 | { 163 | CyHalt(0x00u); 164 | } 165 | 166 | (void)CySetFlashEEBuffer(buff); 167 | 168 | result |= Bootloadable_WriteFlashByte((uint32_t) Bootloadable_MD_BTLDB_ACTIVE_OFFSET(0u), ((0u == appId) ? 1u : 0u)); 169 | result |= Bootloadable_WriteFlashByte((uint32_t) Bootloadable_MD_BTLDB_ACTIVE_OFFSET(1u), ((1u == appId) ? 1u : 0u)); 170 | 171 | return (result); 172 | } 173 | 174 | 175 | /* [] END OF FILE */ 176 | -------------------------------------------------------------------------------- /KitProg3.cydsn/app_switch.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************//** 2 | * @file app_switch.h 3 | * 4 | * @brief 5 | * This file contains the function prototypes and constants used in 6 | * app_switch.c file. 7 | * 8 | * @version KitProg3 v2.60 9 | */ 10 | /* 11 | * Related Documents: 12 | * 002-27868 - KITPROG3 V1.2X EROS 13 | * 002-23369 - KITPROG3 IROS 14 | * 002-26377 - KITPROG3 1.1X TEST PLAN 15 | * 16 | * 17 | ****************************************************************************** 18 | * (c) (2018-2021), Cypress Semiconductor Corporation (an Infineon company) 19 | * or an affiliate of Cypress Semiconductor Corporation. All rights reserved. 20 | * 21 | * This software, associated documentation and materials ("Software") is 22 | * owned by Cypress Semiconductor Corporation or one of its 23 | * affiliates ("Cypress") and is protected by and subject to worldwide 24 | * patent protection (United States and foreign), United States copyright 25 | * laws and international treaty provisions. Therefore, you may use this 26 | * Software only as provided in the license agreement accompanying the 27 | * software package from which you obtained this Software ("EULA"). If 28 | * no EULA applies, then any reproduction, modification, translation, 29 | * compilation, or representation of this Software is prohibited without 30 | * the express written permission of Cypress. 31 | * 32 | * Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO 33 | * WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, 34 | * BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED 35 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 36 | * PARTICULAR PURPOSE. Cypress reserves the right to make 37 | * changes to the Software without notice. Cypress does not assume any 38 | * liability arising out of the application or use of the Software or any 39 | * product or circuit described in the Software. Cypress does not authorize 40 | * its products for use in any products where a malfunction or failure 41 | * of the Cypress product may reasonably be expected to result in significant 42 | * property damage, injury or death ("High Risk Product"). 43 | * By including Cypress's product in a High Risk Product, the manufacturer 44 | * of such system or application assumes all risk of such use and in doing 45 | * so agrees to indemnify Cypress against all liability. 46 | *****************************************************************************/ 47 | 48 | #if !defined(APP_SWITCH_H) 49 | #define APP_SWITCH_H 50 | 51 | #include 52 | 53 | #define Bootloadable_MD_SIZEOF (64u) 54 | #define Bootloadable_MD_BASE_ADDR(appId) (CYDEV_FLASH_BASE + (CYDEV_FLASH_SIZE - ((uint32_t)(appId) * CYDEV_FLS_ROW_SIZE) - Bootloadable_MD_SIZEOF)) 55 | #define Bootloadable_MD_BTLDB_ACTIVE_OFFSET(appId) (Bootloadable_MD_BASE_ADDR(appId) + 16u) 56 | 57 | #define TWO_UARTS_SWITCH_TIMEOUT (2000u) 58 | #define MODE_SWITCH_TIMEOUT (100u) 59 | 60 | cystatus Bootloadable_SetActiveApplication(uint8_t appId); 61 | 62 | #endif /* APP_SWITCH_H */ 63 | 64 | /* [] END OF FILE */ 65 | -------------------------------------------------------------------------------- /KitProg3.cydsn/build_number.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************//** 2 | * @file build_number.h 3 | * 4 | * @brief 5 | * This header file is substituted by Jenkins build machine with actual 6 | * build number. 7 | * 8 | * @version KitProg3 v2.60 9 | */ 10 | /* 11 | * Related Documents: 12 | * 002-27868 - KITPROG3 V1.2X EROS 13 | * 002-23369 - KITPROG3 IROS 14 | * 002-26377 - KITPROG3 1.1X TEST PLAN 15 | * 16 | * 17 | ****************************************************************************** 18 | * (c) (2018-2021), Cypress Semiconductor Corporation (an Infineon company) 19 | * or an affiliate of Cypress Semiconductor Corporation. All rights reserved. 20 | * 21 | * This software, associated documentation and materials ("Software") is 22 | * owned by Cypress Semiconductor Corporation or one of its 23 | * affiliates ("Cypress") and is protected by and subject to worldwide 24 | * patent protection (United States and foreign), United States copyright 25 | * laws and international treaty provisions. Therefore, you may use this 26 | * Software only as provided in the license agreement accompanying the 27 | * software package from which you obtained this Software ("EULA"). If 28 | * no EULA applies, then any reproduction, modification, translation, 29 | * compilation, or representation of this Software is prohibited without 30 | * the express written permission of Cypress. 31 | * 32 | * Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO 33 | * WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, 34 | * BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED 35 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 36 | * PARTICULAR PURPOSE. Cypress reserves the right to make 37 | * changes to the Software without notice. Cypress does not assume any 38 | * liability arising out of the application or use of the Software or any 39 | * product or circuit described in the Software. Cypress does not authorize 40 | * its products for use in any products where a malfunction or failure 41 | * of the Cypress product may reasonably be expected to result in significant 42 | * property damage, injury or death ("High Risk Product"). 43 | * By including Cypress's product in a High Risk Product, the manufacturer 44 | * of such system or application assumes all risk of such use and in doing 45 | * so agrees to indemnify Cypress against all liability. 46 | *****************************************************************************/ 47 | 48 | #if !defined(BUILD_NUMBER_H) 49 | #define BUILD_NUMBER_H 50 | 51 | #define BUILD_NUMBER (0) 52 | 53 | #endif /* BUILD_NUMBER_H */ 54 | -------------------------------------------------------------------------------- /KitProg3.cydsn/commandprocessor.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************//** 2 | * @file commandprocessor.h 3 | * 4 | * @brief 5 | * This file contains the function prototypes and constants used in 6 | * the commandProcessor.c 7 | * 8 | * @version KitProg3 v2.60 9 | */ 10 | /* 11 | * Related Documents: 12 | * 002-27868 - KITPROG3 V1.2X EROS 13 | * 002-23369 - KITPROG3 IROS 14 | * 002-26377 - KITPROG3 1.1X TEST PLAN 15 | * 16 | * 17 | ****************************************************************************** 18 | * (c) (2018-2021), Cypress Semiconductor Corporation (an Infineon company) 19 | * or an affiliate of Cypress Semiconductor Corporation. All rights reserved. 20 | * 21 | * This software, associated documentation and materials ("Software") is 22 | * owned by Cypress Semiconductor Corporation or one of its 23 | * affiliates ("Cypress") and is protected by and subject to worldwide 24 | * patent protection (United States and foreign), United States copyright 25 | * laws and international treaty provisions. Therefore, you may use this 26 | * Software only as provided in the license agreement accompanying the 27 | * software package from which you obtained this Software ("EULA"). If 28 | * no EULA applies, then any reproduction, modification, translation, 29 | * compilation, or representation of this Software is prohibited without 30 | * the express written permission of Cypress. 31 | * 32 | * Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO 33 | * WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, 34 | * BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED 35 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 36 | * PARTICULAR PURPOSE. Cypress reserves the right to make 37 | * changes to the Software without notice. Cypress does not assume any 38 | * liability arising out of the application or use of the Software or any 39 | * product or circuit described in the Software. Cypress does not authorize 40 | * its products for use in any products where a malfunction or failure 41 | * of the Cypress product may reasonably be expected to result in significant 42 | * property damage, injury or death ("High Risk Product"). 43 | * By including Cypress's product in a High Risk Product, the manufacturer 44 | * of such system or application assumes all risk of such use and in doing 45 | * so agrees to indemnify Cypress against all liability. 46 | *****************************************************************************/ 47 | 48 | #if !defined(COMMAND_PROCESSOR_H) 49 | #define COMMAND_PROCESSOR_H 50 | 51 | /***************************************************************************** 52 | * MACRO Definition 53 | *****************************************************************************/ 54 | #define SET (0x01u) 55 | #define NOT_SET (0x00u) 56 | 57 | /* Power Status Commands */ 58 | #define POWER_SUPPLIED_INVERSE (0x00u) 59 | #define POWER_NOT_SUPPLIED (0x01u) 60 | #define POWER_SUPPLIED (0x01u) 61 | #define POWER_DETECTED (0x02u) 62 | #define ACK_POWER_NOT_DETECTED (0x00u) 63 | #define ACK_POWER_DETECTED (0x40u) 64 | 65 | #define SWD_OUT_EP_LENGTH (64u) 66 | 67 | #endif /* COMMAND_PROCESSOR_H */ 68 | -------------------------------------------------------------------------------- /KitProg3.cydsn/device.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * This file is automatically generated by PSoC Creator 3 | * and should not be edited by hand. 4 | * 5 | * This file is necessary for your project to build. 6 | * Please do not delete it. 7 | ******************************************************************************** 8 | * Copyright 2008-2011, Cypress Semiconductor Corporation. All rights reserved. 9 | * You may use this file only in accordance with the license, terms, conditions, 10 | * disclaimers, and limitations in the end user license agreement accompanying 11 | * the software package with which this file was provided. 12 | *******************************************************************************/ 13 | 14 | #ifndef DEVICE_H 15 | #define DEVICE_H 16 | #include 17 | 18 | #endif 19 | /* [] END OF FILE */ 20 | -------------------------------------------------------------------------------- /KitProg3.cydsn/images/CY_google.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Infineon/KitProg3/b81f81489ed6ac43451fac3c585e36b53ef6fe49/KitProg3.cydsn/images/CY_google.jpg -------------------------------------------------------------------------------- /KitProg3.cydsn/images/CyLogo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Infineon/KitProg3/b81f81489ed6ac43451fac3c585e36b53ef6fe49/KitProg3.cydsn/images/CyLogo.pdf -------------------------------------------------------------------------------- /KitProg3.cydsn/images/footer.tex: -------------------------------------------------------------------------------- 1 | % Latex footer for doxygen 1.8.9.1 2 | %--- End generated contents --- 3 | 4 | % Index 5 | \backmatter 6 | \newpage 7 | \phantomsection 8 | \clearemptydoublepage 9 | \addcontentsline{toc}{chapter}{Index} 10 | \printindex 11 | 12 | \end{document} 13 | -------------------------------------------------------------------------------- /KitProg3.cydsn/images/header.tex: -------------------------------------------------------------------------------- 1 | % Latex header for doxygen 1.8.9.1 2 | \documentclass[twoside]{book} 3 | 4 | % Packages required by doxygen 5 | \usepackage{fixltx2e} 6 | \usepackage{calc} 7 | \usepackage{doxygen} 8 | \usepackage[export]{adjustbox} % also loads graphicx 9 | \usepackage{graphicx} 10 | \usepackage[utf8]{inputenc} 11 | \usepackage{makeidx} 12 | \usepackage{multicol} 13 | \usepackage{multirow} 14 | \PassOptionsToPackage{warn}{textcomp} 15 | \usepackage{textcomp} 16 | \usepackage[nointegrals]{wasysym} 17 | \usepackage[table]{xcolor} 18 | 19 | % Font selection 20 | \usepackage[T1]{fontenc} 21 | \usepackage[scaled=.90]{helvet} 22 | \usepackage{courier} 23 | \usepackage{amssymb} 24 | \usepackage{sectsty} 25 | \renewcommand{\familydefault}{\sfdefault} 26 | \allsectionsfont{% 27 | \fontseries{bc}\selectfont% 28 | \color{darkgray}% 29 | } 30 | \renewcommand{\DoxyLabelFont}{% 31 | \fontseries{bc}\selectfont% 32 | \color{darkgray}% 33 | } 34 | \newcommand{\+}{\discretionary{\mbox{\scriptsize$\hookleftarrow$}}{}{}} 35 | 36 | % Page & text layout 37 | \usepackage{geometry} 38 | \geometry{% 39 | a4paper,% 40 | top=2.5cm,% 41 | bottom=2.5cm,% 42 | left=2.5cm,% 43 | right=2.5cm% 44 | } 45 | \tolerance=750 46 | \hfuzz=15pt 47 | \hbadness=750 48 | \setlength{\emergencystretch}{15pt} 49 | \setlength{\parindent}{0cm} 50 | \setlength{\parskip}{0.2cm} 51 | \makeatletter 52 | \renewcommand{\paragraph}{% 53 | \@startsection{paragraph}{4}{0ex}{-1.0ex}{1.0ex}{% 54 | \normalfont\normalsize\bfseries\SS@parafont% 55 | }% 56 | } 57 | \renewcommand{\subparagraph}{% 58 | \@startsection{subparagraph}{5}{0ex}{-1.0ex}{1.0ex}{% 59 | \normalfont\normalsize\bfseries\SS@subparafont% 60 | }% 61 | } 62 | \makeatother 63 | 64 | % Headers & footers 65 | \usepackage{fancyhdr} 66 | \pagestyle{fancyplain} 67 | \fancyhead[LE]{\fancyplain{}{\bfseries\thepage}} 68 | \fancyhead[CE]{\fancyplain{}{}} 69 | \fancyhead[RE]{\fancyplain{}{\bfseries\leftmark}} 70 | \fancyhead[LO]{\fancyplain{}{\bfseries\rightmark}} 71 | \fancyhead[CO]{\fancyplain{}{}} 72 | \fancyhead[RO]{\fancyplain{}{\bfseries\thepage}} 73 | \fancyfoot[LE]{\fancyplain{}{}} 74 | \fancyfoot[CE]{\fancyplain{}{}} 75 | \fancyfoot[RE]{\fancyplain{}{\bfseries\scriptsize Generated for KitProg Firmware Stack by Doxygen }} 76 | \fancyfoot[LO]{\fancyplain{}{\bfseries\scriptsize Generated for KitProg Firmware Stack by Doxygen }} 77 | \fancyfoot[CO]{\fancyplain{}{}} 78 | \fancyfoot[RO]{\fancyplain{}{}} 79 | \renewcommand{\footrulewidth}{0.4pt} 80 | \renewcommand{\chaptermark}[1]{% 81 | \markboth{#1}{}% 82 | } 83 | \renewcommand{\sectionmark}[1]{% 84 | \markright{\thesection\ #1}% 85 | } 86 | 87 | % Indices & bibliography 88 | \usepackage{natbib} 89 | \usepackage[titles]{tocloft} 90 | \setcounter{tocdepth}{3} 91 | \setcounter{secnumdepth}{5} 92 | \makeindex 93 | 94 | % Hyperlinks (required, but should be loaded last) 95 | \usepackage{ifpdf} 96 | \ifpdf 97 | \usepackage[pdftex,pagebackref=true]{hyperref} 98 | \else 99 | \usepackage[ps2pdf,pagebackref=true]{hyperref} 100 | \fi 101 | \hypersetup{% 102 | colorlinks=true,% 103 | linkcolor=blue,% 104 | citecolor=blue,% 105 | unicode% 106 | } 107 | 108 | % Custom commands 109 | \newcommand{\clearemptydoublepage}{% 110 | \newpage{\pagestyle{empty}\cleardoublepage}% 111 | } 112 | 113 | 114 | %===== C O N T E N T S ===== 115 | 116 | \begin{document} 117 | 118 | % Titlepage & ToC 119 | \hypersetup{pageanchor=false, 120 | bookmarks=true, 121 | bookmarksnumbered=true, 122 | pdfencoding=unicode 123 | } 124 | \pagenumbering{roman} 125 | \begin{titlepage} 126 | \vspace*{1cm} 127 | \begin{figure} 128 | \includegraphics{CyLogo} 129 | \end{figure} 130 | 131 | \vspace*{6cm} 132 | \begin{center}% 133 | {\hfill \Large \textbf{KitProg3\textsuperscript{TM}\ Firmware}} 134 | 135 | {\hfill \Large \textbf{API Reference Guide}} 136 | 137 | {\hfill \Large \textbf{Version 1.0.0}}\\ 138 | \end{center} 139 | \vspace*{6cm} 140 | \hfill Cypress Semiconductor 141 | 142 | \hfill 198 Champion Court 143 | 144 | \hfill San Jose, CA 95134-1709 145 | 146 | \hfill Phone (USA): 800.858.1810 147 | 148 | \hfill Phone (Intnl): 408.943.2600 149 | 150 | \hfill http://www.cypress.com 151 | 152 | \vspace*{1cm} 153 | \end{titlepage} 154 | 155 | \vspace*{1cm} 156 | {\large Copyright \copyright\ 2015-2018 Cypress Semiconductor Corporation. All rights reserved.}\\ 157 | 158 | The information in this document is subject to change without notice and should not be construed as 159 | a commitment by Cypress. While reasonable precautions have been taken, Cypress assumes no responsibility 160 | for any errors that may appear in this document. No part of this document may be copied or reproduced in 161 | any form or by any means without the prior written consent of Cypress. Made in the U.S.A. 162 | 163 | \vspace*{1cm} 164 | \textbf{Disclaimer}\\ 165 | CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS 166 | MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 167 | FITNESS FOR A PARTICULAR PURPOSE. Cypress reserves the right to make changes without 168 | further notice to the materials described herein. Cypress does not assume any liability 169 | arising out of the application or use of any product or circuit described herein. Cypress 170 | does not authorize its products for use as critical components in life-support systems 171 | where a malfunction or failure may reasonably be expected to result in significant injury 172 | to the user. The inclusion of Cypress' product in a life-support systems application 173 | implies that the manufacturer assumes all risk of such use and in doing so indemnifies 174 | Cypress against all charges. 175 | 176 | \vspace*{1cm} 177 | \textbf{License Agreement}\\ 178 | Please read the license agreement during SDK installation. 179 | 180 | \clearemptydoublepage 181 | \tableofcontents 182 | \clearemptydoublepage 183 | \pagenumbering{arabic} 184 | \hypersetup{pageanchor=true} 185 | 186 | %--- Begin generated contents --- 187 | -------------------------------------------------------------------------------- /KitProg3.cydsn/jtag.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************//** 2 | * @file jtag.h 3 | * 4 | * @brief 5 | * This file contains the function prototypes and constants for jtag communication. 6 | * 7 | * @version KitProg3 v2.60 8 | */ 9 | /* 10 | * Related Documents: 11 | * 002-27868 - KITPROG3 V1.2X EROS 12 | * 002-23369 - KITPROG3 IROS 13 | * 002-26377 - KITPROG3 1.1X TEST PLAN 14 | * 15 | * 16 | ****************************************************************************** 17 | * (c) (2018-2021), Cypress Semiconductor Corporation (an Infineon company) 18 | * or an affiliate of Cypress Semiconductor Corporation. All rights reserved. 19 | * 20 | * This software, associated documentation and materials ("Software") is 21 | * owned by Cypress Semiconductor Corporation or one of its 22 | * affiliates ("Cypress") and is protected by and subject to worldwide 23 | * patent protection (United States and foreign), United States copyright 24 | * laws and international treaty provisions. Therefore, you may use this 25 | * Software only as provided in the license agreement accompanying the 26 | * software package from which you obtained this Software ("EULA"). If 27 | * no EULA applies, then any reproduction, modification, translation, 28 | * compilation, or representation of this Software is prohibited without 29 | * the express written permission of Cypress. 30 | * 31 | * Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO 32 | * WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, 33 | * BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED 34 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 35 | * PARTICULAR PURPOSE. Cypress reserves the right to make 36 | * changes to the Software without notice. Cypress does not assume any 37 | * liability arising out of the application or use of the Software or any 38 | * product or circuit described in the Software. Cypress does not authorize 39 | * its products for use in any products where a malfunction or failure 40 | * of the Cypress product may reasonably be expected to result in significant 41 | * property damage, injury or death ("High Risk Product"). 42 | * By including Cypress's product in a High Risk Product, the manufacturer 43 | * of such system or application assumes all risk of such use and in doing 44 | * so agrees to indemnify Cypress against all liability. 45 | *****************************************************************************/ 46 | 47 | #if !defined(JTAG_H) 48 | #define JTAG_H 49 | 50 | #include 51 | #include "cypins.h" 52 | #include "TDI.h" 53 | #include "TDO_SWO.h" 54 | 55 | /***************************************************************************** 56 | * MACRO Definition 57 | *****************************************************************************/ 58 | /* Define shared pins with SWD interface */ 59 | #define JTAG_SET_TMS_OUT (SWD_SET_SDA_OUT) 60 | #define JTAG_SET_TMS_IN (SWD_SET_SDA_IN) 61 | #define JTAG_SET_TCK_OUT (SWD_SET_SCK_OUT) 62 | #define JTAG_SET_TCK_IN (SWD_SET_SCK_IN) 63 | #define JTAG_SET_XRES_OUT (SWD_SET_XRES_OUT) 64 | #define JTAG_SET_XRES_IN (SWD_SET_XRES_IN) 65 | 66 | #define JTAG_SET_TMS_LO (SWD_SET_SDA_LO) 67 | #define JTAG_SET_TMS_HI (SWD_SET_SDA_HI) 68 | #define JTAG_SET_TCK_LO (SWD_SET_SCK_LO) 69 | #define JTAG_SET_TCK_HI (SWD_SET_SCK_HI) 70 | #define JTAG_SET_XRES_LO (SWD_SET_XRES_LO) 71 | #define JTAG_SET_XRES_HI (SWD_SET_XRES_HI) 72 | 73 | 74 | /* Programming pin drive modes */ 75 | #define JTAG_SET_TDI_OUT CyPins_SetPinDriveMode(TDI_0, TDI_DM_STRONG) 76 | #define JTAG_SET_TDI_IN CyPins_SetPinDriveMode(TDI_0, TDI_DM_DIG_HIZ) 77 | #define JTAG_SET_TDO_OUT CyPins_SetPinDriveMode(TDO_SWO_0, TDO_SWO_DM_STRONG) 78 | #define JTAG_SET_TDO_IN CyPins_SetPinDriveMode(TDO_SWO_0, TDO_SWO_DM_DIG_HIZ) 79 | 80 | /* Bit banding of the peripheral addresses for flexibility in addressing TDI and TDO */ 81 | /* Convert Peripheral address to peripheral bit map region */ 82 | #define BITBAND_PERI_REF (0x40000000u) 83 | #define BITBAND_PERI_BASE (0x42000000u) 84 | 85 | #define JTAG_TDI_DATA (*((volatile uint8_t *)(((BITBAND_PERI_BASE) + (((TDI__DR)-(BITBAND_PERI_REF))*32u) + ((TDI_SHIFT)*4u))))) 86 | #define JTAG_TDO_DATA (*((volatile uint8_t *)(((BITBAND_PERI_BASE) + (((TDO_SWO__DR)-(BITBAND_PERI_REF))*32u) + ((TDO_SWO_SHIFT)*4u))))) 87 | 88 | #define JTAG_TDI (*((volatile uint8_t *)(((BITBAND_PERI_BASE) + (((TDI__PS)-(BITBAND_PERI_REF))*32u) + ((TDI_SHIFT)*4u))))) 89 | #define JTAG_TDO (*((volatile uint8_t *)(((BITBAND_PERI_BASE) + (((TDO_SWO__PS)-(BITBAND_PERI_REF))*32u) + ((TDO_SWO_SHIFT)*4u))))) 90 | 91 | #define JTAG_SET_TDI_LO ((JTAG_TDI_DATA) = 0u) 92 | #define JTAG_SET_TDI_HI ((JTAG_TDI_DATA) = 1u) 93 | #define JTAG_SET_TDO_LO ((JTAG_TDO_DATA) = 0u) 94 | #define JTAG_SET_TDO_HI ((JTAG_TDO_DATA) = 1u) 95 | 96 | #define JTAG_GET_TDI (JTAG_TDI) 97 | #define JTAG_GET_TDO (JTAG_TDO) 98 | 99 | #endif /* JTAG_H */ 100 | /* [] END OF FILE */ -------------------------------------------------------------------------------- /KitProg3.cydsn/kitprog.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************//** 2 | * @file kitprog.h 3 | * 4 | * @brief 5 | * This file contains the function prototypes and constants used in 6 | * main.c 7 | * 8 | * @version KitProg3 v2.60 9 | */ 10 | /* 11 | * Related Documents: 12 | * 002-27868 - KITPROG3 V1.2X EROS 13 | * 002-23369 - KITPROG3 IROS 14 | * 002-26377 - KITPROG3 1.1X TEST PLAN 15 | * 16 | * 17 | ****************************************************************************** 18 | * (c) (2018-2023), Cypress Semiconductor Corporation (an Infineon company) 19 | * or an affiliate of Cypress Semiconductor Corporation. All rights reserved. 20 | * 21 | * This software, associated documentation and materials ("Software") is 22 | * owned by Cypress Semiconductor Corporation or one of its 23 | * affiliates ("Cypress") and is protected by and subject to worldwide 24 | * patent protection (United States and foreign), United States copyright 25 | * laws and international treaty provisions. Therefore, you may use this 26 | * Software only as provided in the license agreement accompanying the 27 | * software package from which you obtained this Software ("EULA"). If 28 | * no EULA applies, then any reproduction, modification, translation, 29 | * compilation, or representation of this Software is prohibited without 30 | * the express written permission of Cypress. 31 | * 32 | * Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO 33 | * WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, 34 | * BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED 35 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 36 | * PARTICULAR PURPOSE. Cypress reserves the right to make 37 | * changes to the Software without notice. Cypress does not assume any 38 | * liability arising out of the application or use of the Software or any 39 | * product or circuit described in the Software. Cypress does not authorize 40 | * its products for use in any products where a malfunction or failure 41 | * of the Cypress product may reasonably be expected to result in significant 42 | * property damage, injury or death ("High Risk Product"). 43 | * By including Cypress's product in a High Risk Product, the manufacturer 44 | * of such system or application assumes all risk of such use and in doing 45 | * so agrees to indemnify Cypress against all liability. 46 | *****************************************************************************/ 47 | 48 | #if !defined(KITPROG_H) 49 | #define KITPROG_H 50 | 51 | #include 52 | #include 53 | 54 | /* USB endpoint usage */ 55 | #define CMSIS_HID_IN_EP (0x01u) 56 | #define CMSIS_HID_OUT_EP (0x02u) 57 | 58 | #define CMSIS_BULK_IN_EP (0x02u) 59 | #define CMSIS_BULK_OUT_EP (0x01u) 60 | 61 | #define HID_REPORT_INPUT (0x01u) 62 | #define HID_REPORT_FEATURE (0x02u) 63 | #define HID_REPORT_OUTPUT (0x03u) 64 | #define USBD_HID_REQ_EP_INT (0x04u) 65 | #define USBD_HID_REQ_EP_CTRL (0x05u) 66 | #define USBD_HID_REQ_PERIOD_UPDATE (0x06u) 67 | 68 | /* ASCII symbols */ 69 | #define ASCII_DOUBLE_CLAWS 0x22u 70 | #define ASCII_OPENING_BRACKET 0x28u 71 | 72 | /***************************************************************************** 73 | * MACRO Definition 74 | *****************************************************************************/ 75 | #define IDLE (0x00u) 76 | #define BUSY (0x02u) 77 | #define ERROR (0xFFu) 78 | 79 | /* USB endpoint usage */ 80 | #define HOST_IN_EP (0x01u) 81 | #define HOST_OUT_EP (0x02u) 82 | #define UART_INT_EP (0x05u) 83 | #define UART_IN_EP (0x06u) 84 | #define UART_OUT_EP (0x07u) 85 | 86 | /* KitProg3 modes */ 87 | #define MODE_BULK (0x00u) 88 | #define MODE_HID (0x01u) 89 | #define MODE_BULK2UARTS (0x02u) 90 | 91 | /* Corresponding with mode and HWID USBFS devices */ 92 | #define MODE_KP3_BULK (0x00u) 93 | #define MODE_KP3_HID (0x01u) 94 | #define MODE_KP3_BULK2UARTS (0x02u) 95 | #define MODE_MP_BULK (0x03u) 96 | #define MODE_MP_HID (0x04u) 97 | #define MODE_BULK2UARTS_HCI_PERI (0x05u) 98 | #define MODE_BULK_HCI_PERI (0x06u) 99 | #define MODE_HID_HCI_PERI (0x07u) 100 | 101 | #define USB_WAIT_FOR_VBUS (0x01u) 102 | #define USB_START_COMPONENT (0x02u) 103 | #define USB_WAIT_FOR_CONFIG (0x03u) 104 | #define USB_CONFIGURED (0x04u) 105 | #define USB_READY_BULK (0x05u) 106 | #define USB_READY_HID (0x06u) 107 | #define USB_HALT (0x07u) 108 | 109 | #define DEVICE_ACQUIRE (0x01u) 110 | #define VERIFY_SILICON_ID (0x02u) 111 | #define ERASE_ALL_FLASH (0x03u) 112 | #define CHECKSUM_PRIVILIGED (0x04u) 113 | #define PROGRAM_FLASH (0x05u) 114 | #define VERIFY_FLASH (0x06u) 115 | #define PROGRAM_PROT_SETTINGS (0x07u) 116 | #define VERIFY_PROT_SETTINGS (0x08u) 117 | #define VERIFY_CHECKSUM (0x09u) 118 | 119 | #define ONE_MS_DELAY (0x01u) 120 | #define MODE_SWITCHING_TIMEOUT (3000u) 121 | 122 | #define STATUS_MSG_SIZE (60u) 123 | #define MSG_NUM_HEX_NOT_VALID (10u) 124 | #define MSG_NUM_SFLASH_SROM_ERROR (11u) 125 | 126 | /* Data shift */ 127 | #define SHIFT_28 (28u) 128 | #define SHIFT_20 (20u) 129 | #define SHIFT_12 (12u) 130 | #define SHIFT_4 (4u) 131 | #define SHIFT_2 (2u) 132 | 133 | #define BYTE_NIBBLE_BYTE (0x0000000Fu) 134 | 135 | /* DWT Program Counter Sample register */ 136 | #define DWT_PC_SAMPLE_ADDR CYDEV_DWT_PC_SAMPLE 137 | 138 | /* Slot#2 start address of PSoC5lp flash */ 139 | /* DAPLink Begins in Last 32 Kilobytes of KitProg3 Image */ 140 | #define SLOT2_BASE_ADDR (uint32_t*)(0x00021800u - (1024u*32u)) 141 | 142 | #define DIE_ID_LEN 0x08u 143 | 144 | /* inline macros */ 145 | #ifndef __STATIC_FORCEINLINE 146 | #define __STATIC_FORCEINLINE __attribute__((always_inline)) static inline 147 | #endif 148 | 149 | /***************************************************************************** 150 | * Global Variable Declaration 151 | *****************************************************************************/ 152 | extern volatile uint8_t currentMode; 153 | extern volatile uint8_t currentFirstUartMode; 154 | extern volatile uint8_t currentSecondUartMode; 155 | extern volatile bool usbResetDetected; 156 | extern bool usbDapReadFlag; 157 | extern volatile bool gpioChanged; 158 | 159 | #define DEFAULT_UART_FLOW_CONTROL (0x00u) 160 | #define UART_NO_FLOW_CONTROL (0x01u) 161 | #define UART_HW_FLOW_CONTROL (0x02u) 162 | 163 | /***************************************************************************** 164 | * External Function Prototypes 165 | *****************************************************************************/ 166 | void usbd_hid_init(void); 167 | uint32_t usbd_hid_get_report(uint8_t rtype, uint8_t rid, uint8_t *buf, uint8_t req); 168 | void usbd_hid_set_report(uint8_t rtype, uint8_t rid, uint8_t *buf, uint8_t len, uint8_t req); 169 | void usbd_hid_process(void); /* Function from the official ARM library. */ 170 | void usbd_bulk_process(void); /* Function for handling CMSIS_DAP 2.0 */ 171 | 172 | #endif /* KITPROG_H */ 173 | -------------------------------------------------------------------------------- /KitProg3.cydsn/led.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************//** 2 | * @file led.c 3 | * 4 | * @brief 5 | * This file provides the source code to handle LEDs used to display device 6 | * state. 7 | * 8 | * @version KitProg3 v2.60 9 | */ 10 | /* 11 | * Related Documents: 12 | * 002-27868 - KITPROG3 V1.2X EROS 13 | * 002-23369 - KITPROG3 IROS 14 | * 002-26377 - KITPROG3 1.1X TEST PLAN 15 | * 16 | * 17 | ****************************************************************************** 18 | * (c) (2018-2022), Cypress Semiconductor Corporation (an Infineon company) 19 | * or an affiliate of Cypress Semiconductor Corporation. All rights reserved. 20 | * 21 | * This software, associated documentation and materials ("Software") is 22 | * owned by Cypress Semiconductor Corporation or one of its 23 | * affiliates ("Cypress") and is protected by and subject to worldwide 24 | * patent protection (United States and foreign), United States copyright 25 | * laws and international treaty provisions. Therefore, you may use this 26 | * Software only as provided in the license agreement accompanying the 27 | * software package from which you obtained this Software ("EULA"). If 28 | * no EULA applies, then any reproduction, modification, translation, 29 | * compilation, or representation of this Software is prohibited without 30 | * the express written permission of Cypress. 31 | * 32 | * Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO 33 | * WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, 34 | * BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED 35 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 36 | * PARTICULAR PURPOSE. Cypress reserves the right to make 37 | * changes to the Software without notice. Cypress does not assume any 38 | * liability arising out of the application or use of the Software or any 39 | * product or circuit described in the Software. Cypress does not authorize 40 | * its products for use in any products where a malfunction or failure 41 | * of the Cypress product may reasonably be expected to result in significant 42 | * property damage, injury or death ("High Risk Product"). 43 | * By including Cypress's product in a High Risk Product, the manufacturer 44 | * of such system or application assumes all risk of such use and in doing 45 | * so agrees to indemnify Cypress against all liability. 46 | *****************************************************************************/ 47 | 48 | #include "led.h" 49 | #include "device.h" 50 | #include "version.h" 51 | 52 | #define LED_RED_OFF (0x00u) /* x0 in Led_Control_Reg */ 53 | #define LED_RED_ON (0x01u) /* x0 in Led_Control_Reg */ 54 | #define LED_AMBER_BREATHING_1HZ (0x00u) /* 0x in Led_Control_Reg */ 55 | #define LED_AMBER_DISCRETE (0x02u) /* 1x in Led_Control_Reg */ 56 | 57 | /* LED Green shift register values (2 bits)*/ 58 | #define LED_GREEN_OFF (0x00u) 59 | #define LED_GREEN_8HZ (0x01u) 60 | #define LED_GREEN_ON (0x03u) 61 | 62 | /* LED Amber shift register values (32 bits)*/ 63 | #define LED_AMBER_2HZ_2PULULSE_1S_OFF (0xFFFFF0F0u) 64 | #define LED_AMBER_8HZ (0x55555555u) 65 | #define LED_AMBER_ON (0xFFFFFFFFu) 66 | #define LED_AMBER_128MS_1875MS (0x00000003u) 67 | 68 | /******************************************************************************* 69 | * Function Name: Led_Init() 70 | ******************************************************************************** 71 | * Summary: 72 | * Initialize the LEDs depending on kit HW revision. Disables pins used for green 73 | * and red LEDs in the case kit has only one led. 74 | * 75 | * Parameters: 76 | * None 77 | * 78 | * Return: 79 | * None 80 | * 81 | *******************************************************************************/ 82 | void Led_Init(void) 83 | { 84 | Clk_Brea1_Enable(); 85 | Clk_Brea2_Enable(); 86 | PWM_16Hz_Start(); 87 | ShiftReg_LED_Green_Start(); 88 | ShiftReg_LED_Amber_Start(); 89 | if (!KitHasThreeLeds()) 90 | { 91 | if (!KitHasUartIndicator()) 92 | { 93 | /* Set unused Red and Green LEDs pins to Hi-Z to save power */ 94 | CyPins_SetPinDriveMode(LED_Red_0, PIN_DM_ALG_HIZ); 95 | CyPins_SetPinDriveMode(LED_Green_0, PIN_DM_ALG_HIZ); 96 | } 97 | else 98 | { 99 | /* Reuse status 2 LEDs for devices with UART indication supported */ 100 | LED_Green_BYP = (uint8_t)(LED_Green_BYP & ~LED_Green_MASK); 101 | LED_Red_BYP = (uint8_t)(LED_Red_BYP & ~ LED_Red_MASK); 102 | CyPins_SetPinDriveMode(LED_Red_0, PIN_DM_OD_HI); 103 | CyPins_SetPinDriveMode(LED_Green_0, PIN_DM_OD_HI); 104 | } 105 | } 106 | else 107 | { 108 | /* Initialize Amber LED 16Hz shift register for permanent on */ 109 | ShiftReg_LED_Amber_WriteRegValue(LED_AMBER_ON); 110 | } 111 | } 112 | 113 | /******************************************************************************* 114 | * Function Name: Led_SetState() 115 | ******************************************************************************** 116 | * Summary: 117 | * Set LEDs state 118 | * 119 | * Parameters: 120 | * None 121 | * 122 | * Return: 123 | * None 124 | * 125 | *******************************************************************************/ 126 | void Led_SetState(led_state_enum state) 127 | { 128 | /* This value encodes the mode of the Amber LED (breathing/discrete) and the Red LED (on/off) on kits with three LEDs */ 129 | static const uint8_t controlValues3Leds[LED_NUM_OF_STATES] = { 130 | [LED_ALL_OFF] = (LED_AMBER_BREATHING_1HZ | LED_RED_OFF), 131 | 132 | [LED_CMSIS_BULK_READY] = (LED_AMBER_DISCRETE | LED_RED_OFF), 133 | [LED_CMSIS_BULK_PROGRAMMING] = (LED_AMBER_DISCRETE | LED_RED_OFF), 134 | [LED_CMSIS_BULK_SUCCESS] = (LED_AMBER_DISCRETE | LED_RED_OFF), 135 | [LED_CMSIS_BULK_ERROR] = (LED_AMBER_DISCRETE | LED_RED_ON), 136 | 137 | [LED_CMSIS_HID_READY] = (LED_AMBER_BREATHING_1HZ | LED_RED_OFF), 138 | [LED_CMSIS_HID_PROGRAMMING] = (LED_AMBER_BREATHING_1HZ | LED_RED_OFF), 139 | [LED_CMSIS_HID_SUCCESS] = (LED_AMBER_BREATHING_1HZ | LED_RED_OFF), 140 | [LED_CMSIS_HID_ERROR] = (LED_AMBER_BREATHING_1HZ | LED_RED_ON), 141 | 142 | [LED_CMSIS_BULK_2_READY] = (LED_AMBER_DISCRETE | LED_RED_OFF), 143 | [LED_CMSIS_BULK_2_PROGRAMMING] = (LED_AMBER_DISCRETE | LED_RED_OFF), 144 | [LED_CMSIS_BULK_2_SUCCESS] = (LED_AMBER_DISCRETE | LED_RED_OFF), 145 | [LED_CMSIS_BULK_2_ERROR] = (LED_AMBER_DISCRETE | LED_RED_ON) 146 | }; 147 | /* This value encodes the mode of the Amber LED (breathing/discrete) on kits with one LED) */ 148 | static const uint8_t controlValues1Led[LED_NUM_OF_STATES] = { 149 | [LED_ALL_OFF] = LED_AMBER_BREATHING_1HZ, 150 | 151 | [LED_CMSIS_BULK_READY] = LED_AMBER_DISCRETE, 152 | [LED_CMSIS_BULK_PROGRAMMING] = LED_AMBER_DISCRETE, 153 | [LED_CMSIS_BULK_SUCCESS] = LED_AMBER_DISCRETE, 154 | [LED_CMSIS_BULK_ERROR] = LED_AMBER_DISCRETE, 155 | 156 | [LED_CMSIS_HID_READY] = LED_AMBER_BREATHING_1HZ, 157 | [LED_CMSIS_HID_PROGRAMMING] = LED_AMBER_DISCRETE, 158 | [LED_CMSIS_HID_SUCCESS] = LED_AMBER_BREATHING_1HZ, 159 | [LED_CMSIS_HID_ERROR] = LED_AMBER_DISCRETE, 160 | 161 | [LED_CMSIS_BULK_2_READY] = LED_AMBER_DISCRETE, 162 | [LED_CMSIS_BULK_2_PROGRAMMING] = LED_AMBER_DISCRETE, 163 | [LED_CMSIS_BULK_2_SUCCESS] = LED_AMBER_DISCRETE, 164 | [LED_CMSIS_BULK_2_ERROR] = LED_AMBER_DISCRETE 165 | }; 166 | /* Green LED shift register values */ 167 | static const uint8_t greenLedSrValues[LED_NUM_OF_STATES] = { 168 | [LED_ALL_OFF] = LED_GREEN_OFF, 169 | 170 | [LED_CMSIS_BULK_READY] = LED_GREEN_OFF, 171 | [LED_CMSIS_BULK_PROGRAMMING] = LED_GREEN_8HZ, 172 | [LED_CMSIS_BULK_SUCCESS] = LED_GREEN_ON, 173 | [LED_CMSIS_BULK_ERROR] = LED_GREEN_OFF, 174 | 175 | [LED_CMSIS_HID_READY] = LED_GREEN_OFF, 176 | [LED_CMSIS_HID_PROGRAMMING] = LED_GREEN_8HZ, 177 | [LED_CMSIS_HID_SUCCESS] = LED_GREEN_ON, 178 | [LED_CMSIS_HID_ERROR] = LED_GREEN_OFF, 179 | 180 | [LED_CMSIS_BULK_2_READY] = LED_GREEN_OFF, 181 | [LED_CMSIS_BULK_2_PROGRAMMING] = LED_GREEN_8HZ, 182 | [LED_CMSIS_BULK_2_SUCCESS] = LED_GREEN_ON, 183 | [LED_CMSIS_BULK_2_ERROR] = LED_GREEN_OFF 184 | }; 185 | 186 | /* Amber LED shift register values, 1LED version */ 187 | static const uint32_t amberLedSrValues[LED_NUM_OF_STATES] = { 188 | [LED_ALL_OFF] = LED_AMBER_ON, 189 | 190 | [LED_CMSIS_BULK_READY] = LED_AMBER_ON, 191 | [LED_CMSIS_BULK_PROGRAMMING] = LED_AMBER_8HZ, 192 | [LED_CMSIS_BULK_SUCCESS] = LED_AMBER_ON, 193 | [LED_CMSIS_BULK_ERROR] = LED_AMBER_128MS_1875MS, 194 | 195 | [LED_CMSIS_HID_READY] = LED_AMBER_ON, 196 | [LED_CMSIS_HID_PROGRAMMING] = LED_AMBER_8HZ, 197 | [LED_CMSIS_HID_SUCCESS] = LED_AMBER_ON, 198 | [LED_CMSIS_HID_ERROR] = LED_AMBER_128MS_1875MS, 199 | 200 | [LED_CMSIS_BULK_2_READY] = LED_AMBER_2HZ_2PULULSE_1S_OFF, 201 | [LED_CMSIS_BULK_2_PROGRAMMING] = LED_AMBER_8HZ, 202 | [LED_CMSIS_BULK_2_SUCCESS] = LED_AMBER_2HZ_2PULULSE_1S_OFF, 203 | [LED_CMSIS_BULK_2_ERROR] = LED_AMBER_128MS_1875MS 204 | }; 205 | if (!KitHasThreeLeds()) 206 | { 207 | ShiftReg_LED_Amber_WriteRegValue(amberLedSrValues[state]); 208 | LedControlReg_Write(controlValues1Led[state]); 209 | } 210 | else 211 | { 212 | ShiftReg_LED_Green_WriteRegValue(greenLedSrValues[state]); 213 | LedControlReg_Write(controlValues3Leds[state]); 214 | } 215 | } 216 | 217 | /* [] END OF FILE */ 218 | -------------------------------------------------------------------------------- /KitProg3.cydsn/led.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************//** 2 | * @file led.h 3 | * 4 | * @brief 5 | * This file contains the function prototypes to handle LED used to display 6 | * device state. 7 | * 8 | * @version KitProg3 v2.60 9 | */ 10 | /* 11 | * Related Documents: 12 | * 002-27868 - KITPROG3 V1.2X EROS 13 | * 002-23369 - KITPROG3 IROS 14 | * 002-26377 - KITPROG3 1.1X TEST PLAN 15 | * 16 | * 17 | ****************************************************************************** 18 | * (c) (2018-2021), Cypress Semiconductor Corporation (an Infineon company) 19 | * or an affiliate of Cypress Semiconductor Corporation. All rights reserved. 20 | * 21 | * This software, associated documentation and materials ("Software") is 22 | * owned by Cypress Semiconductor Corporation or one of its 23 | * affiliates ("Cypress") and is protected by and subject to worldwide 24 | * patent protection (United States and foreign), United States copyright 25 | * laws and international treaty provisions. Therefore, you may use this 26 | * Software only as provided in the license agreement accompanying the 27 | * software package from which you obtained this Software ("EULA"). If 28 | * no EULA applies, then any reproduction, modification, translation, 29 | * compilation, or representation of this Software is prohibited without 30 | * the express written permission of Cypress. 31 | * 32 | * Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO 33 | * WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, 34 | * BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED 35 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 36 | * PARTICULAR PURPOSE. Cypress reserves the right to make 37 | * changes to the Software without notice. Cypress does not assume any 38 | * liability arising out of the application or use of the Software or any 39 | * product or circuit described in the Software. Cypress does not authorize 40 | * its products for use in any products where a malfunction or failure 41 | * of the Cypress product may reasonably be expected to result in significant 42 | * property damage, injury or death ("High Risk Product"). 43 | * By including Cypress's product in a High Risk Product, the manufacturer 44 | * of such system or application assumes all risk of such use and in doing 45 | * so agrees to indemnify Cypress against all liability. 46 | *****************************************************************************/ 47 | 48 | #if !defined(LED_H) 49 | #define LED_H 50 | /***************************************************************************** 51 | * MACRO Definition 52 | *****************************************************************************/ 53 | 54 | /* Macro below are intended to be used in host communication to control LEDs 55 | * from PC application, e.g. PSoC Programmer */ 56 | #define GREEN_LED_NUM (0u) 57 | #define RED_LED_NUM (2u) 58 | #define AMBER_LED_NUM (3u) 59 | #define LED_OFF (0u) 60 | #define LED_BLINK (1u) 61 | #define LED_ON (3u) 62 | 63 | /***************************************************************************** 64 | * Type Definition 65 | *****************************************************************************/ 66 | 67 | typedef enum 68 | { 69 | LED_ALL_OFF = 0u, 70 | 71 | LED_CMSIS_BULK_READY, 72 | LED_CMSIS_BULK_PROGRAMMING, 73 | LED_CMSIS_BULK_SUCCESS, 74 | LED_CMSIS_BULK_ERROR, 75 | 76 | LED_CMSIS_HID_READY, 77 | LED_CMSIS_HID_PROGRAMMING, 78 | LED_CMSIS_HID_SUCCESS, 79 | LED_CMSIS_HID_ERROR, 80 | 81 | LED_CMSIS_BULK_2_READY, 82 | LED_CMSIS_BULK_2_PROGRAMMING, 83 | LED_CMSIS_BULK_2_SUCCESS, 84 | LED_CMSIS_BULK_2_ERROR, 85 | 86 | LED_NUM_OF_STATES /* not going to be used directly */ 87 | }led_state_enum; 88 | 89 | /***************************************************************************** 90 | * Function Prototypes 91 | *****************************************************************************/ 92 | void Led_Init(void); 93 | void Led_SetState(led_state_enum state); 94 | 95 | #endif /*LED_H*/ 96 | 97 | /* [] END OF FILE */ 98 | -------------------------------------------------------------------------------- /KitProg3.cydsn/make_doc.bat: -------------------------------------------------------------------------------- 1 | doxygen Doxyfile 2 | xcopy ".\docs\html\refman.chm" ".\docs\" /Q /Y 3 | rmdir ".\docs\html\" /s /q 4 | xcopy ".\images\CyLogo.pdf" ".\docs\latex\" /Q /Y 5 | call .\docs\latex\make.bat 6 | xcopy ".\docs\latex\refman.pdf" ".\docs\" /Q /Y 7 | rmdir ".\docs\latex\" /s /q 8 | 9 | -------------------------------------------------------------------------------- /KitProg3.cydsn/mutex.c: -------------------------------------------------------------------------------- 1 | /************************************************************************//** 2 | * @file mutex.c 3 | * 4 | * @brief 5 | * Executable code for KitProg3 6 | * 7 | * @version KitProg3 v2.60 8 | */ 9 | /* 10 | * Related Documents: 11 | * 002-27868 - KITPROG3 V1.2X EROS 12 | * 002-23369 - KITPROG3 IROS 13 | * 002-26377 - KITPROG3 1.1X TEST PLAN 14 | * 15 | * 16 | ****************************************************************************** 17 | * (c) (2018-2021), Cypress Semiconductor Corporation (an Infineon company) 18 | * or an affiliate of Cypress Semiconductor Corporation. All rights reserved. 19 | * 20 | * This software, associated documentation and materials ("Software") is 21 | * owned by Cypress Semiconductor Corporation or one of its 22 | * affiliates ("Cypress") and is protected by and subject to worldwide 23 | * patent protection (United States and foreign), United States copyright 24 | * laws and international treaty provisions. Therefore, you may use this 25 | * Software only as provided in the license agreement accompanying the 26 | * software package from which you obtained this Software ("EULA"). If 27 | * no EULA applies, then any reproduction, modification, translation, 28 | * compilation, or representation of this Software is prohibited without 29 | * the express written permission of Cypress. 30 | * 31 | * Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO 32 | * WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, 33 | * BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED 34 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 35 | * PARTICULAR PURPOSE. Cypress reserves the right to make 36 | * changes to the Software without notice. Cypress does not assume any 37 | * liability arising out of the application or use of the Software or any 38 | * product or circuit described in the Software. Cypress does not authorize 39 | * its products for use in any products where a malfunction or failure 40 | * of the Cypress product may reasonably be expected to result in significant 41 | * property damage, injury or death ("High Risk Product"). 42 | * By including Cypress's product in a High Risk Product, the manufacturer 43 | * of such system or application assumes all risk of such use and in doing 44 | * so agrees to indemnify Cypress against all liability. 45 | *****************************************************************************/ 46 | 47 | #include "DAP_config.h" 48 | #include "mutex.h" 49 | 50 | bool TryLock(volatile uint8_t *mutex) 51 | { 52 | bool res = false; 53 | if (__LDREXB(mutex) == MUTEX_UNLOCKED) 54 | { 55 | /* mutex unlocked */ 56 | if (__STREXB(MUTEX_LOCKED,mutex) == 0u) 57 | { 58 | res = true; 59 | __DMB(); 60 | } 61 | } 62 | else 63 | { 64 | /* mutex locked */ 65 | __CLREX(); 66 | } 67 | return res; 68 | } 69 | 70 | void Unlock(volatile uint8_t *mutex) 71 | { 72 | __DMB(); 73 | *mutex = MUTEX_UNLOCKED; 74 | } 75 | 76 | /* [] END OF FILE */ 77 | -------------------------------------------------------------------------------- /KitProg3.cydsn/mutex.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************//** 2 | * @file mutex.h 3 | * 4 | * @brief 5 | * This file contains the function prototypes, macros and constants used 6 | * in mutex.c file. 7 | * 8 | * @version KitProg3 v2.60 9 | */ 10 | /* 11 | * Related Documents: 12 | * 002-27868 - KITPROG3 V1.2X EROS 13 | * 002-23369 - KITPROG3 IROS 14 | * 002-26377 - KITPROG3 1.1X TEST PLAN 15 | * 16 | * 17 | ****************************************************************************** 18 | * (c) (2018-2021), Cypress Semiconductor Corporation (an Infineon company) 19 | * or an affiliate of Cypress Semiconductor Corporation. All rights reserved. 20 | * 21 | * This software, associated documentation and materials ("Software") is 22 | * owned by Cypress Semiconductor Corporation or one of its 23 | * affiliates ("Cypress") and is protected by and subject to worldwide 24 | * patent protection (United States and foreign), United States copyright 25 | * laws and international treaty provisions. Therefore, you may use this 26 | * Software only as provided in the license agreement accompanying the 27 | * software package from which you obtained this Software ("EULA"). If 28 | * no EULA applies, then any reproduction, modification, translation, 29 | * compilation, or representation of this Software is prohibited without 30 | * the express written permission of Cypress. 31 | * 32 | * Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO 33 | * WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, 34 | * BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED 35 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 36 | * PARTICULAR PURPOSE. Cypress reserves the right to make 37 | * changes to the Software without notice. Cypress does not assume any 38 | * liability arising out of the application or use of the Software or any 39 | * product or circuit described in the Software. Cypress does not authorize 40 | * its products for use in any products where a malfunction or failure 41 | * of the Cypress product may reasonably be expected to result in significant 42 | * property damage, injury or death ("High Risk Product"). 43 | * By including Cypress's product in a High Risk Product, the manufacturer 44 | * of such system or application assumes all risk of such use and in doing 45 | * so agrees to indemnify Cypress against all liability. 46 | *****************************************************************************/ 47 | 48 | #if !defined(MUTEX_H) 49 | #define MUTEX_H 50 | 51 | #include 52 | #include 53 | 54 | #define MUTEX_LOCKED (1u) 55 | #define MUTEX_UNLOCKED (0u) 56 | 57 | bool TryLock(volatile uint8_t *mutex); 58 | void Unlock(volatile uint8_t *mutex); 59 | 60 | #endif /*MUTEX_H*/ 61 | 62 | 63 | /* [] END OF FILE */ 64 | -------------------------------------------------------------------------------- /KitProg3.cydsn/power.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************//** 2 | * @file power.h 3 | * 4 | * @brief 5 | * This file provides the API to handle the power control. 6 | * 7 | * @version KitProg3 v2.60 8 | */ 9 | /* 10 | * Related Documents: 11 | * 002-27868 - KITPROG3 V1.2X EROS 12 | * 002-23369 - KITPROG3 IROS 13 | * 002-26377 - KITPROG3 1.1X TEST PLAN 14 | * 15 | * 16 | ****************************************************************************** 17 | * (c) (2018-2021), Cypress Semiconductor Corporation (an Infineon company) 18 | * or an affiliate of Cypress Semiconductor Corporation. All rights reserved. 19 | * 20 | * This software, associated documentation and materials ("Software") is 21 | * owned by Cypress Semiconductor Corporation or one of its 22 | * affiliates ("Cypress") and is protected by and subject to worldwide 23 | * patent protection (United States and foreign), United States copyright 24 | * laws and international treaty provisions. Therefore, you may use this 25 | * Software only as provided in the license agreement accompanying the 26 | * software package from which you obtained this Software ("EULA"). If 27 | * no EULA applies, then any reproduction, modification, translation, 28 | * compilation, or representation of this Software is prohibited without 29 | * the express written permission of Cypress. 30 | * 31 | * Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO 32 | * WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, 33 | * BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED 34 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 35 | * PARTICULAR PURPOSE. Cypress reserves the right to make 36 | * changes to the Software without notice. Cypress does not assume any 37 | * liability arising out of the application or use of the Software or any 38 | * product or circuit described in the Software. Cypress does not authorize 39 | * its products for use in any products where a malfunction or failure 40 | * of the Cypress product may reasonably be expected to result in significant 41 | * property damage, injury or death ("High Risk Product"). 42 | * By including Cypress's product in a High Risk Product, the manufacturer 43 | * of such system or application assumes all risk of such use and in doing 44 | * so agrees to indemnify Cypress against all liability. 45 | *****************************************************************************/ 46 | 47 | #if !defined(POWER_H) 48 | #define POWER_H 49 | 50 | #include 51 | #include 52 | 53 | void Power_Init(void); 54 | uint16_t Power_GetVoltage(void); 55 | bool Power_SetRequestedVoltage(uint16_t desiredVoltage); 56 | uint16_t Power_GetRequestedVoltage(void); 57 | 58 | #endif /* POWER_H */ 59 | -------------------------------------------------------------------------------- /KitProg3.cydsn/swd.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************//** 2 | * @file swd.h 3 | * 4 | * @brief 5 | * This file contains the function prototypes and constants used in 6 | * the swd.c. 7 | * 8 | * @version KitProg3 v2.60 9 | */ 10 | /* 11 | * Related Documents: 12 | * 002-27868 - KITPROG3 V1.2X EROS 13 | * 002-23369 - KITPROG3 IROS 14 | * 002-26377 - KITPROG3 1.1X TEST PLAN 15 | * 16 | * 17 | ****************************************************************************** 18 | * (c) (2018-2021), Cypress Semiconductor Corporation (an Infineon company) 19 | * or an affiliate of Cypress Semiconductor Corporation. All rights reserved. 20 | * 21 | * This software, associated documentation and materials ("Software") is 22 | * owned by Cypress Semiconductor Corporation or one of its 23 | * affiliates ("Cypress") and is protected by and subject to worldwide 24 | * patent protection (United States and foreign), United States copyright 25 | * laws and international treaty provisions. Therefore, you may use this 26 | * Software only as provided in the license agreement accompanying the 27 | * software package from which you obtained this Software ("EULA"). If 28 | * no EULA applies, then any reproduction, modification, translation, 29 | * compilation, or representation of this Software is prohibited without 30 | * the express written permission of Cypress. 31 | * 32 | * Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO 33 | * WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, 34 | * BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED 35 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 36 | * PARTICULAR PURPOSE. Cypress reserves the right to make 37 | * changes to the Software without notice. Cypress does not assume any 38 | * liability arising out of the application or use of the Software or any 39 | * product or circuit described in the Software. Cypress does not authorize 40 | * its products for use in any products where a malfunction or failure 41 | * of the Cypress product may reasonably be expected to result in significant 42 | * property damage, injury or death ("High Risk Product"). 43 | * By including Cypress's product in a High Risk Product, the manufacturer 44 | * of such system or application assumes all risk of such use and in doing 45 | * so agrees to indemnify Cypress against all liability. 46 | *****************************************************************************/ 47 | 48 | #if !defined(SWD_H) 49 | #define SWD_H 50 | 51 | #include 52 | #include 53 | #include "cypins.h" 54 | #include "TCLK_SWDCLK.h" 55 | #include "TMS_SWDIO.h" 56 | #include "SWDXRES.h" 57 | 58 | 59 | /***************************************************************************** 60 | * MACRO Definition 61 | *****************************************************************************/ 62 | #define BIT0 (0x01u) 63 | #define BIT1 (0x02u) 64 | #define BIT2 (0x04u) 65 | #define BIT3 (0x08u) 66 | #define BIT4 (0x10u) 67 | #define BIT5 (0x20u) 68 | #define BIT6 (0x40u) 69 | #define BIT7 (0x80u) 70 | 71 | /* Programming pin drive modes */ 72 | #define SWD_SET_SDA_OUT CyPins_SetPinDriveMode(TMS_SWDIO_0, TMS_SWDIO_DM_STRONG) 73 | #define SWD_SET_SDA_IN CyPins_SetPinDriveMode(TMS_SWDIO_0, TMS_SWDIO_DM_DIG_HIZ) 74 | #define SWD_SET_SCK_OUT CyPins_SetPinDriveMode(TCLK_SWDCLK_0, TCLK_SWDCLK_DM_STRONG) 75 | #define SWD_SET_SCK_IN CyPins_SetPinDriveMode(TCLK_SWDCLK_0, TCLK_SWDCLK_DM_DIG_HIZ) 76 | #define SWD_SET_XRES_OUT CyPins_SetPinDriveMode(SWDXRES_0, SWDXRES_DM_STRONG) 77 | #define SWD_SET_XRES_IN CyPins_SetPinDriveMode(SWDXRES_0, SWDXRES_DM_DIG_HIZ) 78 | 79 | /* SWD line communication macros */ 80 | #define SWD_XFER_SIZE (0x04u) 81 | #define SWD_OFLOW (BIT7) 82 | #define SWD_UFLOW (BIT6) 83 | #define SWD_DONE (BIT5) 84 | #define SWD_PERR (BIT3) 85 | #define SWD_FAULT (BIT2) 86 | #define SWD_WAIT (BIT1) 87 | #define SWD_ACK (BIT0) 88 | #define SWD_ACK_BITS ((SWD_FAULT) | (SWD_WAIT) | (SWD_ACK)) 89 | #define SWD_ERROR (SWD_ACK_BITS) 90 | 91 | /* Acquire result macros */ 92 | #define ACQUIRE_PASS (0x01u) 93 | #define ACQUIRE_FAIL (0x00u) 94 | #define ACQUIRE_WAIT (0x02u) 95 | 96 | /* Bit banding of the SRAM addresses in order to address each bit of a byte separately. */ 97 | #define BIT_ADDRESS (0x20000100u) 98 | #define SWD_BYTE (*((volatile uint8_t *)(BIT_ADDRESS))) 99 | 100 | /* Convert SRAM address to SRAM bit map region */ 101 | #define BITBAND_SRAM_REF (CYREG_SRAM_DATA_MBASE) 102 | #define BITBAND_SRAM_BASE (CYREG_SRAM_DATA_MBASE + 0x2000000u) 103 | 104 | #define SWD_DATA_BIT_B0 (*((volatile uint8_t *)(BITBAND_SRAM_BASE + ((BIT_ADDRESS-BITBAND_SRAM_REF)*32u) + (0u*4u)))) 105 | #define SWD_DATA_BIT_B1 (*((volatile uint8_t *)(BITBAND_SRAM_BASE + ((BIT_ADDRESS-BITBAND_SRAM_REF)*32u) + (1u*4u)))) 106 | #define SWD_DATA_BIT_B2 (*((volatile uint8_t *)(BITBAND_SRAM_BASE + ((BIT_ADDRESS-BITBAND_SRAM_REF)*32u) + (2u*4u)))) 107 | #define SWD_DATA_BIT_B3 (*((volatile uint8_t *)(BITBAND_SRAM_BASE + ((BIT_ADDRESS-BITBAND_SRAM_REF)*32u) + (3u*4u)))) 108 | #define SWD_DATA_BIT_B4 (*((volatile uint8_t *)(BITBAND_SRAM_BASE + ((BIT_ADDRESS-BITBAND_SRAM_REF)*32u) + (4u*4u)))) 109 | #define SWD_DATA_BIT_B5 (*((volatile uint8_t *)(BITBAND_SRAM_BASE + ((BIT_ADDRESS-BITBAND_SRAM_REF)*32u) + (5u*4u)))) 110 | #define SWD_DATA_BIT_B6 (*((volatile uint8_t *)(BITBAND_SRAM_BASE + ((BIT_ADDRESS-BITBAND_SRAM_REF)*32u) + (6u*4u)))) 111 | #define SWD_DATA_BIT_B7 (*((volatile uint8_t *)(BITBAND_SRAM_BASE + ((BIT_ADDRESS-BITBAND_SRAM_REF)*32u) + (7u*4u)))) 112 | 113 | /* Bit banding of the peripheral addresses for flexibility in addressing SWDIO and SWDCLK */ 114 | /* Convert Peripheral address to peripheral bit map region */ 115 | #define BITBAND_PERI_REF (0x40000000u) 116 | #define BITBAND_PERI_BASE (0x42000000u) 117 | 118 | #define SWD_BITS (TCLK_SWDCLK__DR) 119 | #define SWD_SDA (*((volatile uint8_t *)(BITBAND_PERI_BASE + ((SWD_BITS - BITBAND_PERI_REF)*32u) + ((TMS_SWDIO_SHIFT)*4u)))) 120 | #define SWD_SCK (*((volatile uint8_t *)(BITBAND_PERI_BASE + ((SWD_BITS - BITBAND_PERI_REF)*32u) + ((TCLK_SWDCLK_SHIFT)*4u)))) 121 | #define SDA_PS (*((volatile uint8_t *)(BITBAND_PERI_BASE + (((TMS_SWDIO__PS) - BITBAND_PERI_REF)*32u) + ((TMS_SWDIO_SHIFT)*4u)))) 122 | #define SCL_PS (*((volatile uint8_t *)(BITBAND_PERI_BASE + (((TCLK_SWDCLK__PS) - BITBAND_PERI_REF)*32u) + ((TCLK_SWDCLK_SHIFT)*4u)))) 123 | #define XRES_PS (*((volatile uint8_t *)(BITBAND_PERI_BASE + (((SWDXRES__PS) - BITBAND_PERI_REF)*32u) + ((SWDXRES_SHIFT)*4u)))) 124 | 125 | #define SWD_SET_SCK_LO ((SWD_SCK) = 0u) 126 | #define SWD_SET_SCK_HI ((SWD_SCK) = 1u) 127 | #define SWD_SET_SDA_LO ((SWD_SDA) = 0u) 128 | #define SWD_SET_SDA_HI ((SWD_SDA) = 1u) 129 | #define SWD_SET_XRES_HI CyPins_SetPin(SWDXRES_0) 130 | #define SWD_SET_XRES_LO CyPins_ClearPin(SWDXRES_0) 131 | 132 | #define SWD_GET_SDA (SDA_PS) 133 | #define SWD_GET_SCL (SCL_PS) 134 | #define SWD_GET_XRES (XRES_PS) 135 | 136 | /* One Clock on the SWDCLK line */ 137 | #define SWD_CLOCK_BIT ({SWD_SET_SCK_LO;CY_NOP;CY_NOP;CY_NOP;SWD_SET_SCK_HI;CY_NOP;CY_NOP;CY_NOP;}) 138 | 139 | /* Acquire target*/ 140 | #define ACQUIRE_PSoC4 (0x00u) 141 | #define ACQUIRE_PSoC5_ES2 (0x01u) 142 | #define ACQUIRE_PSoC6_BLE (0x02u) 143 | #define ACQUIRE_TVII (0x03u) 144 | #define ACQUIRE_CYW20829 (0x04u) 145 | #define ACQUIRE_PSoC3 (0x05u) 146 | #define ACQUIRE_CUSTOM (0xFEu) 147 | #define ACQUIRE_AUTODETECT (0xFFu) 148 | 149 | /* Acquire mode */ 150 | #define ACQUIRE_RESET (0x00u) 151 | #define ACQUIRE_POWER_CYCLE (0x01u) 152 | #define ACQUIRE_IDLE (0x02u) 153 | 154 | /* SWD data macros */ 155 | #define SWD_DATA_SIZE (5u) 156 | #define ONE_VOLT (1000u) 157 | 158 | /***************************************************************************** 159 | * Global Variables 160 | *****************************************************************************/ 161 | 162 | extern bool swdHwAccelerationAllowed; 163 | extern uint16_t perceivedTimeout; 164 | 165 | /***************************************************************************** 166 | * Function Prototypes 167 | *****************************************************************************/ 168 | 169 | void Swd_Init(void); 170 | void Swd_HwAccelPossibility(void); 171 | void Swd_SetPinsDsiConnect(bool connect); 172 | void Swd_SetHwClock(uint32_t curClock); 173 | void Swd_SetHwIdleClk(uint8_t idleCycles); 174 | uint8_t Swd_TransferHw(uint32_t request, uint32_t *data); 175 | uint32_t Swd_Acquire(uint32_t dut, uint32_t acquireMode, const uint8_t *initSequence); 176 | void Swd_SetActualAcquireTimeout(uint8_t acquireDUT, uint8_t acquireMode); 177 | void Swd_SetApSelect(const uint8_t ap); 178 | bool SetHandshakeType(const uint8_t handshakeType); 179 | 180 | #endif /* SWD_H */ 181 | 182 | 183 | /* [] END OF FILE */ 184 | -------------------------------------------------------------------------------- /KitProg3.cydsn/usb_user_hid.c: -------------------------------------------------------------------------------- 1 | /************************************************************************/ 2 | /*---------------------------------------------------------------------------- 3 | * RL-ARM - USB 4 | *---------------------------------------------------------------------------- 5 | * Name: usbd_user_hid.c 6 | * Purpose: Human Interface Device Class User module 7 | * Rev.: V4.50 8 | *---------------------------------------------------------------------------- 9 | * This code is part of the RealView Run-Time Library. 10 | * Copyright (c) 2004-2012 KEIL - An ARM Company. All rights reserved. 11 | *---------------------------------------------------------------------------*/ 12 | /*--------------------------------------------------------------------------- 13 | * Portions Copyright 2018-2021, Cypress Semiconductor Corporation 14 | * (an Infineon company) or an affiliate of Cypress Semiconductor Corporation. 15 | * All rights reserved. 16 | * 17 | * This software, associated documentation and materials (“Software”) is 18 | * owned by Cypress Semiconductor Corporation or one of its 19 | * affiliates (“Cypress”) and is protected by and subject to worldwide 20 | * patent protection (United States and foreign), United States copyright 21 | * laws and international treaty provisions. Therefore, you may use this 22 | * Software only as provided in the license agreement accompanying the 23 | * software package from which you obtained this Software (“EULA”). If 24 | * no EULA applies, then any reproduction, modification, translation, 25 | * compilation, or representation of this Software is prohibited without the 26 | * express written permission of Cypress. 27 | * 28 | * Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO 29 | * WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, 30 | * BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED 31 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 32 | * PARTICULAR PURPOSE. Cypress reserves the right to make 33 | * changes to the Software without notice. Cypress does not assume any 34 | * liability arising out of the application or use of the Software or any 35 | * product or circuit described in the Software. Cypress does not 36 | * authorize its products for use in any products where a malfunction or 37 | * failure of the Cypress product may reasonably be expected to result in 38 | * significant property damage, injury or death (“High Risk Product”). By 39 | * including Cypress’s product in a High Risk Product, the manufacturer 40 | * of such system or application assumes all risk of such use and in doing 41 | * so agrees to indemnify Cypress against all liability. 42 | * 43 | * THE CYPRESS COPYRIGHTED PORTIONS ARE NOT SUBMISSIONS AS SET FORTH IN THE 44 | * APACHE LICENSE VERSION 2.0 OR ANY OTHER LICENSE HAVING SIMILAR PROVISIONS. 45 | *---------------------------------------------------------------------------*/ 46 | 47 | #include 48 | #include "DAP.h" 49 | #include "DAP_config.h" 50 | #include "kitprog.h" 51 | #include "mutex.h" 52 | #include "usbinterface.h" 53 | 54 | /* mask number of bytes in response (lower 16 bits) in DAP result */ 55 | #define RESPONSE_MASK (0x0000FFFFu) 56 | 57 | volatile bool USB_RequestBufferFull; // Request Buffer is Full Flag 58 | volatile bool USB_RequestPostponed; // Request was not transferred to the buffer 59 | volatile uint32_t USB_RequestIn; // Request Buffer In Index / Place of next wrire 60 | volatile uint32_t USB_RequestOut; // Request Buffer Out Index / Place of next read 61 | 62 | volatile bool USB_ResponseIdle; // Response Buffer Idle Flag 63 | volatile bool USB_ResponseBufferFull;// Response Buffer Usage Flag 64 | volatile bool USB_ResponsePostponed; // Response was not transferred to the buffer 65 | volatile uint32_t USB_ResponseIn; // Response Buffer In Index 66 | volatile uint32_t USB_ResponseOut; // Response Buffer Out Index 67 | 68 | volatile uint8_t USB_Mutex; // CMSIS EPs mutex 69 | 70 | uint32_t USB_ResponseLen[DAP_PACKET_COUNT]; 71 | uint8_t USB_Request [DAP_PACKET_COUNT][DAP_PACKET_SIZE]; // Request Buffer 72 | uint8_t USB_Response[DAP_PACKET_COUNT][DAP_PACKET_SIZE]; // Response Buffer 73 | 74 | 75 | // USB HID Callback: when system initializes 76 | void usbd_hid_init(void) 77 | { 78 | USB_RequestBufferFull = false; 79 | USB_RequestIn = 0u; 80 | USB_RequestOut = 0u; 81 | USB_ResponseIdle = true; 82 | USB_ResponseBufferFull = false; 83 | USB_ResponseIn = 0u; 84 | USB_ResponseOut = 0u; 85 | // mutex and postponed request 86 | USB_RequestPostponed = false; 87 | USB_ResponsePostponed = false; 88 | USB_Mutex = MUTEX_UNLOCKED; 89 | } 90 | 91 | // USB HID Callback: when data needs to be prepared for the host 92 | uint32_t usbd_hid_get_report(uint8_t rtype, uint8_t rid, uint8_t *buf, uint8_t req) 93 | { 94 | (void)(rid); 95 | uint32_t res = 0u; 96 | 97 | if (rtype == HID_REPORT_INPUT) 98 | { 99 | if (req == USBD_HID_REQ_EP_INT) 100 | { 101 | /* Init intermediate values for volatile variables USB_ResponseIn, USB_ResponseOut */ 102 | uint32_t cachedUsbResponseOut = USB_ResponseOut; 103 | uint32_t cachedUsbResponseIn = USB_ResponseIn; 104 | bool cachedUsbResponseBufferFull = USB_ResponseBufferFull; 105 | 106 | if ((cachedUsbResponseOut != cachedUsbResponseIn) || cachedUsbResponseBufferFull) 107 | { 108 | res = USB_ResponseLen[cachedUsbResponseOut] & RESPONSE_MASK; 109 | (void)memcpy(buf, USB_Response[cachedUsbResponseOut], res); 110 | cachedUsbResponseOut++; 111 | if (cachedUsbResponseOut == DAP_PACKET_COUNT) 112 | { 113 | cachedUsbResponseOut = 0u; 114 | } 115 | if (cachedUsbResponseOut == cachedUsbResponseIn) 116 | { 117 | USB_ResponseBufferFull = false; 118 | } 119 | USB_ResponseOut = cachedUsbResponseOut; 120 | } 121 | } 122 | } 123 | return (res); 124 | } 125 | 126 | // USB HID Callback: when data is received from the host 127 | void usbd_hid_set_report(uint8_t rtype, uint8_t rid, uint8_t *buf, uint8_t len, uint8_t req) 128 | { 129 | (void)(req); 130 | (void)(rid); 131 | 132 | switch (rtype) 133 | { 134 | case HID_REPORT_OUTPUT: 135 | { 136 | if (len == 0u) 137 | { 138 | // Nothing to send 139 | break; 140 | } 141 | if (buf[0u] == ID_DAP_TransferAbort) 142 | { 143 | DAP_TransferAbort = 1u; 144 | break; 145 | } 146 | /* Init intermediate values for volatile variables USB_RequestIn, USB_RequestOut */ 147 | uint32_t cachedUsbRequestIn = USB_RequestIn; 148 | uint32_t cachedUsbRequestOut = USB_RequestOut; 149 | bool cachedUsbRequestBufferFull = USB_RequestBufferFull; 150 | if (cachedUsbRequestBufferFull && (cachedUsbRequestIn == cachedUsbRequestOut)) 151 | { 152 | break; // Discard packet when buffer is full 153 | } 154 | // Store data into request packet buffer 155 | (void)memcpy(USB_Request[cachedUsbRequestIn], buf, len); 156 | cachedUsbRequestIn++; 157 | 158 | if (cachedUsbRequestIn == DAP_PACKET_COUNT) 159 | { 160 | cachedUsbRequestIn = 0u; 161 | } 162 | if (cachedUsbRequestIn == cachedUsbRequestOut) 163 | { 164 | cachedUsbRequestBufferFull = true; 165 | } 166 | USB_RequestIn = cachedUsbRequestIn; 167 | USB_RequestBufferFull = cachedUsbRequestBufferFull; 168 | break; 169 | } 170 | case HID_REPORT_FEATURE: 171 | break; 172 | default: 173 | /**/ 174 | break; 175 | } 176 | } 177 | 178 | // Process USB HID Data 179 | void usbd_hid_process(void) 180 | { 181 | /* Init intermediate values for volatile variables USB_ResponseIn, USB_ResponseOut */ 182 | uint32_t cachedUsbResponseOut = USB_ResponseOut; 183 | uint32_t cachedUsbResponseIn = USB_ResponseIn; 184 | bool cachedUsbResponseBufferFull = USB_ResponseBufferFull; 185 | uint32_t cachedUsbRequestIn = USB_RequestIn; 186 | uint32_t cachedUsbRequestOut = USB_RequestOut; 187 | bool cachedUsbRequestBufferFull = USB_RequestBufferFull; 188 | 189 | // Process pending requests 190 | if ((!cachedUsbResponseBufferFull) && ((cachedUsbRequestOut != cachedUsbRequestIn) || cachedUsbRequestBufferFull)) 191 | { 192 | 193 | // Process DAP Command and prepare response 194 | USB_ResponseLen[cachedUsbResponseIn] = DAP_ExecuteCommand(USB_Request[cachedUsbRequestOut], USB_Response[cachedUsbResponseIn]); 195 | 196 | // Update request index and flag 197 | cachedUsbRequestOut++; 198 | if (cachedUsbRequestOut == DAP_PACKET_COUNT) 199 | { 200 | cachedUsbRequestOut = 0u; 201 | } 202 | 203 | if (cachedUsbRequestOut == cachedUsbRequestIn) 204 | { 205 | USB_RequestBufferFull = false; 206 | } 207 | USB_RequestOut = cachedUsbRequestOut; 208 | 209 | // Update response index and flag 210 | cachedUsbResponseIn++; 211 | if (cachedUsbResponseIn == DAP_PACKET_COUNT) 212 | { 213 | cachedUsbResponseIn = 0u; 214 | } 215 | if (cachedUsbResponseIn == cachedUsbResponseOut) 216 | { 217 | USB_ResponseBufferFull = true; 218 | } 219 | USB_ResponseIn = cachedUsbResponseIn; 220 | USB_ResponseOut = cachedUsbResponseOut; 221 | USB_RequestIn = cachedUsbResponseIn; 222 | 223 | } 224 | } 225 | 226 | 227 | // Process USB bulk Data 228 | void usbd_bulk_process(void) 229 | { 230 | // Load postponed request to buffer 231 | if (USB_RequestPostponed) 232 | { 233 | PushToRequestBuffer(); 234 | } 235 | /* Init intermediate values for volatile variables USB_ResponseIn, USB_ResponseOut */ 236 | uint32_t cachedUsbResponseOut = USB_ResponseOut; 237 | uint32_t cachedUsbResponseIn = USB_ResponseIn; 238 | bool cachedUsbResponseBufferFull = USB_ResponseBufferFull; 239 | uint32_t cachedUsbRequestIn = USB_RequestIn; 240 | uint32_t cachedUsbRequestOut = USB_RequestOut; 241 | bool cachedUsbRequestBufferFull = USB_RequestBufferFull; 242 | bool cachedUsbResponseIdle = USB_ResponseIdle; 243 | bool cachedUsbResponsePostponed = USB_ResponsePostponed; 244 | // Process pending requests 245 | if ((!cachedUsbResponseBufferFull) && ((cachedUsbRequestOut != cachedUsbRequestIn) || cachedUsbRequestBufferFull)) 246 | { 247 | 248 | // Process DAP Command and prepare response 249 | USB_ResponseLen[cachedUsbResponseIn] = DAP_ExecuteCommand(USB_Request[(uint16_t)cachedUsbRequestOut], USB_Response[cachedUsbResponseIn]); 250 | 251 | // Update request index and flag 252 | cachedUsbRequestOut++; 253 | if (cachedUsbRequestOut == DAP_PACKET_COUNT) 254 | { 255 | cachedUsbRequestOut = 0u; 256 | } 257 | 258 | if (cachedUsbRequestOut == cachedUsbRequestIn) 259 | { 260 | cachedUsbRequestBufferFull = false; 261 | } 262 | 263 | // Update response index and flag 264 | cachedUsbResponseIn++; 265 | if (cachedUsbResponseIn == DAP_PACKET_COUNT) 266 | { 267 | cachedUsbResponseIn = 0u; 268 | } 269 | 270 | if (cachedUsbResponseIn == cachedUsbResponseOut) 271 | { 272 | cachedUsbResponseBufferFull = true; 273 | } 274 | } 275 | USB_ResponseIn = cachedUsbResponseIn; 276 | USB_ResponseBufferFull = cachedUsbResponseBufferFull; 277 | 278 | USB_RequestOut = cachedUsbRequestOut; 279 | USB_RequestBufferFull = cachedUsbRequestBufferFull; 280 | 281 | if (cachedUsbResponsePostponed || (cachedUsbResponseIdle && ((cachedUsbResponseOut != cachedUsbResponseIn) || cachedUsbResponseBufferFull))) 282 | { 283 | // initiate sending data back to the host, if any 284 | USB_ResponseIdle = false; 285 | PopFromResponseBuffer(); 286 | } 287 | } 288 | 289 | -------------------------------------------------------------------------------- /KitProg3.cydsn/usbinterface.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************//** 2 | * @file usbinterface.h 3 | * 4 | * @brief 5 | * This file contains the function prototypes, macros and constants used 6 | * in usbinterface.c file. 7 | * 8 | * @version KitProg3 v2.60 9 | */ 10 | /* 11 | * Related Documents: 12 | * 002-27868 - KITPROG3 V1.2X EROS 13 | * 002-23369 - KITPROG3 IROS 14 | * 002-26377 - KITPROG3 1.1X TEST PLAN 15 | * 16 | * 17 | ****************************************************************************** 18 | * (c) (2018-2021), Cypress Semiconductor Corporation (an Infineon company) 19 | * or an affiliate of Cypress Semiconductor Corporation. All rights reserved. 20 | * 21 | * This software, associated documentation and materials ("Software") is 22 | * owned by Cypress Semiconductor Corporation or one of its 23 | * affiliates ("Cypress") and is protected by and subject to worldwide 24 | * patent protection (United States and foreign), United States copyright 25 | * laws and international treaty provisions. Therefore, you may use this 26 | * Software only as provided in the license agreement accompanying the 27 | * software package from which you obtained this Software ("EULA"). If 28 | * no EULA applies, then any reproduction, modification, translation, 29 | * compilation, or representation of this Software is prohibited without 30 | * the express written permission of Cypress. 31 | * 32 | * Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO 33 | * WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, 34 | * BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED 35 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 36 | * PARTICULAR PURPOSE. Cypress reserves the right to make 37 | * changes to the Software without notice. Cypress does not assume any 38 | * liability arising out of the application or use of the Software or any 39 | * product or circuit described in the Software. Cypress does not authorize 40 | * its products for use in any products where a malfunction or failure 41 | * of the Cypress product may reasonably be expected to result in significant 42 | * property damage, injury or death ("High Risk Product"). 43 | * By including Cypress's product in a High Risk Product, the manufacturer 44 | * of such system or application assumes all risk of such use and in doing 45 | * so agrees to indemnify Cypress against all liability. 46 | *****************************************************************************/ 47 | 48 | #if !defined(USBINTERFACE_H) 49 | #define USBINTERFACE_H 50 | 51 | #include "DAP.h" 52 | 53 | extern uint8_t USB_Request [DAP_PACKET_COUNT][DAP_PACKET_SIZE]; // Request Buffer 54 | extern volatile bool USB_RequestBufferFull; // Request Buffer Usage Flag 55 | extern volatile bool USB_RequestPostponed; // Request was not transferred to the buffer 56 | extern volatile uint32_t USB_RequestIn; // Request Buffer In Index 57 | extern volatile uint32_t USB_RequestOut; // Request Buffer Out Index 58 | 59 | extern volatile bool USB_ResponseBufferFull;// Response Buffer Usage Flag 60 | extern volatile bool USB_ResponsePostponed; // Response was not transferred to the buffer 61 | extern volatile uint32_t USB_ResponseIn; // Response Buffer In Index 62 | extern volatile uint32_t USB_ResponseOut; // Response Buffer Out Index 63 | 64 | extern volatile uint8_t USB_Mutex; // CMSIS EPs mutex 65 | 66 | extern uint32_t USB_ResponseLen[DAP_PACKET_COUNT]; 67 | extern uint8_t USB_Response[DAP_PACKET_COUNT][DAP_PACKET_SIZE]; // Response Buffer 68 | extern volatile bool USB_ResponseIdle; // Response Buffer Idle Flag 69 | 70 | void PrepareUsbInterface(void); 71 | void PushToRequestBuffer(void); 72 | void PopFromResponseBuffer(void); 73 | 74 | void CyUsbIntEnable(uint32_t intrMask); 75 | uint32_t CyUsbIntDisable(void); 76 | 77 | #endif /*USBINTERFACE_H*/ 78 | 79 | 80 | /* [] END OF FILE */ 81 | -------------------------------------------------------------------------------- /KitProg3.cywrk: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | .\KitProg3.cydsn\KitProg3.cyprj 11 | .\KitProg3_Bootloader.cydsn\KitProg3_Bootloader.cyprj 12 | .\KitProg3_Library.cylib\KitProg3_Library.cyprj 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /KitProg3_Bootloader.cydsn/TopDesign/TopDesign.cysch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Infineon/KitProg3/b81f81489ed6ac43451fac3c585e36b53ef6fe49/KitProg3_Bootloader.cydsn/TopDesign/TopDesign.cysch -------------------------------------------------------------------------------- /KitProg3_Bootloader.cydsn/cyapicallbacks.h: -------------------------------------------------------------------------------- 1 | /* ======================================== 2 | * 3 | * Copyright YOUR COMPANY, THE YEAR 4 | * All Rights Reserved 5 | * UNPUBLISHED, LICENSED SOFTWARE. 6 | * 7 | * CONFIDENTIAL AND PROPRIETARY INFORMATION 8 | * WHICH IS THE PROPERTY OF your company. 9 | * 10 | * ======================================== 11 | */ 12 | #ifndef CYAPICALLBACKS_H 13 | #define CYAPICALLBACKS_H 14 | 15 | /*Define your macro callbacks here */ 16 | /*For more information, refer to the Macro Callbacks topic in the PSoC Creator Help.*/ 17 | 18 | #endif /* CYAPICALLBACKS_H */ 19 | /* [] */ 20 | -------------------------------------------------------------------------------- /KitProg3_Bootloader.cydsn/main.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************//** 2 | * @file main.c 3 | * 4 | * @brief 5 | * main executable code for KitProg3 bootloader 6 | * 7 | * @version KitProg3 v1.00 8 | */ 9 | /* 10 | * Related Documents: 11 | * 002-22949 - KITPROG3 1.00 EROS 12 | * 002-23369 - KITPROG2 IROS 13 | * 002-23558 KITPROG3 1.00 TEST PLAN 14 | * 15 | * 16 | ****************************************************************************** 17 | * (c) (2018), Cypress Semiconductor Corporation (an Infineon company) 18 | * or an affiliate of Cypress Semiconductor Corporation. All rights reserved. 19 | * 20 | * This software, associated documentation and materials ("Software") is 21 | * owned by Cypress Semiconductor Corporation or one of its 22 | * affiliates ("Cypress") and is protected by and subject to worldwide 23 | * patent protection (United States and foreign), United States copyright 24 | * laws and international treaty provisions. Therefore, you may use this 25 | * Software only as provided in the license agreement accompanying the 26 | * software package from which you obtained this Software ("EULA"). If 27 | * no EULA applies, then any reproduction, modification, translation, 28 | * compilation, or representation of this Software is prohibited without 29 | * the express written permission of Cypress. 30 | * 31 | * Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO 32 | * WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, 33 | * BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED 34 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 35 | * PARTICULAR PURPOSE. Cypress reserves the right to make 36 | * changes to the Software without notice. Cypress does not assume any 37 | * liability arising out of the application or use of the Software or any 38 | * product or circuit described in the Software. Cypress does not authorize 39 | * its products for use in any products where a malfunction or failure 40 | * of the Cypress product may reasonably be expected to result in significant 41 | * property damage, injury or death ("High Risk Product"). 42 | * By including Cypress's product in a High Risk Product, the manufacturer 43 | * of such system or application assumes all risk of such use and in doing 44 | * so agrees to indemnify Cypress against all liability. 45 | *****************************************************************************/ 46 | 47 | #include 48 | #include 49 | #include 50 | #include "Bootloader.h" 51 | 52 | /* Defines for Bootloader checksum validation */ 53 | #define Bootloader_GET_CODE_BYTE(addr) (*((uint8 *)(CYDEV_FLASH_BASE + (addr)))) 54 | 55 | /* The bootloader always starts at 0 in flash */ 56 | #define Bootloader_CHECKSUM_START (0u) 57 | 58 | /* Delay (debounce) applied to mode button for entering bootloader mode, in msec */ 59 | #define MODE_BUTTON_DELAY (100u) 60 | 61 | /* Constants for appliaction activity flags in the flash metadata */ 62 | #define APP_INACTIVE (0u) 63 | #define APP_ACTIVE (1u) 64 | 65 | #define BOOTLOADER_ACTIVE_IDX (0u) 66 | #define KIT_PROG_ACTIVE_IDX (1u) 67 | #define CUSTOM_APP_ACTIVE_IDX (2u) 68 | 69 | /* Buttons are resistive pull-Up, so accerted button when low level */ 70 | #define BUTTON_ASSERTED (0u) 71 | 72 | 73 | 74 | /****************************************************************************** 75 | * Calc8BitFlashSum 76 | ***************************************************************************//** 77 | * 78 | * This function calculates 8-bit checksum for proided flash area. 79 | * 80 | * @param[in] start The starting address to start summing data for. 81 | * @param[in] size The number of bytes to read and compute the sum for. 82 | * 83 | * @return The 8 bit sum for the provided data. 84 | * 85 | ******************************************************************************/ 86 | static uint8_t Calc8BitFlashSum(uint32_t start, uint32_t size) 87 | { 88 | uint8_t sum = 0u; 89 | uint32_t cur_size = size; 90 | while (cur_size > 0u) 91 | { 92 | cur_size--; 93 | sum += Bootloader_GET_CODE_BYTE(start + cur_size); 94 | } 95 | 96 | return sum; 97 | } 98 | 99 | /****************************************************************************** 100 | * ValidateBootloader 101 | ***************************************************************************//** 102 | * 103 | * Function to validate the bootloader by verifying the bootloader checksum. 104 | * 105 | * @return TRUE if bootloader is valid FALSE otherwise. 106 | * 107 | ******************************************************************************/ 108 | static bool ValidateBootloader(void) 109 | { 110 | uint8_t calcedChecksum; 111 | calcedChecksum = Calc8BitFlashSum(Bootloader_CHECKSUM_START, 112 | *Bootloader_SizeBytesAccess - Bootloader_CHECKSUM_START); 113 | 114 | /* The checksum was included, so remove it */ 115 | calcedChecksum -= *Bootloader_ChecksumAccess; 116 | calcedChecksum = 1u + ~calcedChecksum; 117 | 118 | /* Return true if bootloader is corect */ 119 | return (calcedChecksum == *Bootloader_ChecksumAccess); 120 | } 121 | 122 | /******************************************************************************* 123 | * main 124 | ******************************************************************************** 125 | * Handles bootloader operations, normally does not return. 126 | * 127 | *******************************************************************************/ 128 | int main() 129 | { 130 | CyGlobalIntEnable; 131 | 132 | /* 133 | * Use CySetTemp API to initialize SPC. 134 | * This step enables writing to flash memory required to change active application number. 135 | */ 136 | if ( CySetTemp() != CYRET_SUCCESS ) 137 | { 138 | CyHalt(0u); 139 | } 140 | 141 | /* Check the validity of bootloader by verifying the Bootloader checksum */ 142 | if ( !ValidateBootloader() ) 143 | { 144 | CyHalt(0u); 145 | } 146 | 147 | /* Check if mode switch is pressed at entry */ 148 | if( ModeSwitchPin_Read() == 0u ) 149 | { 150 | uint32_t counter; 151 | 152 | /* Test if mode switch is pressed for more than 100ms */ 153 | for(counter = 0u; counter <= MODE_BUTTON_DELAY; counter++) 154 | { 155 | CyDelay(1); 156 | 157 | if( ModeSwitchPin_Read() != BUTTON_ASSERTED ) 158 | { 159 | break; 160 | } 161 | } 162 | 163 | /* 164 | * If the mode switch was pressed for more than required timeout 165 | * set the flash run type as bootloader to wait for a bootload operation 166 | */ 167 | if(counter >= MODE_BUTTON_DELAY) 168 | { 169 | Bootloader_SetFlashByte((uint32) Bootloader_MD_BTLDB_ACTIVE_OFFSET(BOOTLOADER_ACTIVE_IDX), APP_ACTIVE); 170 | Bootloader_SetFlashByte((uint32) Bootloader_MD_BTLDB_ACTIVE_OFFSET(KIT_PROG_ACTIVE_IDX), APP_INACTIVE); 171 | Bootloader_SetFlashByte((uint32) Bootloader_MD_BTLDB_ACTIVE_OFFSET(CUSTOM_APP_ACTIVE_IDX), APP_INACTIVE); 172 | Bootloader_activeApp = BOOTLOADER_ACTIVE_IDX; 173 | 174 | /* Set the reset SR0 switch to indicate the */ 175 | Bootloader_SET_RUN_TYPE(Bootloader_START_BTLDR); 176 | } 177 | } 178 | 179 | /* Start Bootloader */ 180 | Bootloader_Start(); 181 | 182 | for(;;) 183 | { 184 | } 185 | } 186 | 187 | /* [] END OF FILE */ 188 | -------------------------------------------------------------------------------- /KitProg3_Library.cylib/B_SPI_Master_v2_50/B_SPI_Master_v2_50.cysym: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Infineon/KitProg3/b81f81489ed6ac43451fac3c585e36b53ef6fe49/KitProg3_Library.cylib/B_SPI_Master_v2_50/B_SPI_Master_v2_50.cysym -------------------------------------------------------------------------------- /KitProg3_Library.cylib/SPI_Master_v2_50/API/SPI_MasterINT.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * File Name: `$INSTANCE_NAME`_INT.c 3 | * Version `$CY_MAJOR_VERSION`.`$CY_MINOR_VERSION` 4 | * 5 | * Description: 6 | * This file provides all Interrupt Service Routine (ISR) for the SPI Master 7 | * component. 8 | * 9 | * Note: 10 | * None. 11 | * 12 | ******************************************************************************** 13 | * Copyright 2008-2015, Cypress Semiconductor Corporation. All rights reserved. 14 | * You may use this file only in accordance with the license, terms, conditions, 15 | * disclaimers, and limitations in the end user license agreement accompanying 16 | * the software package with which this file was provided. 17 | *******************************************************************************/ 18 | 19 | #include "`$INSTANCE_NAME`_PVT.h" 20 | `$CY_API_CALLBACK_HEADER_INCLUDE` 21 | 22 | /* User code required at start of ISR */ 23 | /* `#START `$INSTANCE_NAME`_ISR_START_DEF` */ 24 | 25 | /* `#END` */ 26 | 27 | 28 | /******************************************************************************* 29 | * Function Name: `$INSTANCE_NAME`_TX_ISR 30 | ******************************************************************************** 31 | * 32 | * Summary: 33 | * Interrupt Service Routine for TX portion of the SPI Master. 34 | * 35 | * Parameters: 36 | * None. 37 | * 38 | * Return: 39 | * None. 40 | * 41 | * Global variables: 42 | * `$INSTANCE_NAME`_txBufferWrite - used for the account of the bytes which 43 | * have been written down in the TX software buffer. 44 | * `$INSTANCE_NAME`_txBufferRead - used for the account of the bytes which 45 | * have been read from the TX software buffer, modified when exist data to 46 | * sending and FIFO Not Full. 47 | * `$INSTANCE_NAME`_txBuffer[`$INSTANCE_NAME`_TX_BUFFER_SIZE] - used to store 48 | * data to sending. 49 | * All described above Global variables are used when Software Buffer is used. 50 | * 51 | *******************************************************************************/ 52 | CY_ISR(`$INSTANCE_NAME`_TX_ISR) 53 | { 54 | #if(`$INSTANCE_NAME`_TX_SOFTWARE_BUF_ENABLED) 55 | uint8 tmpStatus; 56 | #endif /* (`$INSTANCE_NAME`_TX_SOFTWARE_BUF_ENABLED) */ 57 | 58 | #ifdef `$INSTANCE_NAME`_TX_ISR_ENTRY_CALLBACK 59 | `$INSTANCE_NAME`_TX_ISR_EntryCallback(); 60 | #endif /* `$INSTANCE_NAME`_TX_ISR_ENTRY_CALLBACK */ 61 | 62 | /* User code required at start of ISR */ 63 | /* `#START `$INSTANCE_NAME`_TX_ISR_START` */ 64 | 65 | /* `#END` */ 66 | 67 | #if(`$INSTANCE_NAME`_TX_SOFTWARE_BUF_ENABLED) 68 | /* Check if TX data buffer is not empty and there is space in TX FIFO */ 69 | while(`$INSTANCE_NAME`_txBufferRead != `$INSTANCE_NAME`_txBufferWrite) 70 | { 71 | tmpStatus = `$INSTANCE_NAME`_GET_STATUS_TX(`$INSTANCE_NAME`_swStatusTx); 72 | `$INSTANCE_NAME`_swStatusTx = tmpStatus; 73 | 74 | if(0u != (`$INSTANCE_NAME`_swStatusTx & `$INSTANCE_NAME`_STS_TX_FIFO_NOT_FULL)) 75 | { 76 | if(0u == `$INSTANCE_NAME`_txBufferFull) 77 | { 78 | `$INSTANCE_NAME`_txBufferRead++; 79 | 80 | if(`$INSTANCE_NAME`_txBufferRead >= `$INSTANCE_NAME`_TX_BUFFER_SIZE) 81 | { 82 | `$INSTANCE_NAME`_txBufferRead = 0u; 83 | } 84 | } 85 | else 86 | { 87 | `$INSTANCE_NAME`_txBufferFull = 0u; 88 | } 89 | 90 | /* Put data element into the TX FIFO */ 91 | `$CySetRegReplacementString`(`$INSTANCE_NAME`_TXDATA_PTR, 92 | `$INSTANCE_NAME`_txBuffer[`$INSTANCE_NAME`_txBufferRead]); 93 | } 94 | else 95 | { 96 | break; 97 | } 98 | } 99 | 100 | if(`$INSTANCE_NAME`_txBufferRead == `$INSTANCE_NAME`_txBufferWrite) 101 | { 102 | /* TX Buffer is EMPTY: disable interrupt on TX NOT FULL */ 103 | `$INSTANCE_NAME`_TX_STATUS_MASK_REG &= ((uint8) ~`$INSTANCE_NAME`_STS_TX_FIFO_NOT_FULL); 104 | } 105 | 106 | #endif /* (`$INSTANCE_NAME`_TX_SOFTWARE_BUF_ENABLED) */ 107 | 108 | /* User code required at end of ISR (Optional) */ 109 | /* `#START `$INSTANCE_NAME`_TX_ISR_END` */ 110 | 111 | /* `#END` */ 112 | 113 | #ifdef `$INSTANCE_NAME`_TX_ISR_EXIT_CALLBACK 114 | `$INSTANCE_NAME`_TX_ISR_ExitCallback(); 115 | #endif /* `$INSTANCE_NAME`_TX_ISR_EXIT_CALLBACK */ 116 | } 117 | 118 | 119 | /******************************************************************************* 120 | * Function Name: `$INSTANCE_NAME`_RX_ISR 121 | ******************************************************************************** 122 | * 123 | * Summary: 124 | * Interrupt Service Routine for RX portion of the SPI Master. 125 | * 126 | * Parameters: 127 | * None. 128 | * 129 | * Return: 130 | * None. 131 | * 132 | * Global variables: 133 | * `$INSTANCE_NAME`_rxBufferWrite - used for the account of the bytes which 134 | * have been written down in the RX software buffer modified when FIFO contains 135 | * new data. 136 | * `$INSTANCE_NAME`_rxBufferRead - used for the account of the bytes which 137 | * have been read from the RX software buffer, modified when overflow occurred. 138 | * `$INSTANCE_NAME`_rxBuffer[`$INSTANCE_NAME`_RX_BUFFER_SIZE] - used to store 139 | * received data, modified when FIFO contains new data. 140 | * All described above Global variables are used when Software Buffer is used. 141 | * 142 | *******************************************************************************/ 143 | CY_ISR(`$INSTANCE_NAME`_RX_ISR) 144 | { 145 | #if(`$INSTANCE_NAME`_RX_SOFTWARE_BUF_ENABLED) 146 | uint8 tmpStatus; 147 | `$RegSizeReplacementString` rxData; 148 | #endif /* (`$INSTANCE_NAME`_RX_SOFTWARE_BUF_ENABLED) */ 149 | 150 | #ifdef `$INSTANCE_NAME`_RX_ISR_ENTRY_CALLBACK 151 | `$INSTANCE_NAME`_RX_ISR_EntryCallback(); 152 | #endif /* `$INSTANCE_NAME`_RX_ISR_ENTRY_CALLBACK */ 153 | 154 | /* User code required at start of ISR */ 155 | /* `#START `$INSTANCE_NAME`_RX_ISR_START` */ 156 | 157 | /* `#END` */ 158 | 159 | #if(`$INSTANCE_NAME`_RX_SOFTWARE_BUF_ENABLED) 160 | 161 | tmpStatus = `$INSTANCE_NAME`_GET_STATUS_RX(`$INSTANCE_NAME`_swStatusRx); 162 | `$INSTANCE_NAME`_swStatusRx = tmpStatus; 163 | 164 | /* Check if RX data FIFO has some data to be moved into the RX Buffer */ 165 | while(0u != (`$INSTANCE_NAME`_swStatusRx & `$INSTANCE_NAME`_STS_RX_FIFO_NOT_EMPTY)) 166 | { 167 | rxData = `$CyGetRegReplacementString`(`$INSTANCE_NAME`_RXDATA_PTR); 168 | 169 | /* Set next pointer. */ 170 | `$INSTANCE_NAME`_rxBufferWrite++; 171 | if(`$INSTANCE_NAME`_rxBufferWrite >= `$INSTANCE_NAME`_RX_BUFFER_SIZE) 172 | { 173 | `$INSTANCE_NAME`_rxBufferWrite = 0u; 174 | } 175 | 176 | if(`$INSTANCE_NAME`_rxBufferWrite == `$INSTANCE_NAME`_rxBufferRead) 177 | { 178 | `$INSTANCE_NAME`_rxBufferRead++; 179 | if(`$INSTANCE_NAME`_rxBufferRead >= `$INSTANCE_NAME`_RX_BUFFER_SIZE) 180 | { 181 | `$INSTANCE_NAME`_rxBufferRead = 0u; 182 | } 183 | 184 | `$INSTANCE_NAME`_rxBufferFull = 1u; 185 | } 186 | 187 | /* Move data from the FIFO to the Buffer */ 188 | `$INSTANCE_NAME`_rxBuffer[`$INSTANCE_NAME`_rxBufferWrite] = rxData; 189 | 190 | tmpStatus = `$INSTANCE_NAME`_GET_STATUS_RX(`$INSTANCE_NAME`_swStatusRx); 191 | `$INSTANCE_NAME`_swStatusRx = tmpStatus; 192 | } 193 | 194 | #endif /* (`$INSTANCE_NAME`_RX_SOFTWARE_BUF_ENABLED) */ 195 | 196 | /* User code required at end of ISR (Optional) */ 197 | /* `#START `$INSTANCE_NAME`_RX_ISR_END` */ 198 | 199 | /* `#END` */ 200 | 201 | #ifdef `$INSTANCE_NAME`_RX_ISR_EXIT_CALLBACK 202 | `$INSTANCE_NAME`_RX_ISR_ExitCallback(); 203 | #endif /* `$INSTANCE_NAME`_RX_ISR_EXIT_CALLBACK */ 204 | } 205 | 206 | /* [] END OF FILE */ 207 | -------------------------------------------------------------------------------- /KitProg3_Library.cylib/SPI_Master_v2_50/API/SPI_Master_PM.c: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * File Name: `$INSTANCE_NAME`_PM.c 3 | * Version `$CY_MAJOR_VERSION`.`$CY_MINOR_VERSION` 4 | * 5 | * Description: 6 | * This file contains the setup, control and status commands to support 7 | * component operations in low power mode. 8 | * 9 | * Note: 10 | * 11 | ******************************************************************************** 12 | * Copyright 2008-2015, Cypress Semiconductor Corporation. All rights reserved. 13 | * You may use this file only in accordance with the license, terms, conditions, 14 | * disclaimers, and limitations in the end user license agreement accompanying 15 | * the software package with which this file was provided. 16 | *******************************************************************************/ 17 | 18 | #include "`$INSTANCE_NAME`_PVT.h" 19 | 20 | static `$INSTANCE_NAME`_BACKUP_STRUCT `$INSTANCE_NAME`_backup = 21 | { 22 | `$INSTANCE_NAME`_DISABLED, 23 | `$INSTANCE_NAME`_BITCTR_INIT, 24 | }; 25 | 26 | 27 | /******************************************************************************* 28 | * Function Name: `$INSTANCE_NAME`_SaveConfig 29 | ******************************************************************************** 30 | * 31 | * Summary: 32 | * Empty function. Included for consistency with other components. 33 | * 34 | * Parameters: 35 | * None. 36 | * 37 | * Return: 38 | * None. 39 | * 40 | *******************************************************************************/ 41 | void `$INSTANCE_NAME`_SaveConfig(void) `=ReentrantKeil($INSTANCE_NAME . "_SaveConfig")` 42 | { 43 | 44 | } 45 | 46 | 47 | /******************************************************************************* 48 | * Function Name: `$INSTANCE_NAME`_RestoreConfig 49 | ******************************************************************************** 50 | * 51 | * Summary: 52 | * Empty function. Included for consistency with other components. 53 | * 54 | * Parameters: 55 | * None. 56 | * 57 | * Return: 58 | * None. 59 | * 60 | *******************************************************************************/ 61 | void `$INSTANCE_NAME`_RestoreConfig(void) `=ReentrantKeil($INSTANCE_NAME . "_RestoreConfig")` 62 | { 63 | 64 | } 65 | 66 | 67 | /******************************************************************************* 68 | * Function Name: `$INSTANCE_NAME`_Sleep 69 | ******************************************************************************** 70 | * 71 | * Summary: 72 | * Prepare SPIM Component goes to sleep. 73 | * 74 | * Parameters: 75 | * None. 76 | * 77 | * Return: 78 | * None. 79 | * 80 | * Global Variables: 81 | * `$INSTANCE_NAME`_backup - modified when non-retention registers are saved. 82 | * 83 | * Reentrant: 84 | * No. 85 | * 86 | *******************************************************************************/ 87 | void `$INSTANCE_NAME`_Sleep(void) `=ReentrantKeil($INSTANCE_NAME . "_Sleep")` 88 | { 89 | /* Save components enable state */ 90 | `$INSTANCE_NAME`_backup.enableState = ((uint8) `$INSTANCE_NAME`_IS_ENABLED); 91 | 92 | `$INSTANCE_NAME`_Stop(); 93 | } 94 | 95 | 96 | /******************************************************************************* 97 | * Function Name: `$INSTANCE_NAME`_Wakeup 98 | ******************************************************************************** 99 | * 100 | * Summary: 101 | * Prepare SPIM Component to wake up. 102 | * 103 | * Parameters: 104 | * None. 105 | * 106 | * Return: 107 | * None. 108 | * 109 | * Global Variables: 110 | * `$INSTANCE_NAME`_backup - used when non-retention registers are restored. 111 | * `$INSTANCE_NAME`_txBufferWrite - modified every function call - resets to 112 | * zero. 113 | * `$INSTANCE_NAME`_txBufferRead - modified every function call - resets to 114 | * zero. 115 | * `$INSTANCE_NAME`_rxBufferWrite - modified every function call - resets to 116 | * zero. 117 | * `$INSTANCE_NAME`_rxBufferRead - modified every function call - resets to 118 | * zero. 119 | * 120 | * Reentrant: 121 | * No. 122 | * 123 | *******************************************************************************/ 124 | void `$INSTANCE_NAME`_Wakeup(void) `=ReentrantKeil($INSTANCE_NAME . "_Wakeup")` 125 | { 126 | #if(`$INSTANCE_NAME`_RX_SOFTWARE_BUF_ENABLED) 127 | `$INSTANCE_NAME`_rxBufferFull = 0u; 128 | `$INSTANCE_NAME`_rxBufferRead = 0u; 129 | `$INSTANCE_NAME`_rxBufferWrite = 0u; 130 | #endif /* (`$INSTANCE_NAME`_RX_SOFTWARE_BUF_ENABLED) */ 131 | 132 | #if(`$INSTANCE_NAME`_TX_SOFTWARE_BUF_ENABLED) 133 | `$INSTANCE_NAME`_txBufferFull = 0u; 134 | `$INSTANCE_NAME`_txBufferRead = 0u; 135 | `$INSTANCE_NAME`_txBufferWrite = 0u; 136 | #endif /* (`$INSTANCE_NAME`_TX_SOFTWARE_BUF_ENABLED) */ 137 | 138 | /* Clear any data from the RX and TX FIFO */ 139 | `$INSTANCE_NAME`_ClearFIFO(); 140 | 141 | /* Restore components block enable state */ 142 | if(0u != `$INSTANCE_NAME`_backup.enableState) 143 | { 144 | `$INSTANCE_NAME`_Enable(); 145 | } 146 | } 147 | 148 | 149 | /* [] END OF FILE */ 150 | -------------------------------------------------------------------------------- /KitProg3_Library.cylib/SPI_Master_v2_50/API/SPI_Master_PVT.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * File Name: `$INSTANCE_NAME_PVT`.h 3 | * Version `$CY_MAJOR_VERSION`.`$CY_MINOR_VERSION` 4 | * 5 | * Description: 6 | * This private header file contains internal definitions for the SPIM 7 | * component. Do not use these definitions directly in your application. 8 | * 9 | * Note: 10 | * 11 | ******************************************************************************** 12 | * Copyright 2012-2015, Cypress Semiconductor Corporation. All rights reserved. 13 | * You may use this file only in accordance with the license, terms, conditions, 14 | * disclaimers, and limitations in the end user license agreement accompanying 15 | * the software package with which this file was provided. 16 | *******************************************************************************/ 17 | 18 | #if !defined(CY_SPIM_PVT_`$INSTANCE_NAME`_H) 19 | #define CY_SPIM_PVT_`$INSTANCE_NAME`_H 20 | 21 | #include "`$INSTANCE_NAME`.h" 22 | 23 | 24 | /********************************** 25 | * Functions with external linkage 26 | **********************************/ 27 | 28 | 29 | /********************************** 30 | * Variables with external linkage 31 | **********************************/ 32 | 33 | extern volatile uint8 `$INSTANCE_NAME`_swStatusTx; 34 | extern volatile uint8 `$INSTANCE_NAME`_swStatusRx; 35 | 36 | #if(`$INSTANCE_NAME`_TX_SOFTWARE_BUF_ENABLED) 37 | extern volatile `$RegSizeReplacementString` `$INSTANCE_NAME`_txBuffer[`$INSTANCE_NAME`_TX_BUFFER_SIZE]; 38 | extern volatile uint8 `$INSTANCE_NAME`_txBufferRead; 39 | extern volatile uint8 `$INSTANCE_NAME`_txBufferWrite; 40 | extern volatile uint8 `$INSTANCE_NAME`_txBufferFull; 41 | #endif /* (`$INSTANCE_NAME`_TX_SOFTWARE_BUF_ENABLED) */ 42 | 43 | #if(`$INSTANCE_NAME`_RX_SOFTWARE_BUF_ENABLED) 44 | extern volatile `$RegSizeReplacementString` `$INSTANCE_NAME`_rxBuffer[`$INSTANCE_NAME`_RX_BUFFER_SIZE]; 45 | extern volatile uint8 `$INSTANCE_NAME`_rxBufferRead; 46 | extern volatile uint8 `$INSTANCE_NAME`_rxBufferWrite; 47 | extern volatile uint8 `$INSTANCE_NAME`_rxBufferFull; 48 | #endif /* (`$INSTANCE_NAME`_RX_SOFTWARE_BUF_ENABLED) */ 49 | 50 | #endif /* CY_SPIM_PVT_`$INSTANCE_NAME`_H */ 51 | 52 | 53 | /* [] END OF FILE */ 54 | -------------------------------------------------------------------------------- /KitProg3_Library.cylib/SPI_Master_v2_50/Custom/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.239 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace SPI_Master_v2_50.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SPI_Master_v2_50.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized string similar to Advanced. 65 | /// 66 | internal static string AdvancedTabTitle { 67 | get { 68 | return ResourceManager.GetString("AdvancedTabTitle", resourceCulture); 69 | } 70 | } 71 | 72 | /// 73 | /// Looks up a localized string similar to Configure. 74 | /// 75 | internal static string BasicTabTitle { 76 | get { 77 | return ResourceManager.GetString("BasicTabTitle", resourceCulture); 78 | } 79 | } 80 | 81 | /// 82 | /// Looks up a localized string similar to Built-in. 83 | /// 84 | internal static string BuiltInTabTitle { 85 | get { 86 | return ResourceManager.GetString("BuiltInTabTitle", resourceCulture); 87 | } 88 | } 89 | 90 | /// 91 | /// Looks up a localized string similar to Only {0} to {1} DataBits value is supported in current version. Please select DataBits value from this range.. 92 | /// 93 | internal static string DRCNumberOfDataBitsMsg { 94 | get { 95 | return ResourceManager.GetString("DRCNumberOfDataBitsMsg", resourceCulture); 96 | } 97 | } 98 | 99 | /// 100 | /// Looks up a localized string similar to BitRate value must be between 1 bps and 33 Mbps.. 101 | /// 102 | internal static string FrequencyEPMsg { 103 | get { 104 | return ResourceManager.GetString("FrequencyEPMsg", resourceCulture); 105 | } 106 | } 107 | 108 | /// 109 | /// Looks up a localized string similar to Number Of Data Bits must be between {0} and {1}. 110 | /// 111 | internal static string NumOfDataBitsEPMsg { 112 | get { 113 | return ResourceManager.GetString("NumOfDataBitsEPMsg", resourceCulture); 114 | } 115 | } 116 | 117 | /// 118 | /// Looks up a localized string similar to Rx Buffer Size must be between {0} and {1}.. 119 | /// 120 | internal static string RXBufferSizeEPMsg { 121 | get { 122 | return ResourceManager.GetString("RXBufferSizeEPMsg", resourceCulture); 123 | } 124 | } 125 | 126 | /// 127 | /// Looks up a localized string similar to Rx Buffer Size ({0}-bit words):. 128 | /// 129 | internal static string RxBufferSizeLabelText { 130 | get { 131 | return ResourceManager.GetString("RxBufferSizeLabelText", resourceCulture); 132 | } 133 | } 134 | 135 | /// 136 | /// Looks up a localized string similar to Rx Buffer Size (unknown):. 137 | /// 138 | internal static string RxBufferSizeLabelUnknownText { 139 | get { 140 | return ResourceManager.GetString("RxBufferSizeLabelUnknownText", resourceCulture); 141 | } 142 | } 143 | 144 | /// 145 | /// Looks up a localized string similar to Tx Buffer Size must be between {0} and {1}.. 146 | /// 147 | internal static string TXBufferSizeEPMsg { 148 | get { 149 | return ResourceManager.GetString("TXBufferSizeEPMsg", resourceCulture); 150 | } 151 | } 152 | 153 | /// 154 | /// Looks up a localized string similar to Tx Buffer Size ({0}-bit words):. 155 | /// 156 | internal static string TxBufferSizeLabelText { 157 | get { 158 | return ResourceManager.GetString("TxBufferSizeLabelText", resourceCulture); 159 | } 160 | } 161 | 162 | /// 163 | /// Looks up a localized string similar to Tx Buffer Size (unknown):. 164 | /// 165 | internal static string TxBufferSizeLabelUnknownText { 166 | get { 167 | return ResourceManager.GetString("TxBufferSizeLabelUnknownText", resourceCulture); 168 | } 169 | } 170 | } 171 | } 172 | -------------------------------------------------------------------------------- /KitProg3_Library.cylib/SPI_Master_v2_50/Custom/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | Advanced 122 | 123 | 124 | Configure 125 | 126 | 127 | Built-in 128 | 129 | 130 | Only {0} to {1} DataBits value is supported in current version. Please select DataBits value from this range. 131 | 132 | 133 | BitRate value must be between 1 bps and 33 Mbps. 134 | 135 | 136 | Number Of Data Bits must be between {0} and {1} 137 | 138 | 139 | Rx Buffer Size must be between {0} and {1}. 140 | 141 | 142 | Rx Buffer Size ({0}-bit words): 143 | 144 | 145 | Rx Buffer Size (unknown): 146 | 147 | 148 | Tx Buffer Size must be between {0} and {1}. 149 | 150 | 151 | Tx Buffer Size ({0}-bit words): 152 | 153 | 154 | Tx Buffer Size (unknown): 155 | 156 | -------------------------------------------------------------------------------- /KitProg3_Library.cylib/SPI_Master_v2_50/Custom/cyadditional.cs: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2008-2011, Cypress Semiconductor Corporation. All rights reserved. 3 | * You may use this file only in accordance with the license, terms, conditions, 4 | * disclaimers, and limitations in the end user license agreement accompanying 5 | * the software package with which this file was provided. 6 | ********************************************************************************/ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Text; 11 | using System.Reflection; 12 | using System.ComponentModel; 13 | 14 | namespace SPI_Master_v2_50 15 | { 16 | static class CyEnumConverter 17 | { 18 | /// 19 | /// Converts enum description to value 20 | /// 21 | /// 22 | /// 23 | /// 24 | public static object GetEnumValue(object value, Type _enumType) 25 | { 26 | foreach (FieldInfo fi in _enumType.GetFields()) 27 | { 28 | DescriptionAttribute dna = 29 | (DescriptionAttribute)Attribute.GetCustomAttribute( 30 | fi, typeof(DescriptionAttribute)); 31 | 32 | if ((dna != null) && (value.ToString() == (string)dna.Description)) 33 | return Enum.Parse(_enumType, fi.Name); 34 | } 35 | return Enum.Parse(_enumType, value.ToString()); 36 | } 37 | 38 | /// 39 | /// Converts enum value to description 40 | /// 41 | /// 42 | /// 43 | public static string GetEnumDesc(object value) 44 | { 45 | Type _enumType = value.GetType(); 46 | FieldInfo fi = _enumType.GetField(Enum.GetName(_enumType, value)); 47 | DescriptionAttribute dna = 48 | (DescriptionAttribute)Attribute.GetCustomAttribute( 49 | fi, typeof(DescriptionAttribute)); 50 | 51 | if (dna != null) 52 | return dna.Description; 53 | else 54 | return value.ToString(); 55 | } 56 | 57 | /// 58 | /// Gets all enum descriptions 59 | /// 60 | /// 61 | /// 62 | public static string[] GetEnumDescList(Type _enumType) 63 | { 64 | List res = new List(); 65 | foreach (object item in Enum.GetValues(_enumType)) 66 | { 67 | res.Add(GetEnumDesc(item)); 68 | } 69 | return res.ToArray(); 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /KitProg3_Library.cylib/SPI_Master_v2_50/Custom/cyspimcontrol.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 17, 17 122 | 123 | -------------------------------------------------------------------------------- /KitProg3_Library.cylib/SPI_Master_v2_50/Custom/cyspimcontroladv.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 17, 17 122 | 123 | -------------------------------------------------------------------------------- /KitProg3_Library.cylib/SPI_Master_v2_50/Custom/cyspimcustomizer.cs: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright 2008-2011, Cypress Semiconductor Corporation. All rights reserved. 3 | * You may use this file only in accordance with the license, terms, conditions, 4 | * disclaimers, and limitations in the end user license agreement accompanying 5 | * the software package with which this file was provided. 6 | ********************************************************************************/ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Text; 11 | using System.Windows.Forms; 12 | using System.Diagnostics; 13 | using CyDesigner.Extensions.Common; 14 | using CyDesigner.Extensions.Gde; 15 | 16 | namespace SPI_Master_v2_50 17 | { 18 | [CyCompDevCustomizer()] 19 | public class CyCustomizer : ICyParamEditHook_v1, ICyDRCProvider_v1 20 | { 21 | public const string BASIC_TABNAME = "Basic"; 22 | public const string ADVANCED_TABNAME = "Advanced"; 23 | 24 | #region ICyParamEditHook_v1 Members 25 | public DialogResult EditParams(ICyInstEdit_v1 edit, ICyTerminalQuery_v1 termQuery, ICyExpressMgr_v1 mgr) 26 | { 27 | CySPIMParameters parameters = new CySPIMParameters(edit); 28 | ICyTabbedParamEditor editor = edit.CreateTabbedParamEditor(); 29 | 30 | CyParamExprDelegate configureExpressionViewDataChanged = 31 | delegate(ICyParamEditor custEditor, CyCompDevParam param) 32 | { 33 | parameters.LoadParameters(edit); 34 | }; 35 | editor.AddCustomPage(Properties.Resources.BasicTabTitle, new CySPIMControl(parameters), 36 | configureExpressionViewDataChanged, BASIC_TABNAME); 37 | editor.AddCustomPage(Properties.Resources.AdvancedTabTitle, new CySPIMControlAdv(parameters), 38 | configureExpressionViewDataChanged, ADVANCED_TABNAME); 39 | editor.AddDefaultPage(Properties.Resources.BuiltInTabTitle, "Built-in"); 40 | parameters.LoadParameters(edit); 41 | parameters.m_bGlobalEditMode = true; 42 | return editor.ShowDialog(); 43 | } 44 | 45 | public bool EditParamsOnDrop 46 | { 47 | get { return false; } 48 | } 49 | 50 | public CyCompDevParamEditorMode GetEditorMode() 51 | { 52 | return CyCompDevParamEditorMode.COMPLETE; 53 | } 54 | #endregion 55 | 56 | #region ICyDRCProvider_v1 Members 57 | public IEnumerable GetDRCs(ICyDRCProviderArgs_v1 args) 58 | { 59 | CyCustErr err = VerifyNumberOfDatabits(args.InstQueryV1); 60 | if (err.IsOk == false) 61 | yield return new CyDRCInfo_v1(CyDRCInfo_v1.CyDRCType_v1.Error, err.Message); 62 | } 63 | 64 | CyCustErr VerifyNumberOfDatabits(ICyInstQuery_v1 instQuery) 65 | { 66 | CyCustErr result = CyCustErr.OK; 67 | 68 | byte value = 0; 69 | instQuery.GetCommittedParam(CyParamNames.NUMBER_OF_DATA_BITS).TryGetValueAs(out value); 70 | 71 | if (value < CyParamRange.NUM_BITS_MIN) 72 | { 73 | result = new CyCustErr(string.Format(Properties.Resources.DRCNumberOfDataBitsMsg, 74 | CyParamRange.NUM_BITS_MIN, CyParamRange.NUM_BITS_MAX)); 75 | } 76 | return result; 77 | } 78 | #endregion 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /KitProg3_Library.cylib/SPI_Master_v2_50/SPI_Master_Bidir.cymacro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Infineon/KitProg3/b81f81489ed6ac43451fac3c585e36b53ef6fe49/KitProg3_Library.cylib/SPI_Master_v2_50/SPI_Master_Bidir.cymacro -------------------------------------------------------------------------------- /KitProg3_Library.cylib/SPI_Master_v2_50/SPI_Master_Fll_Dplx.cymacro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Infineon/KitProg3/b81f81489ed6ac43451fac3c585e36b53ef6fe49/KitProg3_Library.cylib/SPI_Master_v2_50/SPI_Master_Fll_Dplx.cymacro -------------------------------------------------------------------------------- /KitProg3_Library.cylib/SPI_Master_v2_50/SPI_Master_v2_50.cysch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Infineon/KitProg3/b81f81489ed6ac43451fac3c585e36b53ef6fe49/KitProg3_Library.cylib/SPI_Master_v2_50/SPI_Master_v2_50.cysch -------------------------------------------------------------------------------- /KitProg3_Library.cylib/SPI_Master_v2_50/SPI_Master_v2_50.cystate: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | PSoC3 6 | * 7 | * 8 | * 9 | 10 | Production 11 | None 12 | 13 | 14 | 15 | 16 | PSoC4 17 | PSoC4_1 18 | 19 | Incompatible 20 | Error 21 | 22 | 23 | 24 | 25 | PSoC4 26 | PSoC4_9 27 | 28 | Incompatible 29 | Error 30 | 31 | 32 | 33 | 34 | PSoC4 35 | PSoC4_10 36 | 37 | Incompatible 38 | Error 39 | 40 | 41 | 42 | 43 | PSoC4 44 | PSoC4_8 45 | 46 | Incompatible 47 | Error 48 | 49 | 50 | 51 | 52 | PSoC4 53 | * 54 | * 55 | * 56 | 57 | Production 58 | None 59 | 60 | 61 | 62 | 63 | PSoC5 64 | PSoC5LP 65 | 66 | Production 67 | None 68 | 69 | 70 | -------------------------------------------------------------------------------- /KitProg3_Library.cylib/SPI_Master_v2_50/SPI_Master_v2_50.cysym: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Infineon/KitProg3/b81f81489ed6ac43451fac3c585e36b53ef6fe49/KitProg3_Library.cylib/SPI_Master_v2_50/SPI_Master_v2_50.cysym -------------------------------------------------------------------------------- /KitProg3_Library.cylib/SPI_Master_v2_50/SPI_Master_v2_50.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Infineon/KitProg3/b81f81489ed6ac43451fac3c585e36b53ef6fe49/KitProg3_Library.cylib/SPI_Master_v2_50/SPI_Master_v2_50.docx -------------------------------------------------------------------------------- /KitProg3_Library.cylib/SPI_Master_v2_50/SPI_Master_v2_50.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Infineon/KitProg3/b81f81489ed6ac43451fac3c585e36b53ef6fe49/KitProg3_Library.cylib/SPI_Master_v2_50/SPI_Master_v2_50.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # KitProg3 2 | KitProg3 Firmware repo 3 | 4 | ### Overview 5 | 6 | This repo contains only KitProg3 Firmware source code. 7 | The compiled firmware is delivered with [fw-loader utility](https://github.com/Infineon/Firmware-loader). 8 | 9 | ### Build Notes 10 | 11 | - This project is built with [PSoC Creator v.4.4](https://www.infineon.com/cms/en/design-support/tools/sdk/psoc-software/psoc-creator/) in the build configuration Release. 12 | - A compiled image (KitProg3_1.hex and KitProg3_1.cyacd) will be placed in the /KitProg3.cydsn/ARM_GCC_541/Release folder. 13 | - There are two options how to programm recently compiled images to PSoC5LP on the Cypress kit: 14 | - KitProg3_1.hex can be programmed with an external debug probe. 15 | - KitProg3_1.cyacd can be programmed using the fw-loader utility: 16 | 1. Copy the KitProg3_1.cyacd file to /../kp-firmware/KitProg3.cyacd in the fw-loader utility. 17 | 2. Use the --update-kp3 option of the fw-loader utility to update the firmware. 18 | 19 | ### Notes 20 | Note, this KitProg3 firmware source code is without the DapLink code part, which is stored in the separate GitHub repo - https://github.com/ARMmbed/DAPLink . We are working with the ARM team to integrate our updates into this repo. 21 | 22 | ### More information 23 | 24 | - [fw-loader README.md](https://github.com/Infineon/Firmware-loader/blob/master/README.md) 25 | 26 | - [Kitprog3 User Guide](https://www.infineon.com/documentation/development-kitsboards/kitprog-user-guide) 27 | 28 | - [KitProg Host Protocol Interface](https://www.infineon.com/dgdl/Infineon-KitProg_Host_Protocol_Interface-UserManual-v01_00-EN.pdf?fileId=8ac78c8c7d0d8da4017d0f0125c8185e) 29 | 30 | - [ModusToolbox™ Software Environment, Quick Start Guide, Documentation, and 31 | Videos](https://www.infineon.com/modustoolbox) 32 | 33 | - [Cypress Semiconductor, an Infineon Technologies Company](http://www.cypress.com) 34 | 35 | © Cypress Semiconductor Corporation, 2019-2025. This document is the property of Cypress Semiconductor Corporation, an Infineon Technologies company, and its affiliates ("Cypress"). -------------------------------------------------------------------------------- /RELEASE.md: -------------------------------------------------------------------------------- 1 | ### KitProg3 v2.80.0 Release Notes 2 | 3 | KitProg3 is our low-level communication firmware for programming and debugging. It provides communication between a programming tool (such as CYPRESS™ Programmer or PSoC™ Programmer) and a target, such as a PSoC™ 6 MCU. KitProg3 supports a variety of development kits. It is also the communication firmware found in the MiniProg4 debug probe. 4 | Our development kits have KitProg3 firmware installed to provide the necessary communication between the host and target. As a result, when you plug the kit into your host computer, programming and debugging just work. 5 | 6 | ### New Features 7 | 8 | - Added support of DAPLink mode on PSOC™ 4100T Plus CAPSENSE™ Prototyping Kit and CY8CPROTO-040T-MS PSOC™ 4000T Multi-Sense Prototyping Kit 9 | 10 | ### Known Issues 11 | 12 | | ID | Known Issue | Workaround | 13 | |-----------------------------------|-----------------------------------|-----------------------------------| 14 | | PROGTOOLS-768 | KitProg3 firmware might not be updated properly on a particular USB port on some Lenovo ThinkPad Pro Docking Station. | If you encounter this problem: 1. switch to a different USB port on the docking station OR 2. Update KitProg3 firmware in Bootloader mode (press the mode switch while plugging in the board). | 15 | | PROGTOOLS-1488 | Junk characters might be observed in a UART terminal during programming of the connected kit or after programming is competed. | Clear UART buffers after kit programming is completed. | 16 | | PROGTOOLS-1838 | Starting from KitProg3 v2.10, when KitProg3 is in CMSIS-DAP Bulk mode, it is not possible to debug and use USB-I2C/SPI bridging (for example, in the CapSense Tuner, Bridge Control Panel) at the same time. This affects Windows OS only. It does not affect Linux or macOS users. | If you would like to use debug and USB-I2C/SPI bridging at the same time, there are two possible workarounds:
1. If performance for programming and debug is not critical,switch KitProg3 to CMSIS-DAP.
2. If you need faster performance for programming and debug, use the onboard KitProg3 for programming purposes and MiniProg4 for bridging purposes or vice versa. Both devices can be in CMSIS-DAP bulk mode. Details are in [KBA231025](https://community.infineon.com/t5/Knowledge-Base-Articles/Windows-Only-With-KitProg3-v2-10-Simultaneous-Use-of-USB-I2C-SPI/ta-p/250449). | 17 | | PROGTOOLS-1869 | In Linux OS, with KitProg3 in CMSIS-DAP HID mode, a debug session in ModusToolbox™ can be destroyed if you use the Firmware Loader --device-list command while debugging. This is limitation of hidapi library used on Linux. macOS and Windows OSes are not impacted. | If you have a debug session running, don't use the firmware loader tool. | 18 | | PROGTOOLS-1814 | Starting from KitProg3 v2.10, in some cases Windows 7 does not recognize the KitProg3 bridge. So the USB- I2C/SPI bridge devices are not available in either CMSIS-DAP HID or CMSIS-DAP bulk mode. | Install a digitally signed driver manually from the Windows Update Catalog. Follow steps from [KBA231026](https://community.infineon.com/t5/Knowledge-Base-Articles/Windows-7-No-USB-I2C-SPI-Bridge-Device-Available-when-KitProg3/ta-p/250443). | 19 | 20 | 21 | 22 | ### More information 23 | 24 | - [fw-loader 25 | README.md](https://github.com/Infineon/Firmware-loader/blob/master/README.md) 26 | 27 | - [Fw-loader Release Notes](https://github.com/Infineon/Firmware-loader/blob/master/RELEASE.MD) 28 | 29 | - [Kitprog3 User 30 | Guide](https://www.infineon.com/documentation/development-kitsboards/kitprog-user-guide) 31 | 32 | - [KitProg Host Protocol Interface](https://www.infineon.com/dgdl/Infineon-KitProg_Host_Protocol_Interface-UserManual-v01_00-EN.pdf?fileId=8ac78c8c7d0d8da4017d0f0125c8185e) 33 | 34 | - [ModusToolbox™ Software Environment, Quick Start Guide, Documentation, and 35 | Videos](https://www.infineon.com/modustoolbox) 36 | 37 | - [Cypress Semiconductor, an Infineon Technologies Company](http://www.infineon.com) 38 | 39 | © Cypress Semiconductor Corporation, 2019-2025. This document is the property of Cypress Semiconductor Corporation, an Infineon Technologies company, and its affiliates ("Cypress"). 40 | -------------------------------------------------------------------------------- /drivers/KitProg2/KitProg2UART.cat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Infineon/KitProg3/b81f81489ed6ac43451fac3c585e36b53ef6fe49/drivers/KitProg2/KitProg2UART.cat -------------------------------------------------------------------------------- /drivers/KitProg2/KitProg2UART.inf: -------------------------------------------------------------------------------- 1 | ; Windows USB CDC setup file for USBUART User Module 2 | ; (c) Copyright 2015-2017 Cypress Semiconductor Corporation 3 | 4 | [Version] 5 | Signature="$Windows NT$" 6 | Class=Ports 7 | ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318} 8 | Provider=%PROVIDER% 9 | CatalogFile=KitProg2Uart.cat 10 | ;;;LayoutFile=layout.inf 11 | DriverVer=09/11/2017,2.0.0000.2 12 | ;;;DriverPackageDisplayName=%DESCRIPTION% 13 | 14 | [Manufacturer] 15 | %MFGNAME%=DeviceList, NTx86, NTia64, NTamd64 16 | 17 | [DestinationDirs] 18 | DefaultDestDir=12 19 | 20 | [SourceDisksFiles] 21 | 22 | [SourceDisksNames] 23 | 24 | [DeviceList.NTx86] 25 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f147&MI_01 26 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f148&MI_01 27 | 28 | [DeviceList.NTia64] 29 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f147&MI_01 30 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f148&MI_01 31 | 32 | [DeviceList.NTamd64] 33 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f147&MI_01 34 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f148&MI_01 35 | 36 | [FakeModemCopyFileSection] 37 | 38 | ;------------------------------------------------------------------------------ 39 | ; 32 bit section for Windows 2000/2003/XP/Vista 40 | ;------------------------------------------------------------------------------ 41 | 42 | [DriverInstall.NTx86] 43 | include=mdmcpq.inf 44 | ;;;;CopyFiles=DriverCopyFiles 45 | CopyFiles=FakeModemCopyFileSection 46 | AddReg=DriverInstall.NTx86.AddReg 47 | 48 | ;;;;[DriverCopyFiles] 49 | ;;;;usbser.sys,,,0x20 50 | 51 | [DriverInstall.NTx86.AddReg] 52 | HKR,,DevLoader,,*ntkern 53 | HKR,,NTMPDriver,,usbser.sys 54 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 55 | 56 | [DriverInstall.NTx86.Services] 57 | AddService=usbser, 0x00000002, DriverService 58 | 59 | ;------------------------------------------------------------------------------ 60 | ; 64 bit section for Intel Itanium based systems 61 | ;------------------------------------------------------------------------------ 62 | 63 | [DriverInstall.NTia64] 64 | include=mdmcpq.inf 65 | ;;;;CopyFiles=DriverCopyFiles 66 | CopyFiles=FakeModemCopyFileSection 67 | AddReg=DriverInstall.NTia64.AddReg 68 | 69 | ;;;;[DriverCopyFiles] 70 | ;;;;usbser.sys,,,0x20 71 | 72 | [DriverInstall.NTia64.AddReg] 73 | HKR,,DevLoader,,*ntkern 74 | HKR,,NTMPDriver,,usbser.sys 75 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 76 | 77 | [DriverInstall.NTia64.Services] 78 | AddService=usbser, 0x00000002, DriverService 79 | 80 | ;------------------------------------------------------------------------------ 81 | ; 64 bit section for AMD64 and Intel EM64T based systems 82 | ;------------------------------------------------------------------------------ 83 | 84 | [DriverInstall.NTamd64] 85 | include=mdmcpq.inf 86 | ;;;;CopyFiles=DriverCopyFiles 87 | CopyFiles=FakeModemCopyFileSection 88 | AddReg=DriverInstall.NTamd64.AddReg 89 | 90 | ;;;;[DriverCopyFiles] 91 | ;;;;usbser.sys,,,0x20 92 | 93 | [DriverInstall.NTamd64.AddReg] 94 | HKR,,DevLoader,,*ntkern 95 | HKR,,NTMPDriver,,usbser.sys 96 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 97 | 98 | [DriverInstall.NTamd64.Services] 99 | AddService=usbser, 0x00000002, DriverService 100 | 101 | [FakeModemCopyFileSection] 102 | 103 | ;------------------------------------------------------------------------------ 104 | ; 105 | ;------------------------------------------------------------------------------ 106 | 107 | [DriverService] 108 | DisplayName=%SERVICE% 109 | ServiceType=1 110 | StartType=3 111 | ErrorControl=1 112 | ServiceBinary=%12%\usbser.sys 113 | 114 | ;------------------------------------------------------------------------------ 115 | ; String Definitions 116 | ;------------------------------------------------------------------------------ 117 | 118 | [Strings] 119 | PROVIDER="Cypress" 120 | MFGNAME="Cypress" 121 | DESCRIPTION="KitProg2 USB-UART" 122 | SERVICE="USB RS-232" 123 | -------------------------------------------------------------------------------- /drivers/KitProg3/KitProg3/Win7/KitProg3.inf: -------------------------------------------------------------------------------- 1 | ; WinUSB setup file for KitProg3 Bulk 2 | ; (c) Copyright 2018-2023 Cypress Semiconductor Corporation (an Infineon company) 3 | 4 | [Version] 5 | Signature = "$Windows NT$" 6 | Class=USBDevice 7 | ClassGUID={88BAE032-5A81-49f0-BC3D-A4FF138216D6} 8 | Provider=%ManufacturerName% 9 | CatalogFile=kitprog3.cat 10 | DriverVer=02/07/2023,2.0.0000.0 11 | 12 | ; ========== Manufacturer/Models sections =========== 13 | 14 | [Manufacturer] 15 | %ManufacturerName% = Standard,NTx86,NTia64,NTamd64 16 | 17 | [Standard.NTx86] 18 | %DeviceName% =USB_Install, USB\VID_04b4&PID_f155&MI_00 19 | %DeviceName% =USB_Install, USB\VID_04b4&PID_f166&MI_00 20 | %DeviceName% =USB_Install, USB\VID_04b4&PID_f169&MI_00 21 | %DeviceName% =USB_Install, USB\VID_04b4&PID_f16a&MI_00 22 | 23 | [Standard.NTia64] 24 | %DeviceName% =USB_Install, USB\VID_04b4&PID_f155&MI_00 25 | %DeviceName% =USB_Install, USB\VID_04b4&PID_f166&MI_00 26 | %DeviceName% =USB_Install, USB\VID_04b4&PID_f169&MI_00 27 | %DeviceName% =USB_Install, USB\VID_04b4&PID_f16a&MI_00 28 | 29 | [Standard.NTamd64] 30 | %DeviceName% =USB_Install, USB\VID_04b4&PID_f155&MI_00 31 | %DeviceName% =USB_Install, USB\VID_04b4&PID_f166&MI_00 32 | %DeviceName% =USB_Install, USB\VID_04b4&PID_f169&MI_00 33 | %DeviceName% =USB_Install, USB\VID_04b4&PID_f16a&MI_00 34 | 35 | ; ========== Class definition =========== 36 | 37 | [ClassInstall32] 38 | AddReg = ClassInstall_AddReg 39 | 40 | [ClassInstall_AddReg] 41 | HKR,,,,%ClassName% 42 | HKR,,NoInstallClass,,1 43 | HKR,,IconPath,%REG_MULTI_SZ%,"%%systemroot%%\system32\setupapi.dll,-20" 44 | HKR,,LowerLogoVersion,,5.2 45 | 46 | ; =================== Installation =================== 47 | 48 | [USB_Install] 49 | Include = winusb.inf 50 | Needs = WINUSB.NT 51 | 52 | [USB_Install.Services] 53 | Include =winusb.inf 54 | Needs = WINUSB.NT.Services 55 | 56 | [USB_Install.HW] 57 | AddReg=Dev_AddReg 58 | 59 | [USB_Install.Wdf] 60 | KmdfService=WINUSB, WinUsb_Install 61 | 62 | [WinUsb_Install] 63 | KmdfLibraryVersion=1.11 64 | 65 | [Dev_AddReg] 66 | HKR,,DeviceInterfaceGUIDs,0x10000,"{CDB3B5AD-293B-4663-AA36-1AAE46463776}" 67 | ; ========================== Strings Section ========================== 68 | 69 | [Strings] 70 | ManufacturerName="Cypress" 71 | ClassName="Universal Serial Bus devices" 72 | DeviceName="KitProg3 CMSIS-DAP" 73 | REG_MULTI_SZ = 0x00010000 74 | -------------------------------------------------------------------------------- /drivers/KitProg3/KitProg3/Win7/kitprog3.cat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Infineon/KitProg3/b81f81489ed6ac43451fac3c585e36b53ef6fe49/drivers/KitProg3/KitProg3/Win7/kitprog3.cat -------------------------------------------------------------------------------- /drivers/KitProg3/KitProg3UART/KitProg3UART.inf: -------------------------------------------------------------------------------- 1 | ; Windows USB CDC setup file for KitProg3 programmer 2 | ; (c) Copyright 2018-2023 Cypress Semiconductor Corporation (an Infineon company) 3 | 4 | [Version] 5 | Signature="$Windows NT$" 6 | Class=Ports 7 | ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318} 8 | Provider=%PROVIDER% 9 | CatalogFile=KitProg3Uart.cat 10 | ;;;LayoutFile=layout.inf 11 | DriverVer=02/07/2023,2.0.0000.0 12 | ;;;DriverPackageDisplayName=%DESCRIPTION% 13 | 14 | [Manufacturer] 15 | %MFGNAME%=DeviceList, NTx86, NTia64, NTamd64 16 | 17 | [DestinationDirs] 18 | DefaultDestDir=12 19 | 20 | [SourceDisksFiles] 21 | 22 | [SourceDisksNames] 23 | 24 | [DeviceList.NTx86] 25 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f154&MI_02 26 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f155&MI_02 27 | %DESCRIPTION_PRI%=DriverInstall, USB\VID_04b4&PID_f166&MI_01 28 | %DESCRIPTION_SEC%=DriverInstall, USB\VID_04b4&PID_f166&MI_03 29 | %DESCRIPTION_HCI%=DriverInstall, USB\VID_04b4&PID_f168&MI_02 30 | %DESCRIPTION_HCI%=DriverInstall, USB\VID_04b4&PID_f169&MI_02 31 | %DESCRIPTION_HCI%=DriverInstall, USB\VID_04b4&PID_f16a&MI_01 32 | %DESCRIPTION_PUART%=DriverInstall, USB\VID_04b4&PID_f16a&MI_03 33 | 34 | [DeviceList.NTia64] 35 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f154&MI_02 36 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f155&MI_02 37 | %DESCRIPTION_PRI%=DriverInstall, USB\VID_04b4&PID_f166&MI_01 38 | %DESCRIPTION_SEC%=DriverInstall, USB\VID_04b4&PID_f166&MI_03 39 | %DESCRIPTION_HCI%=DriverInstall, USB\VID_04b4&PID_f168&MI_02 40 | %DESCRIPTION_HCI%=DriverInstall, USB\VID_04b4&PID_f169&MI_02 41 | %DESCRIPTION_HCI%=DriverInstall, USB\VID_04b4&PID_f16a&MI_01 42 | %DESCRIPTION_PUART%=DriverInstall, USB\VID_04b4&PID_f16a&MI_03 43 | 44 | [DeviceList.NTamd64] 45 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f154&MI_02 46 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f155&MI_02 47 | %DESCRIPTION_PRI%=DriverInstall, USB\VID_04b4&PID_f166&MI_01 48 | %DESCRIPTION_SEC%=DriverInstall, USB\VID_04b4&PID_f166&MI_03 49 | %DESCRIPTION_HCI%=DriverInstall, USB\VID_04b4&PID_f168&MI_02 50 | %DESCRIPTION_HCI%=DriverInstall, USB\VID_04b4&PID_f169&MI_02 51 | %DESCRIPTION_HCI%=DriverInstall, USB\VID_04b4&PID_f16a&MI_01 52 | %DESCRIPTION_PUART%=DriverInstall, USB\VID_04b4&PID_f16a&MI_03 53 | 54 | [FakeModemCopyFileSection] 55 | 56 | ;------------------------------------------------------------------------------ 57 | ; 32 bit section for Windows 2000/2003/XP/Vista 58 | ;------------------------------------------------------------------------------ 59 | 60 | [DriverInstall.NTx86] 61 | include=mdmcpq.inf 62 | ;;;;CopyFiles=DriverCopyFiles 63 | CopyFiles=FakeModemCopyFileSection 64 | AddReg=DriverInstall.NTx86.AddReg 65 | 66 | ;;;;[DriverCopyFiles] 67 | ;;;;usbser.sys,,,0x20 68 | 69 | [DriverInstall.NTx86.AddReg] 70 | HKR,,DevLoader,,*ntkern 71 | HKR,,NTMPDriver,,usbser.sys 72 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 73 | 74 | [DriverInstall.NTx86.Services] 75 | AddService=usbser, 0x00000002, DriverService 76 | 77 | ;------------------------------------------------------------------------------ 78 | ; 64 bit section for Intel Itanium based systems 79 | ;------------------------------------------------------------------------------ 80 | 81 | [DriverInstall.NTia64] 82 | include=mdmcpq.inf 83 | ;;;;CopyFiles=DriverCopyFiles 84 | CopyFiles=FakeModemCopyFileSection 85 | AddReg=DriverInstall.NTia64.AddReg 86 | 87 | ;;;;[DriverCopyFiles] 88 | ;;;;usbser.sys,,,0x20 89 | 90 | [DriverInstall.NTia64.AddReg] 91 | HKR,,DevLoader,,*ntkern 92 | HKR,,NTMPDriver,,usbser.sys 93 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 94 | 95 | [DriverInstall.NTia64.Services] 96 | AddService=usbser, 0x00000002, DriverService 97 | 98 | ;------------------------------------------------------------------------------ 99 | ; 64 bit section for AMD64 and Intel EM64T based systems 100 | ;------------------------------------------------------------------------------ 101 | 102 | [DriverInstall.NTamd64] 103 | include=mdmcpq.inf 104 | ;;;;CopyFiles=DriverCopyFiles 105 | CopyFiles=FakeModemCopyFileSection 106 | AddReg=DriverInstall.NTamd64.AddReg 107 | 108 | ;;;;[DriverCopyFiles] 109 | ;;;;usbser.sys,,,0x20 110 | 111 | [DriverInstall.NTamd64.AddReg] 112 | HKR,,DevLoader,,*ntkern 113 | HKR,,NTMPDriver,,usbser.sys 114 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 115 | 116 | [DriverInstall.NTamd64.Services] 117 | AddService=usbser, 0x00000002, DriverService 118 | 119 | [DriverService] 120 | DisplayName=%SERVICE% 121 | ServiceType=1 122 | StartType=3 123 | ErrorControl=1 124 | ServiceBinary=%12%\usbser.sys 125 | 126 | ;------------------------------------------------------------------------------ 127 | ; String Definitions 128 | ;------------------------------------------------------------------------------ 129 | 130 | [Strings] 131 | PROVIDER="Cypress" 132 | MFGNAME="Cypress" 133 | DESCRIPTION="KitProg3 USB-UART" 134 | DESCRIPTION_PRI="KitProg3 Primary USB-UART" 135 | DESCRIPTION_SEC="KitProg3 Secondary USB-UART" 136 | DESCRIPTION_HCI="HCI UART" 137 | DESCRIPTION_PUART="Peripheral UART" 138 | SERVICE="USB RS-232" 139 | -------------------------------------------------------------------------------- /drivers/KitProg3/KitProg3UART/kitprog3uart.cat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Infineon/KitProg3/b81f81489ed6ac43451fac3c585e36b53ef6fe49/drivers/KitProg3/KitProg3UART/kitprog3uart.cat -------------------------------------------------------------------------------- /drivers/MiniProg4/MiniProg4/Win7/Win7x64/MiniProg4.inf: -------------------------------------------------------------------------------- 1 | ; (c) Copyright 2018 Cypress Semiconductor Corporation 2 | 3 | [Version] 4 | Signature = "$Windows NT$" 5 | Class=USBDevice 6 | ClassGUID={88BAE032-5A81-49f0-BC3D-A4FF138216D6} 7 | Provider=%ManufacturerName% 8 | CatalogFile=miniprog4.cat 9 | DriverVer=07/25/2018,1.1 10 | 11 | ; ========== Manufacturer/Models sections =========== 12 | 13 | [Manufacturer] 14 | %ManufacturerName% = Standard,NTx86,NTia64,NTamd64 15 | 16 | [Standard.NTx86] 17 | %DeviceName% =USB_Install, USB\VID_04b4&PID_f151&MI_00 18 | 19 | [Standard.NTia64] 20 | %DeviceName% =USB_Install, USB\VID_04b4&PID_f151&MI_00 21 | 22 | [Standard.NTamd64] 23 | %DeviceName% =USB_Install, USB\VID_04b4&PID_f151&MI_00 24 | 25 | ; ========== Class definition =========== 26 | 27 | [ClassInstall32] 28 | AddReg = ClassInstall_AddReg 29 | 30 | [ClassInstall_AddReg] 31 | HKR,,,,%ClassName% 32 | HKR,,NoInstallClass,,1 33 | HKR,,IconPath,%REG_MULTI_SZ%,"%%systemroot%%\system32\setupapi.dll,-20" 34 | HKR,,LowerLogoVersion,,5.2 35 | 36 | ; =================== Installation =================== 37 | 38 | [USB_Install] 39 | Include = winusb.inf 40 | Needs = WINUSB.NT 41 | 42 | [USB_Install.Services] 43 | Include =winusb.inf 44 | Needs = WINUSB.NT.Services 45 | 46 | [USB_Install.HW] 47 | AddReg=Dev_AddReg 48 | 49 | [USB_Install.Wdf] 50 | KmdfService=WINUSB, WinUsb_Install 51 | 52 | [WinUsb_Install] 53 | KmdfLibraryVersion=1.11 54 | 55 | [Dev_AddReg] 56 | HKR,,DeviceInterfaceGUIDs,0x10000,"{CDB3B5AD-293B-4663-AA36-1AAE46463776}" 57 | ; ========================== Strings Section ========================== 58 | 59 | [Strings] 60 | ManufacturerName="Cypress" 61 | ClassName="Universal Serial Bus devices" 62 | DeviceName="MiniProg4" 63 | REG_MULTI_SZ = 0x00010000 64 | -------------------------------------------------------------------------------- /drivers/MiniProg4/MiniProg4/Win7/Win7x64/miniprog4.cat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Infineon/KitProg3/b81f81489ed6ac43451fac3c585e36b53ef6fe49/drivers/MiniProg4/MiniProg4/Win7/Win7x64/miniprog4.cat -------------------------------------------------------------------------------- /drivers/MiniProg4/MiniProg4/Win7/Win7x86/MiniProg4.inf: -------------------------------------------------------------------------------- 1 | ; (c) Copyright 2018 Cypress Semiconductor Corporation 2 | 3 | [Version] 4 | Signature = "$Windows NT$" 5 | Class=USBDevice 6 | ClassGUID={88BAE032-5A81-49f0-BC3D-A4FF138216D6} 7 | Provider=%ManufacturerName% 8 | CatalogFile=miniprog4.cat 9 | DriverVer=07/25/2018,1.1 10 | 11 | ; ========== Manufacturer/Models sections =========== 12 | 13 | [Manufacturer] 14 | %ManufacturerName% = Standard,NTx86,NTia64,NTamd64 15 | 16 | [Standard.NTx86] 17 | %DeviceName% =USB_Install, USB\VID_04b4&PID_f151&MI_00 18 | 19 | [Standard.NTia64] 20 | %DeviceName% =USB_Install, USB\VID_04b4&PID_f151&MI_00 21 | 22 | [Standard.NTamd64] 23 | %DeviceName% =USB_Install, USB\VID_04b4&PID_f151&MI_00 24 | 25 | ; ========== Class definition =========== 26 | 27 | [ClassInstall32] 28 | AddReg = ClassInstall_AddReg 29 | 30 | [ClassInstall_AddReg] 31 | HKR,,,,%ClassName% 32 | HKR,,NoInstallClass,,1 33 | HKR,,IconPath,%REG_MULTI_SZ%,"%%systemroot%%\system32\setupapi.dll,-20" 34 | HKR,,LowerLogoVersion,,5.2 35 | 36 | ; =================== Installation =================== 37 | 38 | [USB_Install] 39 | Include = winusb.inf 40 | Needs = WINUSB.NT 41 | 42 | [USB_Install.Services] 43 | Include =winusb.inf 44 | Needs = WINUSB.NT.Services 45 | 46 | [USB_Install.HW] 47 | AddReg=Dev_AddReg 48 | 49 | [USB_Install.Wdf] 50 | KmdfService=WINUSB, WinUsb_Install 51 | 52 | [WinUsb_Install] 53 | KmdfLibraryVersion=1.11 54 | 55 | [Dev_AddReg] 56 | HKR,,DeviceInterfaceGUIDs,0x10000,"{CDB3B5AD-293B-4663-AA36-1AAE46463776}" 57 | ; ========================== Strings Section ========================== 58 | 59 | [Strings] 60 | ManufacturerName="Cypress" 61 | ClassName="Universal Serial Bus devices" 62 | DeviceName="MiniProg4" 63 | REG_MULTI_SZ = 0x00010000 64 | -------------------------------------------------------------------------------- /drivers/MiniProg4/MiniProg4/Win7/Win7x86/miniprog4.cat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Infineon/KitProg3/b81f81489ed6ac43451fac3c585e36b53ef6fe49/drivers/MiniProg4/MiniProg4/Win7/Win7x86/miniprog4.cat -------------------------------------------------------------------------------- /drivers/MiniProg4/MiniProg4UART/Win10/Win10x64/MiniProg4UART.inf: -------------------------------------------------------------------------------- 1 | ; Windows USB CDC setup file for MiniProg4 programmer 2 | ; (c) Copyright 2018 Cypress Semiconductor Corporation 3 | 4 | [Version] 5 | Signature="$Windows NT$" 6 | Class=Ports 7 | ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318} 8 | Provider=%PROVIDER% 9 | CatalogFile=MiniProg4UART.cat 10 | ;;;LayoutFile=layout.inf 11 | DriverVer=06/12/2018,2.0.0000.4 12 | ;;;DriverPackageDisplayName=%DESCRIPTION% 13 | 14 | [Manufacturer] 15 | %MFGNAME%=DeviceList, NTx86, NTia64, NTamd64 16 | 17 | [DestinationDirs] 18 | DefaultDestDir=12 19 | 20 | [SourceDisksFiles] 21 | 22 | [SourceDisksNames] 23 | 24 | [DeviceList.NTx86] 25 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f151&MI_02 26 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f152&MI_02 27 | 28 | [DeviceList.NTia64] 29 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f151&MI_02 30 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f152&MI_02 31 | 32 | [DeviceList.NTamd64] 33 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f151&MI_02 34 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f152&MI_02 35 | 36 | [FakeModemCopyFileSection] 37 | 38 | ;------------------------------------------------------------------------------ 39 | ; 32 bit section for Windows 2000/2003/XP/Vista 40 | ;------------------------------------------------------------------------------ 41 | 42 | [DriverInstall.NTx86] 43 | include=mdmcpq.inf 44 | ;;;;CopyFiles=DriverCopyFiles 45 | CopyFiles=FakeModemCopyFileSection 46 | AddReg=DriverInstall.NTx86.AddReg 47 | 48 | ;;;;[DriverCopyFiles] 49 | ;;;;usbser.sys,,,0x20 50 | 51 | [DriverInstall.NTx86.AddReg] 52 | HKR,,DevLoader,,*ntkern 53 | HKR,,NTMPDriver,,usbser.sys 54 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 55 | 56 | [DriverInstall.NTx86.Services] 57 | AddService=usbser, 0x00000002, DriverService 58 | 59 | ;------------------------------------------------------------------------------ 60 | ; 64 bit section for Intel Itanium based systems 61 | ;------------------------------------------------------------------------------ 62 | 63 | [DriverInstall.NTia64] 64 | include=mdmcpq.inf 65 | ;;;;CopyFiles=DriverCopyFiles 66 | CopyFiles=FakeModemCopyFileSection 67 | AddReg=DriverInstall.NTia64.AddReg 68 | 69 | ;;;;[DriverCopyFiles] 70 | ;;;;usbser.sys,,,0x20 71 | 72 | [DriverInstall.NTia64.AddReg] 73 | HKR,,DevLoader,,*ntkern 74 | HKR,,NTMPDriver,,usbser.sys 75 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 76 | 77 | [DriverInstall.NTia64.Services] 78 | AddService=usbser, 0x00000002, DriverService 79 | 80 | ;------------------------------------------------------------------------------ 81 | ; 64 bit section for AMD64 and Intel EM64T based systems 82 | ;------------------------------------------------------------------------------ 83 | 84 | [DriverInstall.NTamd64] 85 | include=mdmcpq.inf 86 | ;;;;CopyFiles=DriverCopyFiles 87 | CopyFiles=FakeModemCopyFileSection 88 | AddReg=DriverInstall.NTamd64.AddReg 89 | 90 | ;;;;[DriverCopyFiles] 91 | ;;;;usbser.sys,,,0x20 92 | 93 | [DriverInstall.NTamd64.AddReg] 94 | HKR,,DevLoader,,*ntkern 95 | HKR,,NTMPDriver,,usbser.sys 96 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 97 | 98 | [DriverInstall.NTamd64.Services] 99 | AddService=usbser, 0x00000002, DriverService 100 | 101 | [DriverService] 102 | DisplayName=%SERVICE% 103 | ServiceType=1 104 | StartType=3 105 | ErrorControl=1 106 | ServiceBinary=%12%\usbser.sys 107 | 108 | ;------------------------------------------------------------------------------ 109 | ; String Definitions 110 | ;------------------------------------------------------------------------------ 111 | 112 | [Strings] 113 | PROVIDER="Cypress" 114 | MFGNAME="Cypress" 115 | DESCRIPTION="MiniProg4 USB-UART" 116 | SERVICE="USB RS-232" 117 | -------------------------------------------------------------------------------- /drivers/MiniProg4/MiniProg4UART/Win10/Win10x64/miniprog4uart.cat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Infineon/KitProg3/b81f81489ed6ac43451fac3c585e36b53ef6fe49/drivers/MiniProg4/MiniProg4UART/Win10/Win10x64/miniprog4uart.cat -------------------------------------------------------------------------------- /drivers/MiniProg4/MiniProg4UART/Win10/Win10x86/MiniProg4UART.inf: -------------------------------------------------------------------------------- 1 | ; Windows USB CDC setup file for MiniProg4 programmer 2 | ; (c) Copyright 2018 Cypress Semiconductor Corporation 3 | 4 | [Version] 5 | Signature="$Windows NT$" 6 | Class=Ports 7 | ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318} 8 | Provider=%PROVIDER% 9 | CatalogFile=MiniProg4UART.cat 10 | ;;;LayoutFile=layout.inf 11 | DriverVer=06/12/2018,2.0.0000.4 12 | ;;;DriverPackageDisplayName=%DESCRIPTION% 13 | 14 | [Manufacturer] 15 | %MFGNAME%=DeviceList, NTx86, NTia64, NTamd64 16 | 17 | [DestinationDirs] 18 | DefaultDestDir=12 19 | 20 | [SourceDisksFiles] 21 | 22 | [SourceDisksNames] 23 | 24 | [DeviceList.NTx86] 25 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f151&MI_02 26 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f152&MI_02 27 | 28 | [DeviceList.NTia64] 29 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f151&MI_02 30 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f152&MI_02 31 | 32 | [DeviceList.NTamd64] 33 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f151&MI_02 34 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f152&MI_02 35 | 36 | [FakeModemCopyFileSection] 37 | 38 | ;------------------------------------------------------------------------------ 39 | ; 32 bit section for Windows 2000/2003/XP/Vista 40 | ;------------------------------------------------------------------------------ 41 | 42 | [DriverInstall.NTx86] 43 | include=mdmcpq.inf 44 | ;;;;CopyFiles=DriverCopyFiles 45 | CopyFiles=FakeModemCopyFileSection 46 | AddReg=DriverInstall.NTx86.AddReg 47 | 48 | ;;;;[DriverCopyFiles] 49 | ;;;;usbser.sys,,,0x20 50 | 51 | [DriverInstall.NTx86.AddReg] 52 | HKR,,DevLoader,,*ntkern 53 | HKR,,NTMPDriver,,usbser.sys 54 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 55 | 56 | [DriverInstall.NTx86.Services] 57 | AddService=usbser, 0x00000002, DriverService 58 | 59 | ;------------------------------------------------------------------------------ 60 | ; 64 bit section for Intel Itanium based systems 61 | ;------------------------------------------------------------------------------ 62 | 63 | [DriverInstall.NTia64] 64 | include=mdmcpq.inf 65 | ;;;;CopyFiles=DriverCopyFiles 66 | CopyFiles=FakeModemCopyFileSection 67 | AddReg=DriverInstall.NTia64.AddReg 68 | 69 | ;;;;[DriverCopyFiles] 70 | ;;;;usbser.sys,,,0x20 71 | 72 | [DriverInstall.NTia64.AddReg] 73 | HKR,,DevLoader,,*ntkern 74 | HKR,,NTMPDriver,,usbser.sys 75 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 76 | 77 | [DriverInstall.NTia64.Services] 78 | AddService=usbser, 0x00000002, DriverService 79 | 80 | ;------------------------------------------------------------------------------ 81 | ; 64 bit section for AMD64 and Intel EM64T based systems 82 | ;------------------------------------------------------------------------------ 83 | 84 | [DriverInstall.NTamd64] 85 | include=mdmcpq.inf 86 | ;;;;CopyFiles=DriverCopyFiles 87 | CopyFiles=FakeModemCopyFileSection 88 | AddReg=DriverInstall.NTamd64.AddReg 89 | 90 | ;;;;[DriverCopyFiles] 91 | ;;;;usbser.sys,,,0x20 92 | 93 | [DriverInstall.NTamd64.AddReg] 94 | HKR,,DevLoader,,*ntkern 95 | HKR,,NTMPDriver,,usbser.sys 96 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 97 | 98 | [DriverInstall.NTamd64.Services] 99 | AddService=usbser, 0x00000002, DriverService 100 | 101 | [DriverService] 102 | DisplayName=%SERVICE% 103 | ServiceType=1 104 | StartType=3 105 | ErrorControl=1 106 | ServiceBinary=%12%\usbser.sys 107 | 108 | ;------------------------------------------------------------------------------ 109 | ; String Definitions 110 | ;------------------------------------------------------------------------------ 111 | 112 | [Strings] 113 | PROVIDER="Cypress" 114 | MFGNAME="Cypress" 115 | DESCRIPTION="MiniProg4 USB-UART" 116 | SERVICE="USB RS-232" 117 | -------------------------------------------------------------------------------- /drivers/MiniProg4/MiniProg4UART/Win10/Win10x86/miniprog4uart.cat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Infineon/KitProg3/b81f81489ed6ac43451fac3c585e36b53ef6fe49/drivers/MiniProg4/MiniProg4UART/Win10/Win10x86/miniprog4uart.cat -------------------------------------------------------------------------------- /drivers/MiniProg4/MiniProg4UART/Win7/Win7x64/MiniProg4UART.inf: -------------------------------------------------------------------------------- 1 | ; Windows USB CDC setup file for MiniProg4 programmer 2 | ; (c) Copyright 2018 Cypress Semiconductor Corporation 3 | 4 | [Version] 5 | Signature="$Windows NT$" 6 | Class=Ports 7 | ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318} 8 | Provider=%PROVIDER% 9 | CatalogFile=MiniProg4UART.cat 10 | ;;;LayoutFile=layout.inf 11 | DriverVer=06/12/2018,2.0.0000.4 12 | ;;;DriverPackageDisplayName=%DESCRIPTION% 13 | 14 | [Manufacturer] 15 | %MFGNAME%=DeviceList, NTx86, NTia64, NTamd64 16 | 17 | [DestinationDirs] 18 | DefaultDestDir=12 19 | 20 | [SourceDisksFiles] 21 | 22 | [SourceDisksNames] 23 | 24 | [DeviceList.NTx86] 25 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f151&MI_02 26 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f152&MI_02 27 | 28 | [DeviceList.NTia64] 29 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f151&MI_02 30 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f152&MI_02 31 | 32 | [DeviceList.NTamd64] 33 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f151&MI_02 34 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f152&MI_02 35 | 36 | [FakeModemCopyFileSection] 37 | 38 | ;------------------------------------------------------------------------------ 39 | ; 32 bit section for Windows 2000/2003/XP/Vista 40 | ;------------------------------------------------------------------------------ 41 | 42 | [DriverInstall.NTx86] 43 | include=mdmcpq.inf 44 | ;;;;CopyFiles=DriverCopyFiles 45 | CopyFiles=FakeModemCopyFileSection 46 | AddReg=DriverInstall.NTx86.AddReg 47 | 48 | ;;;;[DriverCopyFiles] 49 | ;;;;usbser.sys,,,0x20 50 | 51 | [DriverInstall.NTx86.AddReg] 52 | HKR,,DevLoader,,*ntkern 53 | HKR,,NTMPDriver,,usbser.sys 54 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 55 | 56 | [DriverInstall.NTx86.Services] 57 | AddService=usbser, 0x00000002, DriverService 58 | 59 | ;------------------------------------------------------------------------------ 60 | ; 64 bit section for Intel Itanium based systems 61 | ;------------------------------------------------------------------------------ 62 | 63 | [DriverInstall.NTia64] 64 | include=mdmcpq.inf 65 | ;;;;CopyFiles=DriverCopyFiles 66 | CopyFiles=FakeModemCopyFileSection 67 | AddReg=DriverInstall.NTia64.AddReg 68 | 69 | ;;;;[DriverCopyFiles] 70 | ;;;;usbser.sys,,,0x20 71 | 72 | [DriverInstall.NTia64.AddReg] 73 | HKR,,DevLoader,,*ntkern 74 | HKR,,NTMPDriver,,usbser.sys 75 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 76 | 77 | [DriverInstall.NTia64.Services] 78 | AddService=usbser, 0x00000002, DriverService 79 | 80 | ;------------------------------------------------------------------------------ 81 | ; 64 bit section for AMD64 and Intel EM64T based systems 82 | ;------------------------------------------------------------------------------ 83 | 84 | [DriverInstall.NTamd64] 85 | include=mdmcpq.inf 86 | ;;;;CopyFiles=DriverCopyFiles 87 | CopyFiles=FakeModemCopyFileSection 88 | AddReg=DriverInstall.NTamd64.AddReg 89 | 90 | ;;;;[DriverCopyFiles] 91 | ;;;;usbser.sys,,,0x20 92 | 93 | [DriverInstall.NTamd64.AddReg] 94 | HKR,,DevLoader,,*ntkern 95 | HKR,,NTMPDriver,,usbser.sys 96 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 97 | 98 | [DriverInstall.NTamd64.Services] 99 | AddService=usbser, 0x00000002, DriverService 100 | 101 | [DriverService] 102 | DisplayName=%SERVICE% 103 | ServiceType=1 104 | StartType=3 105 | ErrorControl=1 106 | ServiceBinary=%12%\usbser.sys 107 | 108 | ;------------------------------------------------------------------------------ 109 | ; String Definitions 110 | ;------------------------------------------------------------------------------ 111 | 112 | [Strings] 113 | PROVIDER="Cypress" 114 | MFGNAME="Cypress" 115 | DESCRIPTION="MiniProg4 USB-UART" 116 | SERVICE="USB RS-232" 117 | -------------------------------------------------------------------------------- /drivers/MiniProg4/MiniProg4UART/Win7/Win7x64/miniprog4uart.cat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Infineon/KitProg3/b81f81489ed6ac43451fac3c585e36b53ef6fe49/drivers/MiniProg4/MiniProg4UART/Win7/Win7x64/miniprog4uart.cat -------------------------------------------------------------------------------- /drivers/MiniProg4/MiniProg4UART/Win7/Win7x86/MiniProg4UART.inf: -------------------------------------------------------------------------------- 1 | ; Windows USB CDC setup file for MiniProg4 programmer 2 | ; (c) Copyright 2018 Cypress Semiconductor Corporation 3 | 4 | [Version] 5 | Signature="$Windows NT$" 6 | Class=Ports 7 | ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318} 8 | Provider=%PROVIDER% 9 | CatalogFile=MiniProg4UART.cat 10 | ;;;LayoutFile=layout.inf 11 | DriverVer=06/12/2018,2.0.0000.4 12 | ;;;DriverPackageDisplayName=%DESCRIPTION% 13 | 14 | [Manufacturer] 15 | %MFGNAME%=DeviceList, NTx86, NTia64, NTamd64 16 | 17 | [DestinationDirs] 18 | DefaultDestDir=12 19 | 20 | [SourceDisksFiles] 21 | 22 | [SourceDisksNames] 23 | 24 | [DeviceList.NTx86] 25 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f151&MI_02 26 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f152&MI_02 27 | 28 | [DeviceList.NTia64] 29 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f151&MI_02 30 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f152&MI_02 31 | 32 | [DeviceList.NTamd64] 33 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f151&MI_02 34 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f152&MI_02 35 | 36 | [FakeModemCopyFileSection] 37 | 38 | ;------------------------------------------------------------------------------ 39 | ; 32 bit section for Windows 2000/2003/XP/Vista 40 | ;------------------------------------------------------------------------------ 41 | 42 | [DriverInstall.NTx86] 43 | include=mdmcpq.inf 44 | ;;;;CopyFiles=DriverCopyFiles 45 | CopyFiles=FakeModemCopyFileSection 46 | AddReg=DriverInstall.NTx86.AddReg 47 | 48 | ;;;;[DriverCopyFiles] 49 | ;;;;usbser.sys,,,0x20 50 | 51 | [DriverInstall.NTx86.AddReg] 52 | HKR,,DevLoader,,*ntkern 53 | HKR,,NTMPDriver,,usbser.sys 54 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 55 | 56 | [DriverInstall.NTx86.Services] 57 | AddService=usbser, 0x00000002, DriverService 58 | 59 | ;------------------------------------------------------------------------------ 60 | ; 64 bit section for Intel Itanium based systems 61 | ;------------------------------------------------------------------------------ 62 | 63 | [DriverInstall.NTia64] 64 | include=mdmcpq.inf 65 | ;;;;CopyFiles=DriverCopyFiles 66 | CopyFiles=FakeModemCopyFileSection 67 | AddReg=DriverInstall.NTia64.AddReg 68 | 69 | ;;;;[DriverCopyFiles] 70 | ;;;;usbser.sys,,,0x20 71 | 72 | [DriverInstall.NTia64.AddReg] 73 | HKR,,DevLoader,,*ntkern 74 | HKR,,NTMPDriver,,usbser.sys 75 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 76 | 77 | [DriverInstall.NTia64.Services] 78 | AddService=usbser, 0x00000002, DriverService 79 | 80 | ;------------------------------------------------------------------------------ 81 | ; 64 bit section for AMD64 and Intel EM64T based systems 82 | ;------------------------------------------------------------------------------ 83 | 84 | [DriverInstall.NTamd64] 85 | include=mdmcpq.inf 86 | ;;;;CopyFiles=DriverCopyFiles 87 | CopyFiles=FakeModemCopyFileSection 88 | AddReg=DriverInstall.NTamd64.AddReg 89 | 90 | ;;;;[DriverCopyFiles] 91 | ;;;;usbser.sys,,,0x20 92 | 93 | [DriverInstall.NTamd64.AddReg] 94 | HKR,,DevLoader,,*ntkern 95 | HKR,,NTMPDriver,,usbser.sys 96 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 97 | 98 | [DriverInstall.NTamd64.Services] 99 | AddService=usbser, 0x00000002, DriverService 100 | 101 | [DriverService] 102 | DisplayName=%SERVICE% 103 | ServiceType=1 104 | StartType=3 105 | ErrorControl=1 106 | ServiceBinary=%12%\usbser.sys 107 | 108 | ;------------------------------------------------------------------------------ 109 | ; String Definitions 110 | ;------------------------------------------------------------------------------ 111 | 112 | [Strings] 113 | PROVIDER="Cypress" 114 | MFGNAME="Cypress" 115 | DESCRIPTION="MiniProg4 USB-UART" 116 | SERVICE="USB RS-232" 117 | -------------------------------------------------------------------------------- /drivers/MiniProg4/MiniProg4UART/Win7/Win7x86/miniprog4uart.cat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Infineon/KitProg3/b81f81489ed6ac43451fac3c585e36b53ef6fe49/drivers/MiniProg4/MiniProg4UART/Win7/Win7x86/miniprog4uart.cat -------------------------------------------------------------------------------- /drivers/MiniProg4/MiniProg4UART/Win8.1/Win8.1x64/MiniProg4UART.inf: -------------------------------------------------------------------------------- 1 | ; Windows USB CDC setup file for MiniProg4 programmer 2 | ; (c) Copyright 2018 Cypress Semiconductor Corporation 3 | 4 | [Version] 5 | Signature="$Windows NT$" 6 | Class=Ports 7 | ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318} 8 | Provider=%PROVIDER% 9 | CatalogFile=MiniProg4UART.cat 10 | ;;;LayoutFile=layout.inf 11 | DriverVer=06/12/2018,2.0.0000.4 12 | ;;;DriverPackageDisplayName=%DESCRIPTION% 13 | 14 | [Manufacturer] 15 | %MFGNAME%=DeviceList, NTx86, NTia64, NTamd64 16 | 17 | [DestinationDirs] 18 | DefaultDestDir=12 19 | 20 | [SourceDisksFiles] 21 | 22 | [SourceDisksNames] 23 | 24 | [DeviceList.NTx86] 25 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f151&MI_02 26 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f152&MI_02 27 | 28 | [DeviceList.NTia64] 29 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f151&MI_02 30 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f152&MI_02 31 | 32 | [DeviceList.NTamd64] 33 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f151&MI_02 34 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f152&MI_02 35 | 36 | [FakeModemCopyFileSection] 37 | 38 | ;------------------------------------------------------------------------------ 39 | ; 32 bit section for Windows 2000/2003/XP/Vista 40 | ;------------------------------------------------------------------------------ 41 | 42 | [DriverInstall.NTx86] 43 | include=mdmcpq.inf 44 | ;;;;CopyFiles=DriverCopyFiles 45 | CopyFiles=FakeModemCopyFileSection 46 | AddReg=DriverInstall.NTx86.AddReg 47 | 48 | ;;;;[DriverCopyFiles] 49 | ;;;;usbser.sys,,,0x20 50 | 51 | [DriverInstall.NTx86.AddReg] 52 | HKR,,DevLoader,,*ntkern 53 | HKR,,NTMPDriver,,usbser.sys 54 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 55 | 56 | [DriverInstall.NTx86.Services] 57 | AddService=usbser, 0x00000002, DriverService 58 | 59 | ;------------------------------------------------------------------------------ 60 | ; 64 bit section for Intel Itanium based systems 61 | ;------------------------------------------------------------------------------ 62 | 63 | [DriverInstall.NTia64] 64 | include=mdmcpq.inf 65 | ;;;;CopyFiles=DriverCopyFiles 66 | CopyFiles=FakeModemCopyFileSection 67 | AddReg=DriverInstall.NTia64.AddReg 68 | 69 | ;;;;[DriverCopyFiles] 70 | ;;;;usbser.sys,,,0x20 71 | 72 | [DriverInstall.NTia64.AddReg] 73 | HKR,,DevLoader,,*ntkern 74 | HKR,,NTMPDriver,,usbser.sys 75 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 76 | 77 | [DriverInstall.NTia64.Services] 78 | AddService=usbser, 0x00000002, DriverService 79 | 80 | ;------------------------------------------------------------------------------ 81 | ; 64 bit section for AMD64 and Intel EM64T based systems 82 | ;------------------------------------------------------------------------------ 83 | 84 | [DriverInstall.NTamd64] 85 | include=mdmcpq.inf 86 | ;;;;CopyFiles=DriverCopyFiles 87 | CopyFiles=FakeModemCopyFileSection 88 | AddReg=DriverInstall.NTamd64.AddReg 89 | 90 | ;;;;[DriverCopyFiles] 91 | ;;;;usbser.sys,,,0x20 92 | 93 | [DriverInstall.NTamd64.AddReg] 94 | HKR,,DevLoader,,*ntkern 95 | HKR,,NTMPDriver,,usbser.sys 96 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 97 | 98 | [DriverInstall.NTamd64.Services] 99 | AddService=usbser, 0x00000002, DriverService 100 | 101 | [DriverService] 102 | DisplayName=%SERVICE% 103 | ServiceType=1 104 | StartType=3 105 | ErrorControl=1 106 | ServiceBinary=%12%\usbser.sys 107 | 108 | ;------------------------------------------------------------------------------ 109 | ; String Definitions 110 | ;------------------------------------------------------------------------------ 111 | 112 | [Strings] 113 | PROVIDER="Cypress" 114 | MFGNAME="Cypress" 115 | DESCRIPTION="MiniProg4 USB-UART" 116 | SERVICE="USB RS-232" 117 | -------------------------------------------------------------------------------- /drivers/MiniProg4/MiniProg4UART/Win8.1/Win8.1x64/miniprog4uart.cat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Infineon/KitProg3/b81f81489ed6ac43451fac3c585e36b53ef6fe49/drivers/MiniProg4/MiniProg4UART/Win8.1/Win8.1x64/miniprog4uart.cat -------------------------------------------------------------------------------- /drivers/MiniProg4/MiniProg4UART/Win8.1/Win8.1x86/MiniProg4UART.inf: -------------------------------------------------------------------------------- 1 | ; Windows USB CDC setup file for MiniProg4 programmer 2 | ; (c) Copyright 2018 Cypress Semiconductor Corporation 3 | 4 | [Version] 5 | Signature="$Windows NT$" 6 | Class=Ports 7 | ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318} 8 | Provider=%PROVIDER% 9 | CatalogFile=MiniProg4UART.cat 10 | ;;;LayoutFile=layout.inf 11 | DriverVer=06/12/2018,2.0.0000.4 12 | ;;;DriverPackageDisplayName=%DESCRIPTION% 13 | 14 | [Manufacturer] 15 | %MFGNAME%=DeviceList, NTx86, NTia64, NTamd64 16 | 17 | [DestinationDirs] 18 | DefaultDestDir=12 19 | 20 | [SourceDisksFiles] 21 | 22 | [SourceDisksNames] 23 | 24 | [DeviceList.NTx86] 25 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f151&MI_02 26 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f152&MI_02 27 | 28 | [DeviceList.NTia64] 29 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f151&MI_02 30 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f152&MI_02 31 | 32 | [DeviceList.NTamd64] 33 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f151&MI_02 34 | %DESCRIPTION%=DriverInstall, USB\VID_04b4&PID_f152&MI_02 35 | 36 | [FakeModemCopyFileSection] 37 | 38 | ;------------------------------------------------------------------------------ 39 | ; 32 bit section for Windows 2000/2003/XP/Vista 40 | ;------------------------------------------------------------------------------ 41 | 42 | [DriverInstall.NTx86] 43 | include=mdmcpq.inf 44 | ;;;;CopyFiles=DriverCopyFiles 45 | CopyFiles=FakeModemCopyFileSection 46 | AddReg=DriverInstall.NTx86.AddReg 47 | 48 | ;;;;[DriverCopyFiles] 49 | ;;;;usbser.sys,,,0x20 50 | 51 | [DriverInstall.NTx86.AddReg] 52 | HKR,,DevLoader,,*ntkern 53 | HKR,,NTMPDriver,,usbser.sys 54 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 55 | 56 | [DriverInstall.NTx86.Services] 57 | AddService=usbser, 0x00000002, DriverService 58 | 59 | ;------------------------------------------------------------------------------ 60 | ; 64 bit section for Intel Itanium based systems 61 | ;------------------------------------------------------------------------------ 62 | 63 | [DriverInstall.NTia64] 64 | include=mdmcpq.inf 65 | ;;;;CopyFiles=DriverCopyFiles 66 | CopyFiles=FakeModemCopyFileSection 67 | AddReg=DriverInstall.NTia64.AddReg 68 | 69 | ;;;;[DriverCopyFiles] 70 | ;;;;usbser.sys,,,0x20 71 | 72 | [DriverInstall.NTia64.AddReg] 73 | HKR,,DevLoader,,*ntkern 74 | HKR,,NTMPDriver,,usbser.sys 75 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 76 | 77 | [DriverInstall.NTia64.Services] 78 | AddService=usbser, 0x00000002, DriverService 79 | 80 | ;------------------------------------------------------------------------------ 81 | ; 64 bit section for AMD64 and Intel EM64T based systems 82 | ;------------------------------------------------------------------------------ 83 | 84 | [DriverInstall.NTamd64] 85 | include=mdmcpq.inf 86 | ;;;;CopyFiles=DriverCopyFiles 87 | CopyFiles=FakeModemCopyFileSection 88 | AddReg=DriverInstall.NTamd64.AddReg 89 | 90 | ;;;;[DriverCopyFiles] 91 | ;;;;usbser.sys,,,0x20 92 | 93 | [DriverInstall.NTamd64.AddReg] 94 | HKR,,DevLoader,,*ntkern 95 | HKR,,NTMPDriver,,usbser.sys 96 | HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" 97 | 98 | [DriverInstall.NTamd64.Services] 99 | AddService=usbser, 0x00000002, DriverService 100 | 101 | [DriverService] 102 | DisplayName=%SERVICE% 103 | ServiceType=1 104 | StartType=3 105 | ErrorControl=1 106 | ServiceBinary=%12%\usbser.sys 107 | 108 | ;------------------------------------------------------------------------------ 109 | ; String Definitions 110 | ;------------------------------------------------------------------------------ 111 | 112 | [Strings] 113 | PROVIDER="Cypress" 114 | MFGNAME="Cypress" 115 | DESCRIPTION="MiniProg4 USB-UART" 116 | SERVICE="USB RS-232" 117 | -------------------------------------------------------------------------------- /drivers/MiniProg4/MiniProg4UART/Win8.1/Win8.1x86/miniprog4uart.cat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Infineon/KitProg3/b81f81489ed6ac43451fac3c585e36b53ef6fe49/drivers/MiniProg4/MiniProg4UART/Win8.1/Win8.1x86/miniprog4uart.cat -------------------------------------------------------------------------------- /third_party_licenses/kitprog3/NOTICE.txt: -------------------------------------------------------------------------------- 1 | FOR KITPROG3 FIRMWARE ONLY 2 | 3 | Portions Copyright 2018-2023, Cypress Semiconductor Corporation (an Infineon company) 4 | or an affiliate of Cypress Semiconductor Corporation. All rights 5 | reserved. 6 | 7 | This software, associated documentation and materials (“Software”) is 8 | owned by Cypress Semiconductor Corporation or one of its 9 | affiliates (“Cypress”) and is protected by and subject to worldwide 10 | patent protection (United States and foreign), United States copyright 11 | laws and international treaty provisions. Therefore, you may use this 12 | Software only as provided in the license agreement accompanying the 13 | software package from which you obtained this Software (“EULA”). If 14 | no EULA applies, then any reproduction, modification, translation, 15 | compilation, or representation of this Software is prohibited without the 16 | express written permission of Cypress. 17 | 18 | Disclaimer: THIS SOFTWARE IS PROVIDED AS-IS, WITH NO 19 | WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING, 20 | BUT NOT LIMITED TO, NONINFRINGEMENT, IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 22 | PARTICULAR PURPOSE. Cypress reserves the right to make 23 | changes to the Software without notice. Cypress does not assume any 24 | liability arising out of the application or use of the Software or any 25 | product or circuit described in the Software. Cypress does not 26 | authorize its products for use in any products where a malfunction or 27 | failure of the Cypress product may reasonably be expected to result in 28 | significant property damage, injury or death (“High Risk Product”). By 29 | including Cypress’s product in a High Risk Product, the manufacturer 30 | of such system or application assumes all risk of such use and in doing 31 | so agrees to indemnify Cypress against all liability. 32 | 33 | THE CYPRESS COPYRIGHTED PORTIONS ARE NOT SUBMISSIONS AS SET FORTH IN THE APACHE LICENSE VERSION 2.0 OR ANY OTHER LICENSE HAVING SIMILAR PROVISIONS. 34 | -------------------------------------------------------------------------------- /third_party_licenses/kp-firmware/Apache_License.txt: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS -------------------------------------------------------------------------------- /third_party_licenses/kp-firmware/CMSIS-DAP EULA.PDF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Infineon/KitProg3/b81f81489ed6ac43451fac3c585e36b53ef6fe49/third_party_licenses/kp-firmware/CMSIS-DAP EULA.PDF -------------------------------------------------------------------------------- /third_party_licenses/kp-firmware/Third Party Licenses.txt: -------------------------------------------------------------------------------- 1 | FOR KITPROG1, KITPROG2 FIRMWARE ONLY 2 | 3 | KitProg firmware distributed with PSoC Programmer software uses CMSIS-DAP sources. 4 | Please refer to page 5 in the CMSIS End User License Agreement (CMSIS-DAP EULA.pdf) to find information about BSD licence and zlib licence which cover different components of CMSIS-DAP package. --------------------------------------------------------------------------------