USB superspeed peripherals Forum Discussions
Hello,
I have a problem.
I'm using SPI in FX3.
In "ApplicationStart" I configure EndPoint in this way
CyU3PEpConfig_t epCfg;
CyU3PMemSet ((uint8_t *)&epCfg, 0, sizeof (epCfg));
epCfg.enable = CyTrue;
epCfg.epType = CY_U3P_USB_EP_BULK;
epCfg.burstLen = 16;
epCfg.pcktSize = 1024; // I'm using USB 3
CyU3PSetEpConfig(CY_FX_EP_PRODUCER, &epCfg);
/* Flush the endpoint memory */
CyU3PUsbFlushEp(CY_FX_EP_PRODUCER);
... then, I configure Dma in this way ...
CyU3PDmaChannelConfig_t dmaCfg;
CyU3PMemSet ((uint8_t *)&dmaCfg, 0, sizeof (dmaCfg));
dmaCfg.size = 1024;
dmaCfg.count = 200;
dmaCfg.prodSckId = CY_U3P_UIB_SOCKET_PROD_1;
dmaCfg.consSckId = CY_U3P_LPP_SOCKET_SPI_CONS;
dmaCfg.dmaMode = CY_U3P_DMA_MODE_BYTE;
CyU3PDmaChannelCreate (&glChHandleBulkSink,CY_U3P_DMA_TYPE_AUTO, &dmaCfg);
/* Set DMA Channel transfer size */
CyU3PDmaChannelSetXfer (&glChHandleBulkSink, 0);
... then Spi in this way ...
CyU3PSpiConfig_t spiConfig;
/* Start the SPI module and configure the master. */
CyU3PSpiInit();
CyU3PMemSet ((uint8_t *)&spiConfig, 0, sizeof(spiConfig));
spiConfig.isLsbFirst = CyFalse;
spiConfig.cpol = CyTrue;
spiConfig.ssnPol = CyFalse;
spiConfig.cpha = CyTrue;
spiConfig.leadTime = CY_U3P_SPI_SSN_LAG_LEAD_HALF_CLK;
spiConfig.lagTime = CY_U3P_SPI_SSN_LAG_LEAD_HALF_CLK;
spiConfig.ssnCtrl = CY_U3P_SPI_SSN_CTRL_HW_EACH_WORD;
spiConfig.clock = 33e6;
spiConfig.wordLen = 8;
CyU3PSpiSetConfig (&spiConfig, NULL);
CyU3PSpiSetBlockXfer (0xFFFFFFFF, 0 );
When I open C++ Streamer I notice that there are many Failures and
SPI not work continuously but in a "burst way" ....
Can someone have an idea ?
Show LessHello,
I've tried to transfer larger file (more than 100MB) over USB 3 using
CyControlCenter C# "Data Transfers" Tab ("Transfer File" button)
on Bulk out end point
and FX3 with "USBBulkSourceSInkLED" sample loaded.
When I try this operation on my "Windows 7 Professional Service Pack 1 32-bit"
Intel i5 PC appears BlueScreen ..
I open Visual Studio and I see source code associated to this button (rows 636 ... 649)
FileStream file = new FileStream(fname, FileMode.Open, FileAccess.Read);
flen = file.Length;
file_bytes = (int)flen;
//file_bytes = Convert.ToInt32(NumBytesBox.Text);
file_buffer = new byte[file_bytes];
file.Read(file_buffer, 0, file_bytes);
file.Close();
//curEndpt.XferSize = Convert.ToInt32(NumBytesBox.Text);//
curEndpt.XferSize = 16;//mf file_bytes;
success = curEndpt.XferData(ref file_buffer, ref file_bytes);
CyControlCenter open the whole file.
Is there a way to transfer big files ?
Show LessHi,
I am trying to set up the FX3s USB bootloader to use custom VID and PID stored in a micron M25P32 SPI flash chip. The board is set to SPI boot with USB fallback. The flash image is working on the FX3 DVKs onboard flash (M25P40). The image is written correctly to the flash on my custom board (read back by firmware), but the bootloader fails to use the VID PID from flash. Using the oscilloscope I have observed the bootloader to read the status register and the first 4 bytes (header) of the flash image as it does on the DVK. The communication on the custom board stops after reading the header and it enumerates with default cypress VID PID. The FX3's SPI interface on the custom board is using 1.8V levels and communicating to the 3.3V flash through a MAX3378 bidirectional level shifter. I have tried eliminating the level shifter using 3.3V levels on the FX3's SPI and connecting it directly to the 3.3V flash(on the far end of the tristated level shifter), but still got the same behaviour.
I intend to try different types of flash memory and avoid going through the level shifter. Are there any known issues for certain flash types?
The image header is set to for the bootloader to use 10MHz SPI clock(Max speed of level shifter, but the bootloader doesn't get far enough to use that information). The app note warns of using pull up/down on MISO & MOSI(bootloader expects floating lines to start communication). Could the level shifter still be a problem? I would guess the bootloader would not even start communicating if the level shifter has pull up/down behaviour.
Thanks in advance
Show LessHi guys,
I am using those interfaces to transform data.
<code>BeginDataXfer
WaitForXfer
FinishDataXfer</code>
here comes a problem that.
when i using a while loop keep transforming data. i always got timeout error.
while i add Sleep(2) before each tranforming, the whole loop would run without any error.
is there requeire and limit in it?
I have a device based on the Cypress FX3 which is powered by VBUS from the PC. I would like to be able to power cycle the device without unplugging/plugging. Does anyone know of way to cause the PC to turn usb 3.0 VBUS on and off to power cycle the device? Does CCyUSBDevice::ReConnect from CyAPI do this?
Show LessI would like to use the FX3 to control an Image scanner.
That involves controlling of stepper motors, creating clock signals for linear Image sensor and AD converter, reading raw data, sending USB-data to host.
Is there any design example which I could use as a reference?
Show Less你好!
关于器件Cyusb3014的固件编程及GPIF接口配置, 我希望在slavefifoSync的模式基础
上增加控制传输模式,想问问GPIF配置及固件编程如何实现。
诚挚感谢
曹先生
我的微信:czs13641092952
How are you?
I ask a question for firmware about use of cyusb3014。On the basic of
SlaveFifoSync FirmWare Mode, I hope to add a mode among that realize a mode
of control transmission。For this,how I do configure my GPIF and program my
firmware?
Thanks a lot
caozhansheng
In AN65974 demo,use SF_streamOUT.img.
USE "usb control center",send 1KB, but FLAGC and FLAGD in the GPIF interface are always low, which can not trigger read status. and send 1025B or 1023B, the FLAGC and FLAGD are normal, which can trigger read status.
Why is FX3 abnormal, when received 1KB?
Show LessHello,
We are using the control center for biding the streamer and the Fx3 board which is also provided by the cypress .And it is working
when we will select the bulk _in_End_points But when we will Select the bulk_out_end_points the data is transferring only 2 times . if we wanted to transfer third time and so on .... transfer failed 997 error is coming .can any one help me to modify the control center so i can transfer data to fx3 using bulk out end points n times from Cy Control center to fx3.
Show Less