USB superspeed peripherals Forum Discussions
Very similar to this thread: PWM generation problem
We also see an inversion of our PWM signal for LED dimming - request a 20% duty cycle will sometimes switch to 80%.
The "solution" from #153024 generated some magic numbers as pointers to registers relevant to GPIO #26, with no real discussion on where those numbers came from.
I unfortunately cannot change my GPIO pin as it's been wired on a PCB already and need these same numbers for GPIO pin #17. Can we get some clarity as to where these register numbers come from?
The relevant code
gpioConfig.outValue = CyFalse;
gpioConfig.inputEn = CyFalse;
gpioConfig.driveLowEn = CyTrue;
gpioConfig.driveHighEn = CyTrue;
gpioConfig.pinMode = CY_U3P_GPIO_MODE_PWM;
gpioConfig.intrMode = CY_U3P_GPIO_NO_INTR;
gpioConfig.timerMode = CY_U3P_GPIO_TIMER_HIGH_FREQ;
gpioConfig.timer = 0;
gpioConfig.period = CY_FX_PWM_PERIOD;
gpioConfig.threshold = (int) (LEDIntensity[LEDNum]);
apiRetStatus = CyU3PGpioSetComplexConfig(17, &gpioConfig);
Show LessHello,
I am currently trying to modify both FPGA and FX3 example projects for streamIN and streamOUT to test our 8bit GPIF interface and 8bit FX3.
My question is, once I have done that, is the "Streamer" Software able to calculate a datarate even in 8bit mode ?
Many thanks!
--
Adrien
Show LessI want to maximize data througput with SlaveFifoSync implementation. For this I want to use only endpoint 0x82, so to have only one direction: From GPIF to USB.
However deleting the other endpoint 0x01 doesn't seem to be so easy:
I deleted from SlaveFifoSync:
/* Producer endpoint configuration */
apiRetStatus = CyU3PSetEpConfig(CY_FX_EP_PRODUCER, &epCfg);
if (apiRetStatus != CY_U3P_SUCCESS)
{
CyU3PDebugPrint (4, "CyU3PSetEpConfig failed, Error code = %d\n", apiRetStatus);
CyFxAppErrorHandler (apiRetStatus);
}
and:
apiRetStatus = CyU3PDmaChannelCreate (&glChHandleSlFifoUtoP,
CY_U3P_DMA_TYPE_AUTO, &dmaCfg);
if (apiRetStatus != CY_U3P_SUCCESS)
{
CyU3PDebugPrint (4, "CyU3PDmaChannelCreate failed, Error code = %d\n", apiRetStatus);
CyFxAppErrorHandler(apiRetStatus);
}
and:
/* Flush the Endpoint memory */
CyU3PUsbFlushEp(CY_FX_EP_PRODUCER);
/* Set DMA channel transfer size. */
apiRetStatus = CyU3PDmaChannelSetXfer (&glChHandleSlFifoUtoP, CY_FX_SLFIFO_DMA_TX_SIZE);
if (apiRetStatus != CY_U3P_SUCCESS)
{
CyU3PDebugPrint (4, "CyU3PDmaChannelSetXfer Failed, Error code = %d\n", apiRetStatus);
CyFxAppErrorHandler(apiRetStatus);
}
and in the USB enumeration descriptors i changed in interface descriptor endpoint number from 2 to 1. And I commented the following out in SS HS and FS descriptor:
/* Endpoint descriptor for producer EP */
0x07, /* Descriptor size */
CY_U3P_USB_ENDPNT_DESCR, /* Endpoint descriptor type */
CY_FX_EP_PRODUCER, /* Endpoint address and description */
CY_U3P_USB_EP_BULK, /* Bulk endpoint type */
0x00,0x04, /* Max packet size = 1024 bytes */
0x00, /* Servicing interval for data transfers : 0 for bulk */
/* Super speed endpoint companion descriptor for producer EP */
0x06, /* Descriptor size */
CY_U3P_SS_EP_COMPN_DESCR, /* SS endpoint companion descriptor type */
BURST_LEN-1, /* Max no. of packets in a burst : 0: burst 1 packet at a time */
0x00, /* Max streams for bulk EP = 0 (No streams) */
0x00,0x00, /* Service interval for the EP : 0 for bulk */
However, project doesnt seem to work. When uploading firmware to FX3 it doesn't enumerate and Control Center freezes. Can you help me solving this issue?
Is it possible to use let 2 Sockets work on the gpif site? I aksed in another thread if this can bring throughput benefits.
I want to give this a try for SlaveFifoSync, so I changed stated the following in SlaveFifoSync:
/* Create a DMA AUTO channel for P2U transfer. */
dmaMultiConfig.size = DMA_BUF_SIZE*size;
dmaMultiConfig.count = CY_FX_SLFIFO_DMA_BUF_COUNT_P_2_U;
dmaMultiConfig.validSckCount = 2;
dmaMultiConfig.prodSckId[0] = CY_U3P_PIB_SOCKET_0;
dmaMultiConfig.prodSckId[1] = CY_U3P_PIB_SOCKET_1;
dmaMultiConfig.consSckId[0] = CY_FX_CONSUMER_USB_SOCKET;
dmaMultiConfig.notification = 0;
dmaMultiConfig.cb = NULL;
dmaMultiConfig.prodHeader = 0;
dmaMultiConfig.prodFooter = 0;
dmaMultiConfig.consHeader = 0;
dmaMultiConfig.prodAvailCount = 0;
and created MultiChannel:
apiRetStatus = CyU3PDmaMultiChannelCreate (&glChHandleUVCStream, CY_U3P_DMA_TYPE_AUTO_MANY_TO_ONE,
&dmaMultiConfig);
if (apiRetStatus != CY_U3P_SUCCESS)
{
/* Error handling */
CyU3PDebugPrint (4, "DMA Channel Creation Failed, Error Code = %d\n", apiRetStatus);
CyFxAppErrorHandler (apiRetStatus);
}
However even this doesn't enumerate. Can you help me ? I attached both in the attachments.
Show LessHi All,
In our design, we want to keep FX3 firmware in I2C based EEPROM and PMOD[2:0] pins for I2C boot mode. So very first time, as EEPROM will be blank, FX3 bootROM fallback to USB mode and user can upload application-firmware into EEPROM using cypress-control-center utility.
Now, in future, whenever we have new app-firmware and need to upgrade it, let me explain my plan as described below:
[1] Host based user-app (GUI) will give vendor-command to FX3 over control end-point (EP0). This command says that "User want to upgrade FX3 frimware now".
[2] On this command received, FX3 will erase its EEPROM area where older (running RAM firmware) is stored.
[3] Then it will perform soft-reset. i.e. cold-boot
[4] So, on next boot cycle, However PMOD[2:0] is for I2C boot, it will not find valid image from EEPROM and so fallback to USB-boot.
[5] So now user can upload new firmware into I2C based EEPROM using cypress-control-center utility. Finally, on next reboot, FX3 will start running new firmware.
Now, let me ask few queries on this:
[1] Is this plan is suitable ? or do you foresee any issue ?
[2] How good to boot from I2C based EEPROM instead of SPI based FLASH memory ? Is there any drawback with EEPROM & I2C compared to SPI flash ? One I can see is EEPROM size. We can get maximum 2 Mbits (256 KB) chips available in market.
[3] Is there any drawback in above plan compared to If I put second-stage bootloader and maintaining two spaces for app-firmware in SPI-flash, so while firmware upgradation, if any issue occurs, it can revert back to existing app-firmware ?? But I don't see any extra advantage in this SPI-flash based redundant solution, because in my above plan anyway user will get control on USBboot to upgrade new firmware.
I hope your valueable suggestion here.
Thanks,
Premji
Show Lesshello,
As discussed in the previous post(FX3 SPI COMPATIBILITY ),those are supports 1.8v and 3.0v.
Is any spi flash that supports 3.3V Poer supply?
regards,
geetha.
Show LessHello,
In fx3s, the SPI_SS# PIN is connected to SPI FLASH chipselect. How to disable/enable this pin?
can i make this pin High or high imedence in the firmware?
regards,
geetha.
Show Less
I‘m trying to cfg CX3 3065 for receiving data with OV sensor, The MIPI CSI-2 is configured as below:
And the MIPI error thread has got some errcnt: frmErrCnt ctlErrCnt recSyncCnt unrecSyncCnt, So how can i cfg to Eliminate these errors ?
Show LessHi
I am making an USB Composite device (UVC + CDC),But first I singly test UsbUart.zip in the address of http://www.cypress.com/documentation/code-examples/ez-usb-fx3-usb-uart-bridge-example , But I want to intercept data from usb-uart in FX3 fireware,How can I do?Next is my guess and question:
In the UsbUart project above mention,the USB-to-UART is bridge to another Uart port such as Log Uart(refer to function CyFxUSBUARTAppStart in cyfxusbuart) and the corresponding code peices is as following:
......
/* Create a DMA_AUTO channel between usb producer socket and uart consumer socket */
dmaCfg.size = size;
dmaCfg.count = CY_FX_USBUART_DMA_BUF_COUNT;
dmaCfg.prodSckId = CY_FX_EP_PRODUCER1_SOCKET;
dmaCfg.consSckId = CY_FX_EP_CONSUMER1_SOCKET;
dmaCfg.dmaMode = CY_U3P_DMA_MODE_BYTE;
dmaCfg.notification = 0;
dmaCfg.cb = NULL;
dmaCfg.prodHeader = 0;
dmaCfg.prodFooter = 0;
dmaCfg.consHeader = 0;
dmaCfg.prodAvailCount = 0;
apiRetStatus = CyU3PDmaChannelCreate (&glChHandleUsbtoUart,
CY_U3P_DMA_TYPE_AUTO, &dmaCfg);
But I want to intercept data from usb-uart in FX3 fireware,How can I do?Modifing CyFxUSBUARTDmaCallback to get input->buffer_p.buffer and do process, Is that right? If not ,what can I do?
Show LessHi !
In the cyfxbulklpauto.c of AN87216 - Designing a GPIF II Master Interface,there is a CyU3PDmaChannelSetXfer.
In the
CyFxBulkLpApplnStart (
void)
UtoP and PtoU all been set.
But in the
CyFxBulkLpApplnUSBSetupCB (
uint32_t setupdat0, /* SETUP Data 0 */
uint32_t setupdat1 /* SETUP Data 1 */
)
why it doesn't be used to CyU3PDmaChannelSetXfer(glChHandleBulkLpPtoU,CY_FX_DMA_TX_SIZE)and CyU3PDmaChannelReset(&glChHandleBulkLpPtoU) did not be set either.
Show Less
According to this document: http://www.cypress.com/file/138771/download the cypress USBSuite has been released with version 1.2.3.20 on 13/04/2018.
This release includes the windows driver files (CyUSB3.sys,...) with version 1.2.3.20.
The release of the whole sdk: http://www.cypress.com/documentation/software-and-drivers/ez-usb-fx3-software-development-kit on a later date 30/05/2018 only contains the driver files and driver sources for version 1.2.3.16.
We are looking for the driver source files version 1.2.3.20. We don't find them anywhere on the official pages. Are these available?
Show Less