MiniProg4 i2c+spi+gpio

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

cross mob
DerekRaf
Level 1
Level 1
First like received First solution authored 5 sign-ins

I have a CY8CKIT-005 kit which has a MiniProg4. I also have a C++ code that manages devices by spi and i2c and gpio. Can I implement control using MiniProg4? It is necessary that all these interfaces work simultaneously.
I also want to know if there are drivers for MiniProg4 to run it using the code in Visual Studio?

0 Likes
1 Solution
DerekRaf
Level 1
Level 1
First like received First solution authored 5 sign-ins

Using the description of KitProg host protocol interface and the Libusb-1.0.22 (there are examples of connecting to the programmer) library. I was able to connect to MiniProg4 and control spi and i2c.

If you are interested, the transaction to the device looks like this:

libusb_open(dev, &device);

libusb_claim_interface(device, 1);

libusb_bulk_transfer(device, 0x07, cmd, sizeof(cmd), &writed, 1000);
libusb_bulk_transfer(device, 0x86, data, 0x40, &readed, 1000);

View solution in original post

7 Replies
LeoMathews
Moderator
Moderator
Moderator
First question asked 500 replies posted 100 solutions authored

Hi @DerekRaf 

Please note that CY8CKIT-005 kit is another term for MiniProg4. MiniProg4 is a protocol translation device. The protocols are supported by each connector as shown below:

LeoMathews_0-1685424362737.png

These interfaces can work simultaneously while they are used with different connectors. Can you please let us know which device you are trying to program with MiniProg4? The MiniProg4 drivers comes with PSoC Programmer/ Cypress Programmer tool. The driver can be located at C:\Program Files (x86)\Cypress\Programmer\drivers\MiniProg4. 

Please refer to MiniProg4 userguide for more information.

Thanks and Regards,
Leo

0 Likes

Hello. I want to use MiniProg4 as interface converter (usb to i2c+spi+gpio output). I have a spi display (ST7789) and an i2c touch controller. I want to run them with MiniProg4. I need libraries to work with MiniProg4 so that I can run them with Visual Studio.

0 Likes
LeoMathews
Moderator
Moderator
Moderator
First question asked 500 replies posted 100 solutions authored

Hi @DerekRaf 

MiniProg4 is a programmer and debugger for supported MCU devices. Please note that it cannot be directly used as interface converter for running spi display or touch controller. 

Thanks and Regards,
Leo

0 Likes

Hi @LeoMathews 

I found a repository https://github.com/Infineon/KitProg3 which, as far as I understand, has an API for working with MiniProg4. I also found a description of the commands for the programmer in which there is both spi and i2c control.

Perhaps with the help of these libraries and documentation it is possible to implement what I want?

0 Likes

I figured it out and realized that this repository contains the code for the programmer. Is there a publicly available library to control this programmer (manage bridge mode) from a computer?

0 Likes
LeoMathews
Moderator
Moderator
Moderator
First question asked 500 replies posted 100 solutions authored

Hi @DerekRaf 

Sorry to inform you that there are no publicly available libraries to control the MiniProg4.

Thanks and Regards,
Leo

0 Likes
DerekRaf
Level 1
Level 1
First like received First solution authored 5 sign-ins

Using the description of KitProg host protocol interface and the Libusb-1.0.22 (there are examples of connecting to the programmer) library. I was able to connect to MiniProg4 and control spi and i2c.

If you are interested, the transaction to the device looks like this:

libusb_open(dev, &device);

libusb_claim_interface(device, 1);

libusb_bulk_transfer(device, 0x07, cmd, sizeof(cmd), &writed, 1000);
libusb_bulk_transfer(device, 0x86, data, 0x40, &readed, 1000);