USB superspeed peripherals Forum Discussions
In AN87216:
The expected behavior when PC only send data to master FX3 but doesn't read data from slave FX3 is : When data is send from PC to master FX3, it get transfered to slave FX3 through GPIFII and get saved in a slave DMA buffer. When more data are send to master FX3, more slave DMA buffer are filled with the received data. Finally all allocated slave DMA buffer is filled, then the slave FX3 will signal the master FX3 all buffer are full and can't receive more data. At this time, data send from PC to master FX3 get saved in master FX3's DMA buffer - waiting to get transfered to slave FX3. Finally all master DMA buffer is full too and now the any more XferData() should fail since master FX3 can't receive any more data from PC. More data can only be sent from PC to master FX3 when some data get read away from slave FX3 by PC.
But the real behavior is: Even the PC doesn't read from slave FX3, PC can continue to send data to the master FX3 without failure/timeout, why? This unexpected behavior means some data get discarded when buffer is full, but where is it get discarded?
Show LessHello Community,
I want to toggle the GPIO pin(In my case it is GPIO 57) in order to increase the voltage going to S0-Port.
I am using custom FX3S board and transfering data from FPGA to S0-Port of FX3. But the data transfer is very slow.I checked the voltage going into SD card port it is 1.8v.So i want to make it logic high i.e 3.3 v.Where to make the changes in firmware accodingly.Thanks in Advance.
Regards,
Sai.
Show LessHi:
i want to read and write a 8bits byteaddr I2C device by USB3014, i can write the right slave addr and sub-addr, but i find wirte data is fail.
this is my code:
i want to wirte the data 0x9F to a slave device(slave addr is 0x42 and sbu addr is 0x03).
CyFxUsbI2cTransfer (0x03,0x42,0x01,0x9F,0x00);
CyFxUsbI2cTransfer (
uint8_t byteAddress,
uint8_t devAddr,
uint16_t byteCount,
uint8_t *buffer,
CyBool_t isRead)
{
CyU3PI2cPreamble_t preamble;
uint16_t pageCount = (byteCount / glI2cPageSize);
CyU3PReturnStatus_t status = CY_U3P_SUCCESS;
uint16_t resCount = glI2cPageSize;
if (byteCount == 0)
{
return CY_U3P_SUCCESS;
}
if ((byteCount % glI2cPageSize) != 0)
{
pageCount ++;
resCount = byteCount % glI2cPageSize;
}
while (pageCount != 0)
{
if (isRead)
{
/* Update the preamble information. */
preamble.length = 3;
preamble.buffer[0] = devAddr;
preamble.buffer[1] = byteAddress;
preamble.buffer[2] = (devAddr | 0x01);
preamble.ctrlMask = 0x0002;
status = CyU3PI2cReceiveBytes (&preamble, buffer, 0x01, 0);
CyU3PDebugPrint (2, "I2C_read_data 0x%x \r\n", buffer);
CyU3PDebugPrint (2, "I2C_read 0x%x \r\n", status);
if (status != CY_U3P_SUCCESS)
{
return status;
}
}
else /* Write */
{
/* Update the preamble information. */
preamble.length = 2;
preamble.buffer[0] = devAddr;
preamble.buffer[1] = byteAddress;
preamble.ctrlMask = 0x0000;
//status = CyU3PI2cTransmitBytes (&preamble, buffer, (pageCount == 1) ? resCount : glI2cPageSize, 0);
status = CyU3PI2cTransmitBytes (&preamble, buffer, 0x01, 0);
CyU3PDebugPrint (2, "I2C_transmit_data 0x%x \r\n", buffer);
CyU3PDebugPrint (2, "I2C_transmit 0x%x \r\n", status);
if (status != CY_U3P_SUCCESS)
{
return status;
}
/* Wait for the write to complete. */
preamble.length = 1;
status = CyU3PI2cWaitForAck(&preamble, 200);
CyU3PDebugPrint (2, "I2C_ACK 0x%x \r\n", status);
if (status != CY_U3P_SUCCESS)
{
return status;
}
}
/* An additional delay seems to be required after receiving an ACK. */
CyU3PThreadSleep (1);
/* Update the parameters */
//byteAddress += glI2cPageSize;
//buffer += glI2cPageSize;
pageCount --;
}
return CY_U3P_SUCCESS;
}
i can read from wave that the slave addr and sub addr are alright but the data is error.
the log from UART says the state of I2C write is OK.
can you tell me where is my code wrong or can you give a good example for read and write a 8bits byteaddr I2C device?
thanks a lot.
Show LessJlink server doesn't find my board:
JLinkGDBServer -device ARM9
SEGGER J-Link GDB Server V6.62d Command Line Version
JLinkARM.dll V6.62d (DLL compiled Mar 2 2020 09:23:31)
Command line: -device ARM9
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 2331
SWO raw output listening port: 2332
Terminal I/O port: 2333
Accept remote connection: yes
Generate logfile: off
Verify download: off
Init regs on start: off
Silent mode: off
Single run mode: off
Target connection timeout: 0 ms
------J-Link related settings------
J-Link Host interface: USB
J-Link script: none
J-Link settings file: none
------Target related settings------
Target device: ARM9
Target interface: JTAG
Target interface speed: 4000kHz
Target endian: little
Connecting to J-Link...
Connecting to J-Link failed. Connected correctly?
GDBServer will be closed...
Shutting down...
Could not connect to J-Link.
Please check power, connection and settings.
Result of lsusb:
Bus 004 Device 002: ID 8087:8002 Intel Corp.
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:800a Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 003: ID 17aa:1034 VIA Labs, Inc. USB Hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 002: ID 17aa:1034 VIA Labs, Inc. USB Hub
Bus 002 Device 020: ID 04b4:0007 Cypress Semiconductor Corp. USB-Serial (Dual Channel)
Bus 002 Device 021: ID 04b4:00f3 Cypress Semiconductor Corp. WestBridge
Bus 002 Device 005: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 002 Device 004: ID 045e:0745 Microsoft Corp. Nano Transceiver v1.0 for Bluetooth
Bus 002 Device 003: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
My kernel:
Linux archtower 5.5.8-arch1-1 #1 SMP PREEMPT Fri, 06 Mar 2020 00:57:33 +0000 x86_64 GNU/Linux
您好:
FX3增加I2C EEPROM
請問哪裡可以取得CODE,燒入EEPROM可讓FX3可以WORK?
感謝
Dear all,
I am using the FX3-USB3014 to capture MPEG2 TS data from LG electronics demodulator IC.
Because there is no flow control mechanism between FX3-GPIFII and demodulator output,
so I adopted the 2 thread ping-pong DMA structure and similar GPIF II state machine as explained in application note AN-75779 UVC image sensor examples.
I don't have any need to change the stream data, then I created AUTO Many-to-ONE DMA channels, and 4 buffers each thread, each buffer has 16KB(16384 bytes) size.
This is my DMA channel creation,
// Create a multi-DMA AUTO channel for the GPIF to USB transfer
CyU3PMemSet((uint8_t *)&dmaMultiConfig, 0, sizeof(dmaMultiConfig));
dmaMultiConfig.size = 16384;
dmaMultiConfig.count = 4;
dmaMultiConfig.validSckCount = 2; // Number of producer sockets
dmaMultiConfig.prodSckId[0] = (CyU3PDmaSocketId_t)PING_PRODUCER_SOCKET;
dmaMultiConfig.prodSckId[1] = (CyU3PDmaSocketId_t)PONG_PRODUCER_SOCKET;
dmaMultiConfig.consSckId[0] = (CyU3PDmaSocketId_t)CONSUMER_ENDPOINT_SOCKET;
dmaMultiConfig.dmaMode = CY_U3P_DMA_MODE_BYTE;
Status = CyU3PDmaMultiChannelCreate(&glDualGPIF2USB_Handle, CY_U3P_DMA_TYPE_AUTO_MANY_TO_ONE, &dmaMultiConfig);
When I captured the packets through EP1-IN (BULK IN transfer),
there is some data loss (or 1 byte more data) around each 16KB boundary of the captured data.
Yet, this data loss result is different from which types of valid signal is coming.
As I have tested, it is depends on the signal pattern of incoming "VALID" signal.
When the signal have 188-byte-length continuous style, like Fig. 1), there is NO data loss in capturing.
On the contrary, if the valid signal pattern is changed to like Fig 2), it has 4 or 5 clocks intervals between each valid signal,
every 16KB boundary , there is some data loss (about 6-bytes) or invalid data insertion in captured data.
Except the valid signal format, all other test conditions are same .
I have no idea why the data loss result is relevant to valid signal pattern.
I tried several version of GPIF II , including almost same version of AN 75779 UVC example, but the result was same.
Always data loss was occurered in Fig. 2 case in 16KB boundary.
If I changed the DMA buffer size to 8KB, then the data loss found in 8KB boundary.
Attached is the GPIF II source which is used.
I would appreciate any help I can get, so thanks in advance.
Thank you.
Sangcheol
Show Less
Hi,
We are working with an 10 bit RAW gray scale sensor and established a Video stream (1080p 30fps, WIn10). SeeRe: Setup MIPI connection between CX3 and OV2740
1. Do we need to care about differences in UVC1.1 and 1.5, since the generated Code seems to be 1.1.
2. We want to develop a Host application based ob Python3 and Opencv. If we use the Videocapture function, the frames are interpreted as 8bit, but the sensor is set to 16 bit mode with 10 bits used and 6 bits zeros. It follows, that intensitys higher than 255 are displayed black. Is there a way to capute a 16 bit image and normalize the gray values to 10 bit?
We want to set USB request via Python and Opencv to contoll exposure time (and other controls) (via cap.set(cv2.CAP_PROP_EXPOSURE, xyz)). Therefor we edited the cycx3_uvcdscr.c and the cycx3_uvc.c .
cycx3_uvcdscr.c:
/* Input (Camera) Terminal Descriptor */
0x2A,0x00,0x02, /* @kolja: found this in physical-hasher/bitmark-microscope at master · bitmark-inc/physical-hasher · GitHub */
// 0x00, 0x00, 0x00, /* No controls supported */
/*A bit set to 1 indicates that the
mentioned Control is supported for
the video stream.
D0: Scanning Mode, D1: Auto-Exposure Mode, D2: Auto-Exposure Priority, D3: Exposure Time(Absolute)
D4: Exposure Time(Relative) ........D18: Reserved, set to zero */
/* Processing Unit Descriptor */
0x01, 0x00, 0x00, /* No controls supported */
/*@kolja: edited this to 1 from 0
A bit set to 1 indicates that the mentioned
Control is supported for the video stream.
D0: Brightness, D1: Contrast, D2: Hue, D3: Saturation, D4: Sharpness....D18..(n*8-1): Reserved. Set to zero*/
3. For a start we want to control exposure. Which Descriptor needs to be set in /* Input (Camera) Terminal Descriptor */ and /* Processing Unit Descriptor */ ? I tried several, but the debug prints in Console does not mention the cap.set(cv2.CAP_PROP_EXPOSURE, xyz) request.
cycx3_uvc.c
Show LessHi,
i have a Enclustra PM3 with Mars ZX3 Zynq 7000 SoC
On PM3 Board a FX3 3014 is assembled.
Because of the given schematic I can't use GPIO29 als FV Pin.
In GPIF II Designer I have changed FV to GPIO21
The Zynq generate Video Timing for 720p Video Output
The Pixel Clock is 100MHz, so I get ~80 fps
The IIC Interface is connected to a AT24 EEPROM and the IIC address is changed.
The FX3 configures the Eeprom instead of the image sensor, this works.
But in AMCAP the is ablosutely no information shown aboaut the camera. The software says Acess denied.
Wehe I activate the DEBUG_PRINT_FRAME_COUNT the console says: UVC: Completed 0 frames and 0 buffers
What is going wrong?
Show LessHas anyone had success using the FX3 DMA fabric to do CPU to Parallel Port DMA operations?
CPU to/from USB socket MANUAL_OUT, MANUAL_IN mode DMA operation works...
USB to/from PPort socket MANUAL DMA operation works...as per AN65974 ( despite the timing diagram and text not matching the application code)
I have found examples for using CPU MANUAL_IN,MANUAL_OUT for Debug serial sockets, USB, etc. but no examples of Parallel Port operation with the CPU.
I would rather use the DMA fabric for transfers, rather than repetitive register reads/writes to the Parallel Interface.
Is the PPort<->CPU DMA fabric broken?
Show LessHello,
We are developing custom board with FX3. We took as example SuperSpeed Starter Kit schematics
In both modes I2C boot to USB fallback and USB boot devices enumeration occures: VID=0x000, PID=0x0002.
Currently our I2C EEPROM is empty.
So far we checked:
- AN70707
- AN76405
PMODE[2:0] checked:
- Z11
- 1ZZ
- Z1Z
Also external crystal is OK - 19.2MHz
All VDD, VIO, etc.. also good
Is there anything else that should be checked?
Thanks
Show Less