USB superspeed peripherals Forum Discussions
I am using a CYUSB3025 with an Epson FA-20H 19.2000MF12Y-AG3 crystal. A 100K - 1M ohm resistor across the crystal is needed to get the crystal to startup and oscillate while the SD3 is in reset. Without the resistor, it won't oscillate. When using a startup resistor, bringing the CYUSB3025 out of reset causes the oscillator to stop oscillating. 12pF caps are used for Cext on both sides of the crystal.
The Epson crystal has a load capacitance value of 6pF to infinity. I am not sure what Cext should be. Does anyone have experience using an Epson FA-20H crystal with a CYUSB3025?
According to Cypress lierature, the NDK NX3225SA-19.2M-EXS00A-CS03082 was used to test the FX3. I can't find this oscillator for purchase.
Does anyone have a suggestion for a crystal and Cext values? I have seen examples as low as 2pF and as high as 39pF for Cext.
Show LessWe have devices that have embedded Aptina image sensor and EZ USB FX3 chips. These devices connect to host Win 10 PCs using USB 3.0. Typically these devices transmit image data continuously using USB to the PC for about an hour at a time. During this period we have noticed that occasionally (and unpredictably) the USB data transfer drops off without any obvious reason. We have ensured that the data cables are properly connected to the PCs i.e. no loose connection etc.
The communication with the PC and our device is driven by a custom C# application that utilizes the CyUSB.dll (v1.2.3.0) obtained from the Cypress FX3 SDK 1.3.4 installation. This custom C# application has been in use for several years and we have used it to collect image data from these devices on Win 7 PCs without issues. Recently we have switched to Win 10 PCs since Win 7 is no longer supported. During this switch, we have started using Cypress SDK v1.3.4 (changed from v1.2.3 used on the Win 7 PCs) and CyUSB.dll v1.0.0.1 (changed from v1.2.3.0 used on the Win 7 PCs). A short code snippet for this asynchronous I/O communication is attached (CypressIssueCodeSnippet.txt).
Looking at the code snippet and our error logs, the issue appears to happen during calls to the WaitForXfer function. The USB communication occasionally drops off at this point and we receive the “Aborting USB Transfer” message in our error log.
Could you please suggest what may be going wrong and how to fix it or narrow down the exact problem? Are there any known compatibility issues with Win 10/Cypress SDK 1.3.4 that may be causing this?
Show LessHello all,
I've been having some trouble running my application again after hitting a breakpoint, but only when it's in a certain spot.
I do CyU3PDeviceInit(), CyU3PDeviceConfigureIOMatrix(), and CyU3PGpioInit() before starting the CyU3PKernelEntry() in main. The application define function sets up URT and creates a thread. In that thread, the first thing I do is call a function to set up GPIF-II plus a couple of GPIO pins. I have a breakpoint set at the end of that function so that I can start up the other microcontroller that's supposed to be listening to one of those pins. It doesn't get set until later, but breaking later messes up the timing for USB.
When I try to run the application after stopping there, I get "ERROR: Bad JTAG communication: Write to IR: Expected 0x1, got 0x0 (TAP Command : 2) @ Off 0x5.".
I saw https://community.cypress.com/docs/DOC-18696, but trying the solution presented doesn't seem to have worked, and after watching the register mentioned there, it stays at the value I set it in the debug configuration, so it doesn't appear that the clock speed is changing as the aforementioned article describes. I'm also able to set breakpoints in other places in my program that behave normally. That is, they break and continue when I tell them to.
Here's the GPIO/GPIF-II initialization function. As I mentioned, it's the first thing that gets called by the main thread.
void gpio_entry(){
CyU3PGpioSimpleConfig_t config;
CyU3PReturnStatus_t status;
CyU3PPibClock_t pibClock;
// Configure GPIO_IS_PS as an input, since it's how the 8051 tells us
config.driveHighEn = CyFalse;
config.driveLowEn = CyFalse;
config.inputEn = CyTrue;
config.intrMode = CY_U3P_GPIO_NO_INTR;
config.outValue = CyFalse; // Not an output, so who cares?
status = CyU3PGpioSetSimpleConfig(GPIO_IS_PS, &config);
if (status != CY_U3P_SUCCESS){
errorLoop();
}
// Configure GPIO_READY as an output, since it tells the 8051 when we're ready.
config.driveHighEn = CyTrue;
config.driveLowEn = CyTrue;
config.inputEn = CyFalse;
config.intrMode = CY_U3P_GPIO_NO_INTR;
config.outValue = CyFalse;
status = CyU3PGpioSetSimpleConfig(GPIO_READY, &config);
if (status != CY_U3P_SUCCESS){
errorLoop();
}
// Configure GPIO_SEND_INTERRUPT as an output, since it send out an interrupt signal to the 8051 when we have data
config.driveHighEn = CyTrue;
config.driveLowEn = CyTrue;
config.inputEn = CyFalse;
config.intrMode = CY_U3P_GPIO_NO_INTR;
config.outValue = CyTrue;
status = CyU3PGpioSetSimpleConfig(GPIO_SEND_INTERRUPT, &config);
if (status != CY_U3P_SUCCESS){
errorLoop();
}
extern uint32_t interruptInitTicks;
interruptInitTicks = CyU3PGetTime();
/* Initialize the p-port block. */
pibClock.clkDiv = 2;
pibClock.clkSrc = CY_U3P_SYS_CLK;
pibClock.isHalfDiv = CyFalse;
/* Enable DLL for async GPIF */
pibClock.isDllEnable = CyTrue;
status = CyU3PPibInit(CyTrue, &pibClock);
if (status != CY_U3P_SUCCESS)
{
CyU3PDebugPrint (4, "P-port Initialization failed, Error Code = %d\n",status);
errorLoop();
}
/* Load the GPIF configuration for Slave FIFO async mode. */
status = CyU3PGpifLoad (&CyFxGpifConfig);
if (status != CY_U3P_SUCCESS)
{
CyU3PDebugPrint (4, "CyU3PGpifLoad failed, Error Code = %d\n",status);
errorLoop();
}
/* Start the state machine. */
status = CyU3PGpifSMStart (RESET, ALPHA_RESET);
if (status != CY_U3P_SUCCESS)
{
CyU3PDebugPrint (4, "CyU3PGpifSMStart failed, Error Code = %d\n",status);
errorLoop();
}
// Wait for a few ms to give the 8051 a window in which to start listening to the interrupt pins before anything interesting is sent
CyU3PThreadSleep(INIT_WINDOW_MS);
return;
}
The very last line of the function is where I have my breakpoint set. Right before the return. I've also tried it right before the sleep function.
GPIO_IS_PS is gpio[25]
GPIO_READY is gpio[26]
GPIO_SEND_INTERRUPT is gpio[27]
GPIF-II uses GPIO[0:9] for address and data, and GPIO[17:22] and GPIO[24] for other signals.
INIT_WINDOW_MS is 100 for now, but I'll probably adjust that later.
Have I done something wrong? Is this something I need to fix on the FX3? In the IDE?
If we can rule those out and it looks like it's a hardware problem, I can talk to the guy who worked on the board, but I'd like to know that I've covered my bases, and ideally, I'd like to find more information for him to go on.
More generally, I'd appreciate any information that could shed some light on the problem.
Thanks for your help!
EDIT: Something else I observed today was that if I start the program up again immediately after it hits the breakpoint, I can continue running the program. I only run into trouble if I take the time to switch to my other IDE and let that one continue it's execution first. Is there some kind of timer in the background of the FX3 that the breakpoint might be messing up?
Show LessHi,
In my current application I have used FX3 series CYUSB3014 controller and interfaced with FPGA in Sync Slave FIFO (Customized board) and for boot option i have used I2C EEPROM. In this application sometimes the controller is resetting. I want to debug the code I am not understanding how to debug it.
Regards,
Bipin
Show LessI'm trying to do the bring-up for our board and I'm afraid I'm stumped.
I can see the board in the Control Center and I can attempt to load a program to RAM, but then it fails to enumerate again. So I tried to debug the code.
I'm having pretty much the same symptons as this old post:
[FX3 Debug] Error: can't add breakpoint: target running
... but I can't move forward.
Here's my console dump:
Open On-Chip Debugger 0.8.0 (2014-12-03-15:43)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Warn : Adapter driver 'cy7c65215' did not declare which transports it allows; assuming legacy JTAG-only
Info : only one transport option; autoselect 'jtag'
adapter_nsrst_delay: 200
jtag_ntrst_delay: 200
adapter speed: 1000 kHz
trst_and_srst srst_pulls_trst srst_gates_jtag trst_push_pull srst_open_drain connect_deassert_srst
RCLK - adaptive
adapter speed: 1000 kHz
Info : clock speed 1000 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: fx3.cpu: IR capture error; saw 0x0f not 0x01
Warn : Bypassing JTAG setup events due to errors
Info : Embedded ICE version 0
Error: unknown EmbeddedICE version (comms ctrl: 0x00000000)
Info : fx3.cpu: hardware has 2 breakpoint/watchpoint units
Info : accepting 'gdb' connection from 3333
undefined debug reason 7 - target needs reset
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Error: Target not halted
Warn : target not halted
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: fx3.cpu: IR capture error; saw 0x0f not 0x01
Warn : Bypassing JTAG setup events due to errors
Warn : srst pulls trst - can not reset into halted mode. Issuing halt after reset.
Error: timed out while waiting for target halted
TARGET: fx3.cpu - Not halted
in procedure 'reset'
Info : Halt timed out, wake up GDB.
Error: timed out while waiting for target halted
in procedure 'halt'
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target not halted
Warn : target fx3.cpu is not halted
Error: can't add breakpoint: target running
Info : dropped 'gdb' connection
But I can't debug, execution doesn't stop at main, arm-none-eabi-gdb is terminated (exit value 0) as does openocd.exe (exit value 1). We have an on board CY7C65215-32LTXIT and it's both wired and programmed exactly as the one in the Explorer Board. Still, I can't debug (but I have no problems whatsoever in the Explorer Board).
Since I also have the "target not halted" I checked the schematic and even measured connectivity for TRST and everything seems to be sound. I don't have an oscilloscope at hand*, so I wanted to see if there's something else I could test.
Any ideas?
Even if it's just a JTAG problem, I'm still at a loss as to why it wouldn't enumerate. I made a small app that does nothing beyond basic clock config and RTOS start, and it still doesn't enumerate.
* As I write this, I'm suspecting the error on "Error: JTAG scan chain interrogation failed: all ones".
Show Less
Greetings!
We are currently developing a DTV receiver that will run on Linux based on the Silabs chip and Cypress fx2lp USB chip. However, we are facing a problem with the shared library "libCypress.so". The problem is whenever we try to turn on the GPIF to stream TS packets to UDP via USB the library is causing a segfault error every time.
OUR SETUP:
Ubuntu 18.04 kernel 5.4.0-48-generic
Below is the gdb result when running under it. Thank you in advance.
Show LessHi All,
I am working on some project based on SlaveFifoSync example and we would like to use I2C for temperature monitoring. Find some examples to modify the SlaveFifoSync firmware but after burning the firmware, there is no Cypress USB device when use lsusb.
Tried to isolate changes and found out as long as I change useI2C from False to True and create new firmware, the USB device is not there.
io_cfg.useI2C = CyTrue;
I tried to use the GPIFII designer to turn on "I2C" support by checking it and it does not seem to changes anything in the generated header file cyfxgpif_syncsf.h.
Can anyone give some suggestions on how this should be done properly?
Thank you very much,
Frank.
Show LessHi,
I need to send the status of 2 GPIO pins over an interrupt endpoint.
I am starting with this code:
https://www.cypress.com/documentation/code-examples/ez-usb-fx3-usb-debug-example
As far as I understood, this example sends data using CyU3PDebugPrint with some DMA memory configured. But I don't want to use CyU3PDebugPrint.
I want to write the status of the GPIO pin in such a way that the interrupt endpoint will collect that data and send to the host when requested.
How Can I send an array of bytes to the host using this interrupt endpoint?
Thanks
Lucas
Show LessWhen an FX3 is running an image, how can it be S/W rebooted to then load another image via USB (RAM)?
I do this now by manually reseting the FX3 board. Yes, I realize it will re-enumerate etc.
For example, could a HOST (Vendor??) reset command cause the default FX3 USB driver to do a Device Reset?
Thanks
John
------------------------
On Ubuntu18 w/ libusb and cyusb.