USB superspeed peripherals Forum Discussions
Hi,
I am using PACTRON'S FX3S FPGA Dev Board REV-C. In cyfxusbuart example I want to use CyU3PDebugPrint().But its not working. After the CyFxUSBUARTAppInit(); function I put
CyU3PDebugInit (CY_U3P_LPP_SOCKET_UART_CONS, 8);
CyU3PDebugPrint(4, "value %d\r\n", value);
but it's not working.The example usbuart code gives com port in teraterm .but after adding CyU3PDebugInit(),it does not give the com port. what should I do for getting a debugprint messages in usbuart.
Thanks & Regards
S.Ravi chandrika
Show LessI need to code a timeout for making a loop non blocking using <time.h>.
I am in the EZUSB echosystem (no cmisys, ARM9269)
Please advice: here is the code exceprt
Thanks
#include <time.h> // are deines correct?
ErrorCode_t postReset(void)
{
cmd_reg_t _cmd;
uint8_t _trigger_ms = 10; /* 10ms */
const clock_t _before = clock();
{
const clock_t _delta = clock() - _before;
uint16_t _msec = _delta * 1000 / CLOCKS_PER_SEC; // CLOCK_PER_SECONDS is guarantee?
if (_msec > _trigger_ms)
{
_status = -1;
break;
}
_status = I2C_Read(sys_ctl.command_register.addr, 2, &(uint8_t)_cmd);
if(_status !=0 )
break;
} while (_cmd.ok !=1);
return _status;
}
Show LessHi,
I used the example of cycx3 UVC ov5640 of the cx3 for test ,I want to modify the dma buffer size ,but I found when I modify the other value except the 0x5FF0 and the 0x2FF0,the captured packet will become 36864, not the value 23552 I modified. I don't know why it happens .
When I modify the buffer to the value of 32768, the DMACreate function will return the error code of 0x10
Show LessHi everyone!
I have FPGA connected to FX3 over GPIF (using starndard admux protocol). I successfully can read/write over admux. I need INT# signal to detect events from FX3.
But I have a strange problem with enabling PIB interrupts using CyU3PPibSelectIntSources(...) function, PP_INTR_MASK register does NOT change.
By default register 's value is 0x2000 (RD_MB_FULL bit is high) and MailBox works perfect in both directions! But I need interrupt to detect other events, especially socket state and I have no idea why I can't enable them all.
I looked though all SDK examples, none of them use CyU3PPibSelectIntSources(...).
Thanks much!!
Show LessHi I have a usb device which starts with bInterval - 0, so a 125uS report interval. I want to change this to bInterval = 3 so a 1000uS report interval during the operation of the device. How is this done? does the configuration descriptor need to be resent or is it possible to do with cy api?
Show LessHi Members!!
My customer is planning a USB camera. purpose is home security.
Customer's rough target spec is 3M sensor with 30 frame. but you know CX3 can't support 3M w/ 30 frame
As the design is very beginning stage, and they don't have much information,
Customer is wanting us to provide sensor list that are working fine with CX3.
and also they want to know what are the common frame rate with those sensors.
Your advise will be great help for them to fix the design concept.
Thank you in advance!!
Thanks.
Heather Yu.
Show LessMy TOF camera works well with CX3(CYS3065) on PC. But in embedded system it does not work well, reporting DMA_RESET_EVENT.And I study the problem,finding that CyU3PDmaMultiChannelCommitBuffer() report error CY_U3P_ERROR_INVALID_SEQUENCE. I know the reason is that the host consumes the data at a lower speed than the producer. So I want to increase the DMA buffer size.
dmaCfg.size = CX3_UVC_STREAM_BUF_SIZE; //0x8FD0
dmaCfg.count = CX3_UVC_STREAM_BUF_COUNT; //3
dmaCfg.validSckCount = CX3_UVC_SOCKET_COUNT;
dmaCfg.prodSckId[0] = CX3_PRODUCER_PPORT_SOCKET_0;
dmaCfg.prodSckId[1] = CX3_PRODUCER_PPORT_SOCKET_1;
dmaCfg.consSckId[0] = CX3_EP_VIDEO_CONS_SOCKET;
dmaCfg.dmaMode = CY_U3P_DMA_MODE_BYTE;
dmaCfg.notification = CY_U3P_DMA_CB_PROD_EVENT | CY_U3P_DMA_CB_CONS_EVENT;
dmaCfg.cb = CyCx3UvcAppDmaCallback;
dmaCfg.prodHeader = CX3_UVC_PROD_HEADER;
dmaCfg.prodFooter = CX3_UVC_PROD_FOOTER;
dmaCfg.consHeader = 0;
dmaCfg.prodAvailCount = 0;
status = CyU3PDmaMultiChannelCreate (&glChHandleUVCStream,
CY_U3P_DMA_TYPE_MANUAL_MANY_TO_ONE , &dmaCfg);
if (status != CY_U3P_SUCCESS)
{
CyU3PDebugPrint (4, "\n\rAppInit:DmaMultiChannelCreate Err = 0x%x", status);
}
I increase the CX3_UVC_STREAM_BUF_SIZE to 0x9FD0(mutiplier of 16 bytes), firmware reports CY_U3P_ERROR_MEMORY_ERROR in CyU3PDmaMultiChannelCreate app initialization. If I increase the CX3_UVC_STREAM_BUF_COUNT to 4, also reporting the same error in initialization.
How can I do to increase the DMA buffer size?
Show LessThe Hardware SPI port is not available when using 32-bit GPIF.
I understand there is a Software SPI option explained @ FX3 use of SPI and 32 bits words GPIF
Is it possible to boot the FX3 from Hardware SPI, and sometime later switch the pins to 32-bit GPIF?
If so, is it also possible to switch back to 16-bit GPIF with SPI in order to access the SPI device(s)?
Are there any examples available?
Thank you in advance for your support.
Greg
Show LessHello,
I want to get the point of the frame start , at the moment , I want to send one package by CPU,and then use the dma send data,how can I get it? Wherher the GPIFII state machine can be modified?
Show LessHello,
Please bear with my multi-threaded ignorance...
Also, I originally posted this on 'Known Problems and Solutions' when it should've gone here...
For our current application, we're using the 32-bit GPIF-II mode, and thus the SPI peripheral is not available. We have another device off to the side that we've connected to three GPIO on the FX3 to act as chip select, clock, and data (we did basically the same thing with a project we did that used the FX2 chip). We want this interface to work at close to its maximum speed, which is 20MHz according to the interfacing component's data sheet. In our previous iteration, we'd drive chip select and the clock low, drive the data to its desired value, run a couple of 'nop' calls for setup time, bring the clock high, run a couple of 'nop' calls for hold time, and then bring the clock signal low again, all in a loop until the message was finished. I tried to implement something similar on the FX3, but it runs quite a bit slower than I anticipated. I'm thinking it's due to the multi-threaded nature of the underlying OS, but I'm not an expert on this, so I've come to the forums. Here's my code:
void SwXTimesFiveNsDelay( uint8_t x ) { int i; for (i = 0; i < x; i++) { __nop(); } } void SwSpiWriteToDac( uint16_t val ) { signed char b; /* Don't let anything get in the way of this routine; disable all * interrupts, but make sure we know which interrupts were enabled before we * disabled them. */ uint32_t currentIRQs = CyU3PVicDisableAllInterrupts(); /* Turn on the chip select */ CyU3PGpioSetValue( GPIO_HVCTRLCS_L, CyFalse ); /* Force clock low if it isn't already */ CyU3PGpioSetValue( GPIO_HVCTRLSCK, CyFalse ); for(b = 15; b >= 0; b--) { if (val & (1 << b)) CyU3PGpioSetValue( GPIO_HVCTRLSDI, CyTrue ); else CyU3PGpioSetValue( GPIO_HVCTRLSDI, CyFalse ); SwXTimesFiveNsDelay(6); // 50% duty cycle clock, ~16.8MHz CyU3PGpioSetValue( GPIO_HVCTRLSCK, CyTrue ); // Bring clock high SwXTimesFiveNsDelay(6); // Hold high for the rest of the duty cycle CyU3PGpioSetValue( GPIO_HVCTRLSCK, CyFalse ); // Bring clock low } /* Disable DAC */ CyU3PGpioSetValue( GPIO_HVCTRLCS_L, CyTrue ); /* Re-enable previously disabled interrupts */ CyU3PVicEnableInterrupts( currentIRQs ); }
The actual logic of the code is fine; it does exactly what I expect it to logically on the scope. However, the calls to CyU3PGpioSetValue appear to take ~1.2us, and the __nop's take ~63ns. I didn't really now how long the CyU3PGpioSetValue call was going to take, and my calculations were that a __nop would take 4.96ns when using a system clock of 403.2MHz (CPU clock is half the system clock).
Thread priority is '8', and it's one of two threads running, the other being a low-priority debug thread.
Thanks in advance.
Show Less