USB low-full-high speed peripherals Forum Discussions
I'm running into some strange issues with trying to develop an I2C Bootloader Host.
The problem I'm having looks at least on the surface similar to this issue I was having about a year and a half ago, so this may end up being sort of a sequel to that thread:
I2C Bootloader Error: PSoC Bootloader sending extra bytes to host?
Basically, I have an I2C Bootloader Host program built in C#, using interop services for use of cyusbserial.dll and bootl_utils.dll.
cyusbserial.dll is the one found here that fixes ACKs being too long: Reduce Delay Observed During I2C Read Operations In USB-Serial – KBA227320
bootl_utils.dll is built from the source included with PSoC Creator 4.1. The only change I made to the bootl_utils source is described my previous thread at the top of this post. (it shouldn't have an effect on the current behavior, but who knows!)
I am interfacing with a CY7C65211A USB-Serial bridge in I2C Vendor mode.
Interfacing with the bridge appears to be no issue. I can send my "Enter Bootloader" command to the I2C slave device and it enters the loader as instructed.
The problem comes when I try and actually bootload the PSoC5.
When I attempt to bootload, the first command to enter the bootloader looks completely fine:
The problem arises with the first read, where the host keeps ACKing data well past the EoP byte (0x17). The packet looks good, the host app just keeps reading for some reason:
The read then hangs on an 0xFF byte, until eventually (5 seconds later, the configured read timeout) the host finally NAKs and sends the command to exit the bootloader (0x3B):
I have confirmed that this is definitely an issue with the host application. I am able to enter the bootloader with my application, then bootload successfully using the Bootloader Host included with Creator and the I2C Bridge in the MiniProg3. I'm just at a loss as to where this is going wrong. In my ReadData() function on the host, it is entering with the correct size parameter. I confirmed via debug breakpoint that length == 16, which is correct if we include the address byte. I have no idea why it is ACKing all these extra bytes?
The error code returned from CyBtldr_Program() is the CYRET_ERR_BTLDR_MASK (0x4000) with no error code, which I suppose makes sense, as the status byte from the target is 0x00 (SUCCESS).
I have attached the Bootloader Host Application project. Maybe someone can point something out that I'm missing? It's not the cleanest code (I've been messing with it quite a bit), but it shouldn't be too hard to navigate hopefully.
Show LessHow can i using EZUSB_WriteI2C() and EZUSB_ReadI2C() functions to read/write Data from Si570 - 570FAB000433DG such as image?
I am using Keil C and modify firmware of Cypress. Could you please tell me detail how to read/write data with I2C?
Thank you very much and sorry about my english
Show LessThis is datasheet of Si570:
https://www.silabs.com/documents/public/data-sheets/si570.pdf
I want to read start-up frequency configuration (RFREQ, HS_DIV, and N1) from the device after power-up or register reset (page 18).
The control interface to the Si570 is an I2C-compatible 2-wire bus for bidirectional communication.
How to I read/write start-up frequency by i2c of Cypress USB framework.
I using C:\Cypress\USB\CY3684_EZ-USB_FX2LP_DVK\1.1\Firmware\Vend_ax
This is my code:
DB_Addr = 0x00;
I2C_Addr = 0x00;
byte_array[0] = 0x07;
byte_array[1] = 0x08;
byte_array[2] = 0x09;
byte_array[3] = 0x0A;
byte_array[4] = 0x0B;
byte_array[5] = 0x0C;
for(j =0; j< 6; j ++){
EP0BCH = 0;
EP0BCL = 0; // Clear bytecount to allow new data in; also stops NAKing
iicWriteBuf[0] = 0x00;
iicWriteBuf[1]= byte_array
iicWriteBuf[2] = 0x00;
iicWriteBuf[3] = 0x01;
EEPROMWrite(DB_Addr,(WORD)4,(WORD)iicWriteBuf);
EEPROMRead(DB_Addr,(WORD)1,(WORD)iicReadBuf);
*(EP0BUF+j) = iicReadBuf;
}
EP0BCH = 0;
EP0BCL = 6;
EP0CS|= bmHSNAK;
But it not work, please help me to correct.
Thank you!
Best Regards
Show LessMy system and setup:
Ubuntu 18.04, USB 2.0. Device is a Commell MPX24794S card using a Cypress CY8C24794. The cyusb_linux_1.0.4 package was installed according to the instructions in the README file. The active VID and PID was obtained from the command lsusb as VID = cece and PID = 7941. The /etc/cyusb.conf file and the /etc/udev/rules.d/88-cyusb.rules file were modified according to other discussions found here.
cyusb.conf changed to have cece 7941 Commell MPX24794S
88-cyusb.rules changed to have ATTR{idVendor}=="cece" instead of ATTR{idVendor}=="04b4"
Results and observations:
trying to run cyusb_linux gives 2 error messages: Error in opening device and Error opening library.
Commell documentation claims that the PID is 7940. When the value is changes to this cyusb_linux loads but produces a command line response of No device found and there is no device listed in the running program.
cyusb_linux will also run with no device found if the original forms of cyusb.conf and 88-cyusb.rules are used.
Using what appears to be the correct information according to lsusb gives the most problems.
Please advise as to the next step. Thank you.
Show LessHello community, hello cypress team,
During the last weeks I used the latest cyusb_linux (version 1.0.5) and found some improvement possibilities.
My results are available at GitHub - Ho-Ro/cyusb_linux.
Major changes in two main areas:
- Gui: port to Qt5
- Gui: removed a lot of C++11 warnings
- Gui: some cosmetics
Makefile: make install (install as root)
- Makefile: make uninstall (clean uninstall as root)
- Makefile: make deb (Build a Debian package as user)
This package can be cleanly installed and uninstalled on Debian and Ubuntu systems.
The deb packages checkinstall and fakeroot are necessary to use this feature.
Please check and comment!
Last but not least, two questions to cypress:
- What is your linux roadmap for the cyusb suite?
- Are there any plans to support the GPIF design (for FX2LP) under linux?
CU, Martin
Show LessHi,
We are planning to interface Image Sensor, FPGA with FX2LP (56-Pin Package). I need to store FX2, FPGA firmware and calibration data in the external EEPROM so that FX2 will read firmware from external EEPROM and bootup FPGA via I2C. Total firmware size exceeds more than 300 KB.
Can i interface more than 64KB of EEPROM with FX2LP (56-Pin) ?
As per EZ-USB® Development Kit User Guide & Hardware Design Guide, the address pins (A0, A1, A2) of EEPROM must be fixed as either A0 = 0, A1 = 0, A2 = 0 for small EEPROM and A0 = 0, A1 = 0, A2 = 0 for large EEPROM (max 64 KB) to enable the FX2 bootloader to boot either from small EEPROM or Large EEPROM.
Can we change the address pins(A0, A1, A2) of the EEPROM to the value other than 000 or 001 so that we can connect more then two EEPROM's ?
Thanks,
Karthick
Show LessI am about to implement some software using Matlab to communicate with my I2C Hardware (AD5933 Evaluation board) using the CY7C68013-CSP microcontroller utilizing vendor requests. To my understanding, before I can actually begin reading and writing, I must use the vendor command A0 to place the 8051 in RESET mode by writing 0x01 to the register 0XE600. I utilized the XferData() command to send this request and I also set all the required parameters before (i.e. Target, ReqType, Direction, ReqCode, Value, Index). However the XferData returns false in workspace (see attached images). I tried increasing the timeout and it still returned false. Some assistance would be greatly appreciated.
Show LessHello,
I have three questions.
1. Can we enter suspend mode from CY7C65213?
and if CY7C65213 is in suspend mode, which state is TXD pin(Hi-Z / High / Low(0V))?
2. Can we set TXD to Low(0V) ? for example, if we keep reset condition, can we set RXD to Low?
3. Can both D+ and D- be applied voltage without supplying voltage on VCC and VCCIO?
Best regards,
Yocchi
Show LessI followed "SuperSpeed Device Design by Example" to configure SCB0 of CY7C65215 on SuperSpeed Explorer Kit from UART to I2C (Freq = 400000, Mode = Slave and Slave Address = 0x42). After I select Device --> Reset, it failed to enumerate as COM port and I couldn't change it back to UART either.
The attachment showed that USB-Serial Configuration Utility failed to find it. I too tried to update the driver for USB-Serial (Dual Channel) but it failed.
Show LessHi,
To avoid re-inventing the wheel, has anyone ported the FX2 Bulkloop example from Keil to SDCC / Eclipse to run with CyUSB.sys on Windows that they could share ?
Thanks
Dave
Show Less