USB superspeed peripherals Forum Discussions
text.format{('custom.tabs.no.results')}
FX3
I have a complex GPIO set as a 1HZ timer with interrupt. I get the interrupt until I start sending messages.
Below is the GIO configuration.
/* Configure GPIO 33 as 1PPS input */
ppsGpioConfigComplex.outValue = CyFalse;
ppsGpioConfigComplex.inputEn = CyFalse;
ppsGpioConfigComplex.driveLowEn = CyFalse;
ppsGpioConfigComplex.driveHighEn = CyFalse;
ppsGpioConfigComplex.intrMode = CY_U3P_GPIO_INTR_TIMER_THRES;
ppsGpioConfigComplex.period = 192000000;
ppsGpioConfigComplex.pinMode = CY_U3P_GPIO_MODE_STATIC;
ppsGpioConfigComplex.threshold = 192000000;
ppsGpioConfigComplex.timer = 0; // Timer initial value
ppsGpioConfigComplex.timerMode = CY_U3P_GPIO_TIMER_HIGH_FREQ;
apiRetStatus = CyU3PGpioSetComplexConfig(PPS_MONITOR, &ppsGpioConfigComplex);
For example, when trying to obtain a buffer via
apiRetStatus = CyU3PDmaChannelGetBuffer (&MIDI_IN_HANDLE, &buf_p, CYU3P_WAIT_FOREVER);
apiRetStatus is set to 64. By numbering the error codes in the error enum in the api's error.h, 64 means CY_U3P_ERROR_INVALID_DEV. Well that doesn't make much sense, but it does seem that certain functions have different sets of errors associated with them.
How can I best decode errors such as these?
TIA
Show LessHi,all
I would like to use GPIF DESIGNER to read and write NANDFLASH. I found that when I use DR_DATA and IN_DATA to
drive the data bus, the length of time and interval can not be changed, and I do not need such a long time.As a result I can not exactly optimize the timing of the design as I need.Can I change length of time when drive data bus?
Thanks!
Feng
Show LessWe want to update FX3 firmware by the steps: Insert a FX3 module into the computer, then press a key such as "firmware update", updating firmware, success, then reset to restart from SPI.
The step of "press a key---firmware update", we want to send a command to FX3 module to erase flash. then, SPI on Failure, USB boot up. The problem is how to go through from computer to FX3, maybe API needed, but what's the right API?
Thank you very much.
Show LessHello!
I'm trying to program a CYUSB3KET-003 Demo module to work with the Windows driver written for FX2LP. The driver for Windows wrote itself. it works. I wanted a compatibility mode.
I need the wMaxPacketSize parameter in the CY_U3P_USB_ENDPNT_DESCR descriptor of the CyFxUSBHSConfigDscr structure to be less than 512 bytes (for example, 64) for BULK EP.
However, when connecting, Windows generates an invalid handle error (xHCI & Windows 8.1).
CONFIGURATION_DESCRIPTOR_VALIDATION_FAILURE!
The error applies to all descriptors and even the VID & PID does not match the ones specified in CyFxUSB20DeviceDscr.
The working code from the example, with a value of 512 - everything works. With any other value - does not work.
How to solve this problem?
Does the chip support values other than those specified by default?
PS
If in the descriptor to change the Endpoint Type from BULK to Interrupt it works with any length Max packet size.
PPS
So far I've found one way. But not the best it seems to me:
It is necessary in the CyFxUSB20 descriptorDeviceDisc to change the version
// 0x10,0x02, / * USB 2.10 * /
on
0x00,0x02, / * USB 2.00 * /
Then you can set any length of Max packet size in USB 2.0 mode.
SDK\1.3\firmware\basic_examples\cyfxbulksrcsink\cyfxbulkdscr.c
Show LessHi Sir,
I used PSoC creator 3.3 or 4.0 build CYPD2122-24LQXI_mobile/CYPD2122-24LQXI_notebook/CYPD2134-24LQXI_power_adapter have error happen. as insert picture.
Please help me to solve this issue, Thanks a lot !!!
Show LessDear Cypress,
Do you have any case that CYUSB3014 connected to NANDFLASH to achieve mass storage device case? I know there are two similar cases : FX3SMassStorage and cyfxmscdemo, but they do not implement controlling Nandflash, which can not meet my needs.
Please tell me, be grateful!
Feng
Show LessFor example, if I set a DMA channel with producer CY_U3P_UIB_SOCKET_PROD_2, can I assume that data will be sourced from Ep 0x02?
Edit: speaking of FX3 in particular
Show LessHi
We've implemented the uvc video streaming with virtual uart port on the host side in CX3. Virtual uart port is connected in CX3 to regular uart using auto DMA channels. We are using this path to communicate with our custom camera sensor which is connected to CX3 uart. You can find the DMA channels definition below.
The standard message size for camera communication is 9 bytes, so we call CyU3PDmaChannelSetWrapUp() every 10 ms on both DMA channels to force the partial dma buffer to be sent to consumer. Host to camera channel is working fine, but in other direction after a number of messages(a few hundreds) I get CY_U3P_ERROR_INVALID_SEQUENCE error from WrapUp function. I found it happens following uart failure, the uart status register is filled with 14 error - "RX FIFO overflow or DMA Socket Overflow".
What can be the source of the error? May calls to CyU3PDmaChannelSetWrapUp() every 10 seconds cause such a behavior?
Thanks,
Roman
/* Configure DMA */
void setCameraDmaUart(uint16_t size) {
print("setCameraDmaUart");
USB2UART_DMA_config_t dmaCfg_usb2uart;
CyU3PReturnStatus_t apiRetStatus;
dmaCfg_usb2uart.size = size; // size is 512
dmaCfg_usb2uart.count = CY_FX_USBUART_DMA_BUF_COUNT; // count is 8
dmaCfg_usb2uart.prodSckId = CY_FX_EP_PRODUCER1_SOCKET; // from USB
dmaCfg_usb2uart.consSckId = CY_FX_EP_CONSUMER1_SOCKET;// to UART
dmaCfg_usb2uart.dmaMode = CY_U3P_DMA_MODE_BYTE;
dmaCfg_usb2uart.notification = CY_U3P_DMA_CB_ABORTED | CY_U3P_DMA_CB_ERROR; /*CY_U3P_DMA_CB_PROD_EVENT;*/
dmaCfg_usb2uart.cb = USB2UART_error_callback; /*CyFxUSB2UartDmaCallback;*/
dmaCfg_usb2uart.prodHeader = 0;
dmaCfg_usb2uart.prodFooter = 0;
dmaCfg_usb2uart.consHeader = 0;
dmaCfg_usb2uart.prodAvailCount = 0;
apiRetStatus =CyU3PDmaChannelCreate(&glChHandleUsbtoUart,CY_U3P_DMA_TYPE_AUTO, &dmaCfg_usb2uart);
if (apiRetStatus != CY_U3P_SUCCESS) {
app_error_handler_msg(apiRetStatus,"usb2uart channel");
}
/* Create a DMA_MANUAL channel between uart producer socket and usb consumer socket */
/* Use a smaller buffer size (32 bytes) to ensure that packets get filled in a short time. */
/* Create a DMA_AUTO channel between usb producer socket and uart consumer socket */
CyU3PDmaChannelConfig_t dmaCfg_uart2usb;
dmaCfg_uart2usb.size = size;
dmaCfg_uart2usb.count = CY_FX_USBUART_DMA_BUF_COUNT;
dmaCfg_uart2usb.prodSckId = CY_FX_EP_PRODUCER2_SOCKET;
dmaCfg_uart2usb.consSckId = CY_FX_EP_CONSUMER2_SOCKET;
dmaCfg_uart2usb.notification = CY_U3P_DMA_CB_ABORTED | CY_U3P_DMA_CB_ERROR; /* CY_U3P_DMA_CB_PROD_EVENT;*/
dmaCfg_uart2usb.cb = UART2USB_error_callback; /*CyFxUart2USBDmaCallback;*/
dmaCfg_uart2usb.dmaMode = CY_U3P_DMA_MODE_BYTE;
dmaCfg_uart2usb.prodHeader = 0;
dmaCfg_uart2usb.prodFooter = 0;
dmaCfg_uart2usb.consHeader = 0;
dmaCfg_uart2usb.prodAvailCount = 0;
apiRetStatus = CyU3PDmaChannelCreate(&glChHandleUarttoUsb,CY_U3P_DMA_TYPE_AUTO, &dmaCfg_uart2usb);
// apiRetStatus = CyU3PDmaChannelCreate (&glChHandleUarttoUsb,
// CY_U3P_DMA_TYPE_AUTO, &dmaCfg);
if (apiRetStatus != CY_U3P_SUCCESS) {
app_error_handler_msg(apiRetStatus,"uart2usb channel");
}
#ifdef MULTI
apiRetStatus = CyU3PDmaMultiChannelSetXfer(&glChHandleUsbtoUart, 0, 0);
#else
apiRetStatus = CyU3PDmaChannelSetXfer (&glChHandleUsbtoUart,0);
#endif
if (apiRetStatus != CY_U3P_SUCCESS) {
app_error_handler_msg(apiRetStatus,"set xfer usb2uart");
}
apiRetStatus = CyU3PDmaChannelSetXfer(&glChHandleUarttoUsb, 0);
if (apiRetStatus != CY_U3P_SUCCESS) {
app_error_handler_msg(apiRetStatus,"set xfer uart2usb");
}
}
Show LessHi
I am testing cyfxuartlpregmode uart loopback example provided with the CX3. I made some weird observation that the example code works well when i run it with lower baud rates like 9600 or 115200. But the same example fails when i try running it at baud rate of 3M. As such higher baud rates are not supported by the pc applications like minicom, i am using the usb to uart converter along with a simple linux application which will write and read back single byte of data at 3M baud. I have verified the usb to uart converter, by looping back the data from the converter itself.It works well and supports this baud rate(3M) . My use case needs uart interface to work at 3M baud. I doubt whether the incoming data to uart is read properly or not.
Show Less