All Forums
Browse the Community
USB
Universal Serial Bus (USB) forums have discussions regarding Low-Full & High Speed Peripherals, Superspeed Peripherals, USB Hosts Hubs Transceivers, and USB EZ-PD Type C product solutions for PCs and consumer device topics.
Wireless Connectivity
Power
Sensors
Memories
Memory Discussion Forums discussions regarding NOR Flash, SRAM, nvSRAM and F-RAM - performance and reliability with discrete memory densities ranging from 4K-bit to 2G-bit topics.
Other Technologies
Discussion forum regarding Other Technologies including Power Management and Clocks topics.
Security & Smart Card
Radio Frequency (RF)
Software
Software including ModusToolbox, PSoC Creator, WICED Studios and Wi-Fi Bluetooth for Linux .
Applications
Battery Management ICs
Infineon's TLE9012DQU is a multi channel battery monitoring and balancing IC for various lithium-ion battery applications, with integral functions like voltage and temperature measurement, cell balancing, and isolated communication with the main battery controller, including self-diagnosis features. The TLE9015DQU iso UART Transceiver IC is used in battery systems for enabling the communication between the main microcontroller and multiple TLE9012DQU units in a daisy-chain configuration. This forum welcomes discussions, queries, and insights on battery management systems and devices.
Featured Discussions
Hi,
I modified the example project "CE220762_PDM_I2S" so that it would continuously stream sound instead of allowing for recording and then playing the sound. Now I want to do some audio signal processing before playing it. After every time the DMA has completed transferring the N_Samples (256 in the attached project), an interrupt is generated. From my understanding, this should be triggered every 256 * (1/(sampling rate of PDM)). So with sampling rate of 8 Ksps as set in the attached project, the interrupt should be generated every 32 ms. Hence I should have about 32 ms for audio signal processing. However, when I put a delay ( just for testing purpose ) of anything more than about 125 us, I start hearing a noise in the audio streaming indicating that the interrupt is generating about every 125 us. Is my understanding incorrect or have I not implemented the DMA and the PDM/PCM block correctly ?
Kind regards,
Shams
Show LessHi there,
Anybody from cypress could clarify what kind of checksum is stored in ".cymeta" section by cyelftool, and what does it checksum?
It seems to change the third dowrd, the one at 0x90500008, from 0 to some 32bit number.
Regards
Show LessI don't unstand the API method of AltIntfcCount();
The explain is:
This function returns the number of alternate interfaces exposed by the device.
The primary interface (AltSetting == 0) is not counted as an alternate interface.
IN the descriptor it has a interface
but in the bulkloop application ,why it +1;,the result is 1
int interfaces = this->m_selectedUSBDevice->AltIntfcCount()+1;
Show Less
Hi,
I'm trying to convert AN75779 example to Isochronous. I followed your existing examples UVCVideoClass and FX3UVCDemo_BULK_ISO to convert the AN75779 sample to isochronous. After the modification, the windows (Windows 10) can see the device as a UVC. But when I open the webcam viewer app (Camera/VLC player) it doesn't display any video. On UART terminal, I can see UVC: Completed x frame and y buffers as debug output. But viewer can't display any video to the screen. I'm sending 640x480 at 15 frame rate on USB 3.0 as well. Could you please let me know what might be causing this issue? I'm also attaching my project with this email. If you can help on this issue would be greatly appreciated.
/* UVC Probe Control Settings for a USB 3.0 connection. */
uint8_t glProbeCtrl[CY_FX_UVC_MAX_PROBE_SETTING] = {
0x00, 0x00, /* bmHint : no hit */
0x01, /* Use 1st Video format index */
0x01, /* Use 1st Video frame index */
// 0x15, 0x16, 0x05, 0x00, /* Desired frame interval in the unit of 100ns: 30 fps */
0x2A, 0x2C, 0x0A, 0x00,
0x00, 0x00, /* Key frame rate in key frame/video frame units: only applicable
to video streaming with adjustable compression parameters */
0x00, 0x00, /* PFrame rate in PFrame / key frame units: only applicable to
video streaming with adjustable compression parameters */
0x00, 0x00, /* Compression quality control: only applicable to video streaming
with adjustable compression parameters */
0x00, 0x00, /* Window size for average bit rate: only applicable to video
streaming with adjustable compression parameters */
0x00, 0x00, /* Internal video streaming i/f latency in ms */
// 0x00, 0x48, 0x3F, 0x00, /* Max video frame size in bytes */
0x00, 0x60, 0x09, 0x00,
0x00, 0x0C, 0x00, 0x00, /* No. of bytes device can rx in single payload = 16 KB */
#ifndef FX3_UVC_1_0_SUPPORT
/* UVC 1.1 Probe Control has additional fields from UVC 1.0 */
0x00, 0x60, 0xE3, 0x16, /* Device Clock */
0x00, /* Framing Information - Ignored for uncompressed format*/
0x00, /* Preferred payload format version */
0x00, /* Minimum payload format version */
0x00 /* Maximum payload format version */
#endif
};
Here are the changes I made to the code
endPointConfig.enable = 1;
// endPointConfig.epType = CY_U3P_USB_EP_BULK;
endPointConfig.epType = CY_U3P_USB_EP_ISO;
endPointConfig.pcktSize = CY_FX_EP_BULK_VIDEO_PKT_SIZE;
endPointConfig.isoPkts = 1;
//endPointConfig.burstLen = 16;
endPointConfig.burstLen = 3;
endPointConfig.streams = 0;
dmaMultiConfig.size = 3 * 0x400;//3 * 0x400;//CY_FX_UVC_STREAM_BUF_SIZE;
dmaMultiConfig.count = 16;//CY_FX_UVC_STREAM_BUF_COUNT;
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 = 12; /* 12 byte UVC header to be added. */
dmaMultiConfig.prodFooter = 132; /* 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_PROD_EVENT | CY_U3P_DMA_CB_CONS_EVENT;
dmaMultiConfig.cb = CyFxUvcApplnDmaCallback;
apiRetStatus = CyU3PDmaMultiChannelCreate (&glChHandleUVCStream, CY_U3P_DMA_TYPE_MANUAL_MANY_TO_ONE,
&dmaMultiConfig);
/* Super Speed Configuration Descriptor */
const uint8_t CyFxUSBSSConfigDscr[] =
{
/* Configuration Descriptor Type */
0x09, /* Descriptor Size */
CY_U3P_USB_CONFIG_DESCR, /* Configuration Descriptor Type */
0xE3,0x00, /* Length of this descriptor and all sub descriptors */
0x02, /* Number of interfaces */
0x01, /* Configuration number */
0x00, /* Configuration string index */
0x80, /* Config characteristics - Bus powered */
0x32, /* Max power consumption of device (in 8mA unit) : 400mA */
/* Interface Association Descriptor */
0x08, /* Descriptor Size */
CY_FX_INTF_ASSN_DSCR_TYPE, /* Interface Association Descr Type: 11 */
0x00, /* I/f number of first VideoControl i/f */
0x02, /* Number of Video i/f */
0x0E, /* CC_VIDEO : Video i/f class code */
0x03, /* SC_VIDEO_INTERFACE_COLLECTION : Subclass code */
0x00, /* Protocol : Not used */
0x00, /* String desc index for interface */
/* Standard Video Control Interface Descriptor */
0x09, /* Descriptor size */
CY_U3P_USB_INTRFC_DESCR, /* Interface Descriptor type */
0x00, /* Interface number */
0x00, /* Alternate setting number */
0x01, /* Number of end points */
0x0E, /* CC_VIDEO : Interface class */
0x01, /* CC_VIDEOCONTROL : Interface sub class */
0x00, /* Interface protocol code */
0x00, /* Interface descriptor string index */
/* Class specific VC Interface Header Descriptor */
0x0D, /* Descriptor size */
0x24, /* Class Specific I/f Header Descriptor type */
0x01, /* Descriptor Sub type : VC_HEADER */
0x10, 0x01, /* Revision of UVC class spec: 1.1 - Minimum version required
for USB Compliance. Not supported on Windows XP*/
0x51, 0x00, /* Total Size of class specific descriptors (till Output terminal) */
0x00,0x6C,0xDC,0x02, /* Clock frequency : 48MHz(Deprecated) */
0x01, /* Number of streaming interfaces */
0x01, /* Video streaming I/f 1 belongs to VC i/f */
/* Input (Camera) Terminal Descriptor */
0x12, /* Descriptor size */
0x24, /* Class specific interface desc type */
0x02, /* Input Terminal Descriptor type */
0x01, /* ID of this terminal */
0x01,0x02, /* Camera terminal type */
0x00, /* No association terminal */
0x00, /* String desc index : Not used */
0x00,0x00, /* No optical zoom supported */
0x00,0x00, /* No optical zoom supported */
0x00,0x00, /* No optical zoom supported */
0x03, /* Size of controls field for this terminal : 3 bytes */
/* A bit set to 1 in the bmControls field 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)
* D5: Focus (Absolute)
* D6: Focus (Relative)
* D7: Iris (Absolute)
* D8: Iris (Relative)
* D9: Zoom (Absolute)
* D10: Zoom (Relative)
* D11: PanTilt (Absolute)
* D12: PanTilt (Relative)
* D13: Roll (Absolute)
* D14: Roll (Relative)
* D15: Reserved
* D16: Reserved
* D17: Focus, Auto
* D18: Privacy
* D19: Focus, Simple
* D20: Window
* D21: Region of Interest
* D22 – D23: Reserved, set to zero
*/
0x00,0x00,0x00, /* bmControls field of camera terminal: No controls supported */
/* Processing Unit Descriptor */
0x0D, /* Descriptor size */
0x24, /* Class specific interface desc type */
0x05, /* Processing Unit Descriptor type */
0x02, /* ID of this terminal */
0x01, /* Source ID : 1 : Connected to input terminal */
0x00,0x40, /* Digital multiplier */
0x03, /* Size of controls field for this terminal : 3 bytes */
0x01,0x00,0x00, /* bmControls field of processing unit: Brightness control supported */
0x00, /* String desc index : Not used */
0x00, /* Analog Video Standards Supported: None */
/* Extension Unit Descriptor */
0x1C, /* Descriptor size */
0x24, /* Class specific interface desc type */
0x06, /* Extension Unit Descriptor type */
0x03, /* ID of this terminal */
0xFF,0xFF,0xFF,0xFF, /* 16 byte GUID */
0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,
0x00, /* Number of controls in this terminal */
0x01, /* Number of input pins in this terminal */
0x02, /* Source ID : 2 : Connected to Proc Unit */
0x03, /* Size of controls field for this terminal : 3 bytes */
0x00,0x00,0x00, /* No controls supported */
0x00, /* String desc index : Not used */
/* Output Terminal Descriptor */
0x09, /* Descriptor size */
0x24, /* Class specific interface desc type */
0x03, /* Output Terminal Descriptor type */
0x04, /* ID of this terminal */
0x01,0x01, /* USB Streaming terminal type */
0x00, /* No association terminal */
0x03, /* Source ID : 3 : Connected to Extn Unit */
0x00, /* String desc index : Not used */
/* Video Control Status Interrupt Endpoint Descriptor */
0x07, /* Descriptor size */
CY_U3P_USB_ENDPNT_DESCR, /* Endpoint Descriptor Type */
CY_FX_EP_CONTROL_STATUS, /* Endpoint address and description */
CY_U3P_USB_EP_INTR, /* Interrupt End point Type */
0x40,0x00, /* Max packet size = 64 bytes */
0x01, /* Servicing interval */
/* Super Speed Endpoint Companion Descriptor */
0x06, /* Descriptor size */
CY_U3P_SS_EP_COMPN_DESCR, /* SS Endpoint Companion Descriptor Type */
0x00, /* Max no. of packets in a Burst : 1 */
0x00, /* Attribute: N.A. */
0x04, 0x00, /* Bytes per interval:1024 */
/* Class Specific Interrupt Endpoint Descriptor */
0x05, /* Descriptor size */
0x25, /* Class Specific Endpoint Descriptor Type */
CY_U3P_USB_EP_INTR, /* End point Sub Type */
0x40,0x00, /* Max packet size = 64 bytes */
/* Standard Video Streaming Interface Descriptor (Alternate Setting 0) */
0x09, /* Descriptor size */
CY_U3P_USB_INTRFC_DESCR, /* Interface Descriptor type */
0x01, /* Interface number */
0x00, /* Alternate setting number */
0x00, /* Number of end points */
0x0E, /* Interface class : CC_VIDEO */
0x02, /* Interface sub class : CC_VIDEOSTREAMING */
0x00, /* Interface protocol code : Undefined */
0x00, /* Interface descriptor string index */
/* Class-specific Video Streaming Input Header Descriptor */
0x0E, /* Descriptor size */
0x24, /* Class-specific VS I/f Type */
0x01, /* Descriptotor Subtype : Input Header */
0x01, /* 1 format desciptor follows */
0x47,0x00, /* Total size of Class specific VS descr */
CY_FX_EP_BULK_VIDEO, /* EP address for BULK video data */
0x00, /* No dynamic format change supported */
0x04, /* Output terminal ID : 4 */
0x00, /* Still image capture method 1 supported */
0x00, /* Hardware trigger NOT supported */
0x00, /* Hardware to initiate still image capture NOT supported */
0x01, /* Size of controls field : 1 byte */
0x00, /* D2 : Compression quality supported */
/* Class specific Uncompressed VS format descriptor */
0x1B, /* Descriptor size */
0x24, /* Class-specific VS I/f Type */
0x04, /* Subtype : uncompressed format I/F */
0x01, /* Format desciptor index */
0x01, /* Number of frame descriptor followed */
0x59,0x55,0x59,0x32, /* GUID used to identify streaming-encoding format: YUY2 */
0x00,0x00,0x10,0x00,
0x80,0x00,0x00,0xAA,
0x00,0x38,0x9B,0x71,
0x10, /* Number of bits per pixel */
0x01, /* Optimum Frame Index for this stream: 1 */
0x10, /* X dimension of the picture aspect ratio; Non-interlaced */
0x09, /* Y dimension of the pictuer aspect ratio: Non-interlaced */
0x00, /* Interlace Flags: Progressive scanning, no interlace */
0x00, /* duplication of the video stream restriction: 0 - no restriction */
/* Class specific Uncompressed VS frame descriptor */
0x1E, /* Descriptor size */
0x24, /* Descriptor type*/
0x05, /* Subtype: uncompressed frame I/F */
0x01, /* Frame Descriptor Index */
0x00, /* Still image capture method 1 supported */
// 0x00, 0x05, /* Width in pixel */
// 0xD0, 0x02, /* Height in pixel */
0x80,0x02, /* Width in pixel: 320-QVGA */
0xE0,0x01,
//0x00,0x50,0x97,0x31, /* Min bit rate bits/s. */
//0x00,0x50,0x97,0x31, /* Max bit rate bits/s. */
0x00,0x00,0x05,0x46,
0x00,0x00,0x05,0x46,
0x00,0xA4,0x1F,0x00, /* Maximum video or still frame size in bytes(Deprecated)*/
0x2A,0x2C,0x0A,0x00, /* Default Frame Interval */
0x01, /* Frame interval(Frame Rate) types: Only one frame interval supported */
0x2A,0x2C,0x0A,0x00, /* Shortest Frame Interval */
// 0x15, 0x16, 0x05, 0x00, /* 30fps */
// 0x01,
// 0x15,0x16,0x05,0x00,
/* Standard video streaming interface descriptor (Alternate setting 1) */
0x09, /* Descriptor size */
CY_U3P_USB_INTRFC_DESCR, /* Interface descriptor type */
0x01, /* Interface number */
0x01, /* Alternate setting number */
0x01, /* Number of end points : 1 ISO EP */
0x0E, /* Interface class : CC_VIDEO */
0x02, /* Interface sub class : CC_VIDEOSTREAMING */
0x00, /* Interface protocol code : Undefined */
0x00, /* Interface descriptor string index */
/* Endpoint Descriptor for BULK Streaming Video Data */
0x07, /* Descriptor size */
CY_U3P_USB_ENDPNT_DESCR, /* Endpoint Descriptor Type */
CY_FX_EP_BULK_VIDEO, /* Endpoint address and description */
CY_U3P_USB_EP_ISO | 0x04, /* BULK End point */
0x00, /* EP MaxPcktSize: 1024B */
0x04, /* EP MaxPcktSize: 1024B */
0x01, /* Servicing interval for data transfers */
/* Super Speed Endpoint Companion Descriptor */
0x06, /* Descriptor size */
CY_U3P_SS_EP_COMPN_DESCR, /* SS Endpoint Companion Descriptor Type */
CY_FX_EP_ISO_VIDEO_SS_BURST - 1, /* Max number of packets per burst: 16 */
CY_FX_EP_ISO_VIDEO_SS_MULT - 1, /* Attribute: Streams not defined */
0x00, /* No meaning for bulk */
0x04 * CY_FX_EP_ISO_VIDEO_PKTS_COUNT
};
Where can I find source code and PSoc Creator project files for CY5677
I am working with Kit-037 right now. The example project "Sensorless FOC Motor Control" works correctly.
Now I want to modify it so the position is obtained by an encoder.
If I'm right, the position and speed are now calculated by this function: MotorPll_PostionEstimate(), which I think uses the structure Motor_stcPll as an output.
I already have a quadrature decoder running so I know the angle at any given time.
I have 2 questions:
- If I stop using MotorPll_PostionEstimate(), what variables should I update with my calculated angle and speed? The structure Motor_stcPll has a lot of variables, which one should I modify?
- I have seen that another board has a similar code to control a BLDC using an encoder, but the code I'm interested in is in a .a file. Is there a way for me to see that code so I know what variables should I modify?
Thanks
Show LessHi,
I'm using the Cypress Kit 037 to control a BLDC motor, and now I want to use an encoder to obtain the angle instead of using the observer.
I saw that the FM4-U120-9B560 has a code example of what I want to do (FOC with encoder), so I downloaded the AN, User Guide and software available here.
But the User Guide states in page 11 the files available in the s04_app folder. They can be seen too in page 23, Figure 6-10. These files are not present in the folder I got. Even when using the IAR Embedded Workbench IDE, all I can see is this:
I'm interested in the code that obtains the angle from the encoder. Where can I find it?
Thanks
Show LessThis is my data flow for my system:
Because i can not found a demo to config a raw16, and i did not found the enum type "enum CyU3PMipicsiDataFormat_t " which not contain a RAW16type,
so i did't known how to transfer my raw16 data to the host.
I try to use the yuv422 configuration to transfer my raw data to the host, and i really received data from the CX3 by e-cam, but the image is wrong for the e-cam use the yuv2 formating to resolve the raw data. And now I think i can use the matlab to grap a frame and deal with it. But when i use the matlab getting a snashot and i found the data is a
type like this: 1280*800*3(full frame size:1280x800). Is it the matlab regard as a yuv data? and how can i config the cx3 to support raw16 or how to deal with the data i grap from the cx3 with the yuv format transfer.
Is there any other developer meet the requirement like me?
Show LessAre PN: S25FS512SDSBHV210 and S25FL128SAGBHI2? I think they are, but I need some verification. I'm using the S25FL128SAGBHI2 in a current design and want to reuse the component symbol and footprint.
Show LessHi,
we use the FX3 in device mode and encounter transmission problems depending on what cable we are using.
Is there any possibility to query the number of rejected USB packages due to CRC errors in the FX3 firmware by using the API?
Thanks
Matthias
Show Less-
TraveoII
UART buadrate Setting
by chandan1995 Jun 19, 2023