USB superspeed peripherals Forum Discussions
text.format{('custom.tabs.no.results')}
Hi,
I am developing a custom camera application derived from the UVC example. I don't need to insert the UVC header for my application, so the CPU does not need to be interrupted to modify the Bulk transfer data on DMA commit. I'm trying to get rid of the Callback by using the DMA in AUTO_MANY_TO_ONE. However the host always reports failed Xfers (0 bytes received) unless I alter the data count value(partially corrupted data due to some skipped bytes in between, but at least I get something). I include my DMA Channel and GPIF setup, maybe I'm just doing something stupid or missing something.
<code>
/* Configure the video streaming endpoint. */
endPointConfig.enable = 1;
endPointConfig.epType = CY_U3P_USB_EP_BULK;
endPointConfig.pcktSize = CY_FX_EP_BULK_VIDEO_PKT_SIZE;
endPointConfig.isoPkts = 1;
endPointConfig.burstLen = 16;
endPointConfig.streams = 0;
apiRetStatus = CyU3PSetEpConfig(CY_FX_EP_BULK_VIDEO, &endPointConfig);
/* Create a DMA Manual channel for sending the video data to the USB host. */
dmaMultiConfig.size = CY_FX_UVC_STREAM_BUF_SIZE; // 32kB
dmaMultiConfig.count = CY_FX_UVC_STREAM_BUF_COUNT; // 3
dmaMultiConfig.validSckCount = 2;
dmaMultiConfig.prodSckId[0] = (CyU3PDmaSocketId_t) CY_U3P_PIB_SOCKET_0;
dmaMultiConfig.prodSckId[1] = (CyU3PDmaSocketId_t) CY_U3P_PIB_SOCKET_1;
dmaMultiConfig.consSckId[0] = (CyU3PDmaSocketId_t) (CY_U3P_UIB_SOCKET_CONS_0
| CY_FX_EP_VIDEO_CONS_SOCKET);
dmaMultiConfig.prodAvailCount = 0;
dmaMultiConfig.prodHeader = 0; /* 12 byte UVC header to be added. */
dmaMultiConfig.prodFooter = 0;
/* 4 byte footer to compensate for the 12 byte header. */
dmaMultiConfig.consHeader = 0;
dmaMultiConfig.dmaMode = CY_U3P_DMA_MODE_BYTE;
dmaMultiConfig.notification = CY_U3P_DMA_CB_CONS_EVENT
| CY_U3P_DMA_CB_PROD_EVENT;
dmaMultiConfig.cb = CyFxUvcApplnDmaCallback;
apiRetStatus = CyU3PDmaMultiChannelCreate(&glChHandleUVCStream,
CY_U3P_DMA_TYPE_AUTO_MANY_TO_ONE, &dmaMultiConfig);
/* Start the state machine from the designated start state. */
CyU3PGpifInitDataCounter(0, (CY_FX_UVC_BUF_FULL_SIZE / (BUS_WIDTH / 8)-2),
RELOAD, UP_COUNT, 1);
</code>
Please let me know if I'm doing something horribly wrong, missing something or if you need additional information.
Thanks in advance.
Show LessC++ streamer (EPIN bulk) failed with Altera FPGA writer using a FIFO writing at low clock speed <1MHz and 'slavefifosync' as CYUSB firmware
XferData fails after few 1024KB EPIN Xfer due to HOST non-retry after NRDY condition found on USB traces.
NB : XferData runs OK at high clock speed (100MHz)
See doc attached for detailed description with USB traces taken with LECROY Advisor T3
Show LessOnce CX3 development kit is connected to a USB 2.0 based host. CX3 recognizes a USB 2.0 host but it has only ONE video output format (640x480). I was trying to add 720p and 1080p formats but all failed. I wonder if anyone has any advice on getting 1080p or even higher video output working for a USB 2.0 host. Thanks.
Show LessHi,
I have two questions regarding MIPI RESET and XSHUTDOWN signal on CX3 chip as I cannot get any information on this from the product documentation.
1.
How to connect MIPI RESET signal? The datasheet specifies it should be pulled to ground for normal operation. However datasheet also indicates the power up sequence should have MIPI_RESET high along with the RESET pin. The Denobola example has it simply pulled to ground? Is this a problem? Can someone explain what is going on here?
2.
If MIPI_CLK and XSHUTDOWN pins are not used, can they be left floating?
I will appreciate any anwser.
Show LessHi there, I am interfacing an Altera DE1 board to ezusb3 and have been looking through the vhdl documentation for the slaveFIFO2bstream_out.vhd (down load is AN65974). I notice that a mega function for DDR is included as a component. Initially I thought this was just used to double the frequency from 50MHZ to 100MHZ, but after simulation I see that the PLL component doubles clock frequency. The only thing that i can see the DDR do is change the phase of the output clock. Is this megafunction necessary to interface with the EZUSB3 (for stream out to slave fifo) or is it a remnant of a previous architecture from a more complicated design?
download of sample code: http://www.cypress.com/documentation/application-notes/an65974-designing-ez-usb-fx3-slave-fifo-interface
Show LessI did modify the example given in slaveFIFO2b_streamIN.v (attached) to be able to send the stream of bytes packed into 32 bit words (using Xilinx FIFO core). Quite naturally the SLWR now doesn't stay low all the time, but goes high when FIFO output is not valid.
Unfortunately after this modification once FLAGB goes low it stays low forever.
To reproduce it I did modify the test bench fpga_master_tb.v (attached) to simulate the FX3 behavior to the best of my understanding.
From what I see if FLAGB goes low, but I don't write enough words to fill entire DMA buffer, the DMA will not get flushed.
Do I understand correctly that I have only two options:
- Make sure that I always write exact number of words as a buffer size
- Drive PKTEND low once the FLAGB is low to flush the DMA.
Otherwise FLAGB will stay low forever.
Show LessI have installed EZ-USB FX3 SDK v1.3.3 for Windows complete version. I tried build example without any errors. Then I created new project for fx3 and simple main c file:
#include <stdio.h>
int main (void){
printf("hello world");
while(1){}
}
after build I have seen resut:
19:01:04 **** Incremental Build of configuration Debug for project new_test ****
cs-make all
'Building target: new_test.elf'
'Invoking: Cross ARM C Linker'
arm-none-eabi-gcc -mcpu=arm926ej-s -marm -mthumb-interwork -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -g3 -T "C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\/fw_build/fx3_fw/fx3.ld" -nostartfiles -Xlinker --gc-sections -L"C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\/fw_lib/1_3_3/fx3_debug" -L"C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\ARM GCC\/lib/gcc/arm-none-eabi/4.8.1" -L"C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\ARM GCC\/arm-none-eabi/lib" -Wl,-Map,"new_test.map" -Wl,-d -Wl,--no-wchar-size-warning -Wl,--entry,CyU3PFirmwareEntry -o "new_test.elf" ./main.o -lcyu3lpp -lcyfxapi -lcyu3threadx -lc -lgcc
C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\/fw_lib/1_3_3/fx3_debug\libcyfxapi.a(cyu3entry_armcc.o): In function `CyU3PFirmwareEntry':
e:\views\antioch_fx3_build_view_puri\software\products\usb30\sdk\firmware\src\system/cyu3entry_armcc.S:131: undefined reference to `CyU3PToolChainInit'
C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\/fw_lib/1_3_3/fx3_debug\libcyfxapi.a(cyu3system.o): In function `CyU3PSysCheckBootState':
cyu3system.c:(i.CyU3PSysCheckBootState+0x68): undefined reference to `CyU3PMemCopy'
c:/program files (x86)/cypress/ez-usb fx3 sdk/1.3/arm gcc/bin/../lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/bin/ld.exe: new_test.elf: hidden symbol `CyU3PMemCopy' isn't defined
c:/program files (x86)/cypress/ez-usb fx3 sdk/1.3/arm gcc/bin/../lib/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/bin/ld.exe: final link failed: Bad value
collect2.exe: error: ld returned 1 exit status
cs-make: *** [new_test.elf] Error 1
19:01:04 Build Finished (took 616ms)
Please help correct mistake.
Show LessHello, I`m using FX3.
In SPIDMAMODE, I want to write/read n byte data.
CyU3PSpiSetSsnLine (CyFalse);
status = CyU3PSpiReceiveWords (buf, 3);
CyU3PSpiSetSsnLine (CyTrue);
When i run above code, the period of each byte is 1 micro-second.
How can I reduce this delay between subsequent SPI transfers.
p.s. CyU3PSpiSetTimeout function is not working...
Show LessWhat should I do when I want to use new image sensor OV10640 + ov490 with CX3?
Can I use the sample code of OV5640 for OV10640 + ov490?
Thanks for help.
Alion
Show LessI'm linking the static library CyAPI.lib in a Qt project with the following lines in the .pro file:
<code>
unix|win32: LIBS += -L$$PWD/include/SpaMt/GrayskullMt/Cypress/ -lCyAPI
INCLUDEPATH += $$PWD/include/SpaMt/GrayskullMt/Cypress
DEPENDPATH += $$PWD/include/SpaMt/GrayskullMt/Cypress
PRE_TARGETDEPS += $$PWD/include/SpaMt/GrayskullMt/Cypress/CyAPI.lib
</code>
...and I've included the CyAPI.h header file (in the same directory with the other related headers, CyUSB30_def.h, etc) in the source file of a new class and attempted to use several functions, like this:
<code>
#include <SpaMt/GrayskullMt/Cypress/CyAPI.h>
...
gsDevice = new CCyUSBDevice();
...
if(gsDevice->DeviceCount() > 0)
{
gsDevice->Open(0);
}
...
CCyUSBEndPoint *ep = gsDevice->EndPointOf(0x03);
</code>
...but I get an "Undefined reference to <function>" error each time I attempt to use any of the functions provided by CyAPI. This makes me think that the static library is not being linked, as I assume that's where all the functions are defined. However I don't see any qmake errors when it reads the .pro file or any compile-time errors related to the linking of the library. What's going on here? Why am I getting these undefined reference errors? Please help!
As a side note, I had to include '#include <Windows.h>
' to CyUSB30_def.h to have the various UCHAR, UINT, etc keywords recognized by the compiler. I thought it was strange this was left out, so maybe I'm breaking something here.
Thanks,
Forrest
Show Less