Version: **
This document describes how to handle the CYU3P_USBEP_SS_RESET_EVT in EZ-USB™ FX3 firmware.
This event can occur only for an IN endpoint when many USB 3 protocol-level retries occur on the bus due to a bad cable or bad testing/running environment (where there can be protocol-level CRC errors).
Do the following to handle the event:
Step 1:
Register the endpoint event callback in the firmware to check if this event is triggered. Use the CyU3PUsbRegisterEpEvtCallback()API to register the endpoint callback.
Usage:
CyU3PUsbRegisterEpEvtCallback (CyU3PUsbEpEvtCb_t cbFunc, uint32_t eventMask, uint16_t outEpMask, uint16_t inEpMask);
cbFunc : Callback function pointer
eventMask: The enumeration of different endpoint events are as follows:
To generate the callback for CYU3P_USBEP_SS_RESET_EVT, set the eventMask as 0x0100. To generate the callback for both CYU3P_USBEP_SS_RESET_EVT and CYU3P_USBEP_SS_RETRY_EVT, set the eventMask as 0x0110.
outEpMask: Bitmap variable representing the OUT endpoints whose events are to be enabled. Bit 1 represents EP 1-OUT, 2 represents EP 2-OUT, and so on.
inEpMask: Bitmap variable representing the IN endpoints whose events are to be enabled. Bit 1 represents EP 1-IN, 2 represents EP 2-IN, and so on.
Note: See the example in the following path of the FX3 SDK where this callback is registered and the event is handled for two IN Endpoints:
[FX3_Installation_Path]\EZ-USB FX3 SDK\1.3\firmware\basic_examples\cyfxgpiftousb
Step 2:
This event is endpoint-specific. When this event occurs for an endpoint, the specific IN endpoint must be stalled. See the following code snippet:
if (evtype == CYU3P_USBEP_SS_RESET_EVT)
{
if (epNum == CY_FX_EP_CONSUMER)
{
CyU3PDebugPrint (2, "Halting USB Streaming EP: %d\r\n", BulkRstCnt++);
CyU3PUsbStall (CY_FX_EP_CONSUMER, CyTrue, CyFalse);
}
if (epNum == CY_FX_EP_LOOP_IN)
{
CyU3PDebugPrint (2, "Halting USB Loopback EP: %d\r\n", LoopRstCnt++);
CyU3PUsbStall (CY_FX_EP_LOOP_IN, CyTrue, CyFalse);
}
}
Step 3:
When the IN endpoint is stalled, the API in the host application that requests the data on this endpoint fails; the error code indicates Endpoint Stall.
In that case, the host application should send a CLEAR_FEATURE request targeting this specific IN endpoint (for which the data request failed).
When CLEAR_FEATURE is received, the FX3 firmware should have the following handler:
if ((bTarget == CY_U3P_USB_TARGET_ENDPT) && (bRequest == CY_U3P_USB_SC_CLEAR_FEATURE)
&& (wValue == CY_U3P_USBX_FS_EP_HALT))
{
if (glIsApplnActive)
{
if (wIndex == CY_FX_EP_CONSUMER)
{
CyU3PUsbSetEpNak (CY_FX_EP_CONSUMER, CyTrue);
CyU3PBusyWait (125);
CyU3PDmaChannelReset (&glDmaChHandle);
CyU3PUsbFlushEp(CY_FX_EP_CONSUMER);
CyU3PUsbResetEp (CY_FX_EP_CONSUMER);
CyU3PDmaChannelSetXfer (&glDmaChHandle, CY_FX_GPIFTOUSB_DMA_TX_SIZE);
CyU3PUsbStall (wIndex, CyFalse, CyTrue);
CyU3PUsbSetEpNak (CY_FX_EP_CONSUMER, CyFalse);
isHandled = CyTrue;
CyU3PUsbAckSetup ();
}
Both these code snippets are implemented in the gpiftousb example ([FX3_Installation_Path]\EZ-USB FX3 SDK\1.3\firmware\basic_examples\cyfxgpiftousb)
Note: See also Section 2.3.IV of the FX3 SDK troubleshooting guide in addition to this article:
[FX3_Installation_Path]\EZ-USB FX3 SDK\1.3\doc\firmware\ FX3_SDK_TroubleShooting_Guide.pdf
Show Less
Version: **
Question: Is it possible to stream video from two image sensors using one EZ-USB™ FX3?
Answer:
Yes. You can use a FX3+FPGA solution. A slave FIFO interface can be used to communicate with the FPGA
(refer to AN65974 - Designing with the EZ-USB FX3 Slave FIFO Interface for more details on slave FIFO interface). Streaming from two image sensors using one FX3 can be done by creating two DMA channels.
For example, if two DMA channels created are as follows:
DMA channel - 1 with Producer sockets as CY_U3P_PIB_SOCKET_0, CY_U3P_PIB_SOCKET_1 and Consumer socket as CY_U3P_UIB_SOCKET_CONS_1
DMA channel - 2 with Producer sockets as CY_U3P_PIB_SOCKET_2, CY_U3P_PIB_SOCKET_3 and Consumer socket as CY_U3P_UIB_SOCKET_CONS_2
The FPGA can maintain two FIFOs to store data from the two image sensors. The FPGA code should change the address lines (A0 & A1) depending upon the FIFO from which it fetches the data from and send to FX3.
The sensor1 data should be stored in FIFO 1 of the FPGA and sensor2 data should be stored in FIFO 2 of the FPGA.
During the blanking period, FPGA can switch the FIFO and change the address lines to select the appropriate DMA channel of FX3 for streaming the data; that is, if the data is coming from FIFO 1, the 2-bit address line A0:A1 should be driven with 00 or 01 alternatively i.e. in ping-pong manner to select CY_U3P_PIB_SOCKET_0 or CY_U3P_PIB_SOCKET_1 of DMA channel 1.
Similarly, if the data is coming from FIFO 2, then the FPGA should drive the 2-bit address lines A0:A1 as 10 or 11 alternatively to select CY_U3P_PIB_SOCKET_2 or CY_U3P_PIB_SOCKET_3 of DMA channel 2.
Note: Refer to sections 3 and 4 of the AN75779 - How to implement an image sensor interface using EZ-USB FX3 in a USB video class (UVC) framework to understand ping-pong DMA buffer.
The video data received by the PIB sockets corresponding to the DMA channel as mentioned in the above example, will be transferred to USB block through DMA channel. As two video streams from two sensors will be streamed using two DMA channels, the device should enumerate as a composite device with two UVC interfaces i.e. FX3-UVC-1 and FX3-UVC-2. In the host application like AmCap, VLC media player, user will get option to choose a UVC interface to start streaming video. If streaming from both the sensors is to be started simultaneously, two instances of host application should be opened and appropriate UVC interface should be selected.
Figure 1. Composite device with two UVC interface
For the device to enumerate with two UVC interfaces, the USB descriptors should be modified to support two sets of UVC descriptors. In addition to this, the firmware should also handle UVC specific requests for both the interfaces.
A template firmware with two UVC interfaces and UVC specific request handling is attached with this KBA. The header file for GPIF state machine (cyfxgpif2config.h) used with the firmware is a dummy state machine. The user is expected to use a custom GPIF state machine header file based on the application. Two CY_U3P_DMA_TYPE_MANUAL_MANY_TO_ONE DMA channels are used in the firmware to stream two 640* 480 (VGA) YUY2 at 30 FPS video streams. As per the default AN75779 UVC firmware, the UVC header is added in the firmware. The cyu3imagesensor.c and cyu3imgagesensor.h are also created and saved in this project. The cyu3imagesensor.c file is used to configure and control the image sensor and FPGA. In this file, some structures are defined without a valid value. You need to replace these values with actual settings. Generally, used APIs such as CyFx3_ImageSensor_Sleep, CyFx3_ImageSensor_Wakeup, and CyFx3_ImageSensor_Trigger_Autofocus are also available the cyu3imagesensor.c and cyu3imagesensor.h files. Add the corresponding codes into these definitions.
Note: The firmware attached with the KBA is a template project and should be modified according to user application.
Version: *A
A reference design kit based on Infineon’s EZ-USB™ CX3 USB 3.0 camera controller and EN801/EN805 image signal processor (ISP) from the Eyenix website. This camera kit uses an IMX307 image sensor from Sony with a manual focus lens.
Figure 1. Kit block diagram
Eyenix ISP has a 4-lane MIPI-CSI2 RX interface for connecting image sensors and a 4-lane MIPI CSI-2 TX interface for connecting to EZ-USB™ CX3.
Infineon EZ-USB™ CX3 enables USB 3.0 connectivity to EN801/EN805 using a MIPI-CSI2 interface with data speed up to 1 Gbps per lane.
Figure 2. Kit photo
Key features of the kit:
Eyenix EN801/EN805 ISP has the following features:
The kit also supports control through an on-screen display (OSD) menu. This menu can be navigated using the Python-based camera control tool as shown in Figure 3. The tool controls the ISP menu via USB CDC class through a PC.
Figure 3. Menu control tool
Figure 4. On-screen display (OSD) menu
See the Eyenix website for more information on this camera control software and applications including surveillance cameras, webcams, document scanners, and machine vision systems.
Version: **
Infineon recommends that you isolate the sensor from vibration sources. The operating frequency of the sensor is 40 Hz. If vibration is expected at exactly 40 Hz with very high acceleration (≤ 0.3 g), you should do the following to minimize the vibration impact:
However, for a typical application, the impact of vibration is minimal. As shown in Figure 2, for a test setup with three sensors mounted on a commercially available air purifier, the test result shows that with the denoiser filter enabled, the sensor is robust against the vibration generated by a different fan of the air purifier.
Figure 2. Vibration robustness of XENSIVTM PAS CO2
For more details, visit the CO2 sensor website and see the application note, General design in guidelines for XENSIV™ PAS CO2 sensor.
Figure 3. Impact of CO2 on the human body at various concentration levels
Source
One such setup is as follows:
Evaluation kits are already available with major distributors.
Figure 4. Average power consumption
For more information, see Section 3 of the application note, XENSIV™ PAS CO2 for low-power applications.
With the automatic baseline offset correction (ABOC) feature enabled, the sensor accuracy drifts by 1% every year.
Figure 5. Values of pressure and acoustic stability
See Section 4.1.5 - Transfer function table in the datasheet.
Each sensor is calibrated during our production for the complete operating range. Production calibration is done with highly accurate CO2 gas bottle and verified with an ideal reference sensor.
The sensor might show small amount of offset after assembly due to stress generated from the assembly process on the light source. Therefore, to get the best performance, this offset should be corrected using either FCS or ABOC.
For the FCS calibration, you need to have a reference sensor. In the ABOC mechanism, the device keeps track of the minimum value recorded over a week. The offset to the reference baseline is computed and used to calculate the correction factor to be applied for the week after.
Figure 6. Operation of the ABOC feature
See the application note, After-assembly calibration scheme for XENSIV™ PAS CO2 for more details.
Figure 7. Airflow direction
See the application note, General design in guidelines for XENSIV™ PAS CO2 sensor for details.
Note: For more information, see the Community webpage for CO2 sensor where you can find answers to your questions and ask your own.
Version: **
Q1) What is Driver Signing?
Windows device installation uses digital signatures to verify the integrity of driver packages and to verify the identity of the vendor (software publisher) who provides the driver packages. In addition, the kernel-mode code signing policy for 64-bit versions of Windows Vista and later versions of Windows specifies that the kernel-mode driver must be signed for the driver to load.
All drivers for Windows 10 (starting with version 1507, Threshold 1) signed by the Hardware Dev Center are SHA2 signed. For details specific to operating system versions, see Signing requirements by version.
Q2) What is Driver resell or sharing a driver with Partner?
Driver resell is a process through which non-Microsoft organizations shares their Microsoft logo certified driver product with their customers and Partners. This process aids the partners to modify the driver package and get Microsoft Certification quickly without running certification test. This driver resell process follows Microsoft Driver Update Acceptable (DUA) process. So, driver package modification has few restrictions that are set by Microsoft DUA process.
Through this process, Cypress shares the Microsoft driver logo certification to the customer through the Windows Hardware Dashboard. By opting for driver resell, there is no need to run HLK compliance test for simple INF changes.
Q3) Why is Driver resell required?
Cypress provides device drivers for use with its USB devices and Bridge controllers ICs. These drivers are available for a number of Operating systems. However, many customers are interested in changing these drivers to reflect their corporate identity through custom USB VID, PID, product names, company names etc. This can be done by editing the driver INF files. However, the original driver logo certification gets cancelled due to the INF file changes.
This is when the customers can opt for Driver resell. The customers can obtain Microsoft certification for their device drivers.
Q4) What are the pre-requisites when opting for Driver resell?
Please refer to the following weblinks from Microsoft to understand about registering in the Windows Hardware Dashboard and obtaining an EV certificate:
>> https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/get-a-code-signing-certificate
After creating an account in the Windows Hardware Dashboard, kindly reach out to Technical Support and provide the following details:
Q5) What are a few points to ensure while submitting the modified driver package?
Kindly check the Drivers folder in the FX3 SDK: https://www.cypress.com/documentation/software-and-drivers/ez-usb-fx3-software-development-kit
Q6) Does Cypress performs driver resell for both the Cypress CDC (Virtual COM port) driver and cyusb3 driver?
Yes, we do driver resell (Redistribution) for both CDC (Virtual COM port) driver and cyusb3 driver. The driver resell process is the same for both drivers.
Q7) Does Cypress sign the driver files and create a new CAT file?
No, we do not sign the CAT file. Cypress is not allowed to sign driver package containing non-Cypress VID and PID due to legal constraints. We can help to sign drivers which contain only Cypress VID.
Q8) What should be done after receiving the driver package from Cypress?
Please refer to Section 3. Driver Resell in CyUSB.pdf (<Installation path>\EZ-USB FX3 SDK\1.3\doc\SuiteUSB\CyUSB.pdf) document present in EZ-USB FX3 SDK (https://www.cypress.com/documentation/software-and-drivers/ez-usb-fx3-software-development-kit
For details please refer to CyUSB.pdf in the EZ-USB FX3 SDK: https://www.cypress.com/documentation/software-and-drivers/ez-usb-fx3-software-development-kit
Windows Hardware Center Dashboard: https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/?redirectedfrom=MSDN
Version: **
Question:
The ToString operation with the CyUSBStorDevice class of the C# library (CYUSB.NET) returns wrong manufacturer and product string. How can we fix it?
Answer:
The support for the mass storage class has been removed from the C# library (CYUSB.NET). The details are still maintained in the documentation for the existing customers. It is not recommended to use this class in new designs.
Version: **
Normally, you can track the producer and consumer events in the DMA callback to verify that the consumer socket has no data in the queue and all committed buffers are consumed. If it is not possible to use this method, use the following alternative to verify that the consumer socket has no data in the queue and all the committed buffers are consumed.
Use this method when a certain amount of DMA transfers is completed, and no more producer events are expected. At this point, the consumer socket will be in stall state. The socket will be in stall state when it is waiting for data to be loaded into the Fetch Queue or waiting for an event. See sections 5.5.5 and 5.5.7 of EZ-USB FX3 Technical Reference Manual for more details.
Use the following code snippet to check to check for the stall status:
Note that it may not be a good idea to check for the stall status while a DMA transfer is ongoing because if the rate at which data is produced is significantly less than the rate at which the data is consumed, the socket goes to the stall state, waiting for more data.
English version: https://community.cypress.com/t5/Knowledge-Base-Articles/Port-applications-across-EZ-PD-PMG1-MCUs-KBA232685/ta-p/268600
Translated by:MaMi_1205306
Author: SananyaM_56 Version: **
このKBAでは、USB電力供給 (PD)に EZ-PD PMG1 (Power Delivery Microcontroller Gen1) MCUを使用するアプリケーションにUSB2.0データ機能を追加する方法について説明します。
1. PMG1-S0:
従来のUSB充電(BC1.2およびApple Charging)のサポートが必要な場合は、USB 2.0 D +、D-ラインをType-CコネクタからPMG1-S0 MCUに接続できます。 USB 2.0データの使用事例としては、システムのUSB2.0コントローラーに直接接続できます。
図1はレガシーUSB充電をサポートするためのPMG1-S0(部品番号:CYPM1011-24LQXI)との接続例を示しています。
図 1
2. PMG1-S1:
PMG1-S1 MCUは、従来の充電検出をサポートする内部USB 2.0アナログMUXをサポートします。 したがって、Type-CコネクタのD +、D-ピンの両方のセットをPMG1-S1に接続できます。 Type-C方向の検出に基づいて、対応するD +、D-(上/下)は、内部USB 2.0 MUXを使用してUSBDP_SYS、USBDM_SYSピンに経路が決定されます。 USBDP_SYS、USBDM_SYSピンを外部USB 2.0コントローラーに接続して、データ転送をサポートできます。
図2は、PMG1-S1(部品番号:CYPM1111-40LQXI)との接続例を示しています。
図 2
3. PMG1-S2:
PMG1-S2 MCUは、統合されたUSBフルスピードコントローラーが含まれています。 そのため、Type-CコネクタのD +、D-ピンをPMG1-S2のUSBDPピンとUSBDMピンに接続し、レガシー充電とUSB 2.0データの両方を可能にし、外部USB2.0コントローラーが不要になります。
図3は、PMG1-S2(部品番号:CYPM1211-40LQXI)との接続例を示しています。
図 3
Translated by: MaMi_1205306
Version: **
EZ-PD™PMG1 (Power Delivery Microcontroller Gen1)は、高電圧USB Power Delivery (USB PD)マイクロコントローラー(MCU)のファミリーです。これらのチップには、アナログおよびデジタル周辺機器に加えて、Arm®Cortex®M0PUおよびUSBPDコントローラーが含まれます。 PMG1デバイスのアプリケーション/ファームウェア開発は、ModusToolbox®ソフトウェア環境でサポートされています。
(https://www.cypress.com/products/modustoolbox-software-environment)
ModusToolboxは、アプリケーション開発サイクルにおける任意の時点で、あるボードから別のボードにアプリケーションを移植する柔軟性を提供します。 EZ-PD PMG1プロトタイピングキットを含むさまざまなMCUボード用のボードサポートパッケージ(BSP)を提供します。 BSPは、ボード/デバイスのハードウェアレベルの仕様を抽象化し、MCU /ボード全体で一貫性のあるAPIとマクロの共通セットを提供します。ミドルウェアとユーザーのアプリケーションは、BSPを使用してハードウェアを構成および制御できます。
ボードサポートパッケージは、次のもので構成されています。
表1にPMG1プロトタイピングキットとそれに対応するBSPを示します。ユーザーは特定のハードウェアボード用に独自のBSPを作成できます。
PMG1 MCU |
PMG1 Kit |
BSP |
CYPM1011-24LQXI |
CY7110 EZ-PD PMG1-S0 prototyping kit |
PMG1-CY7110 |
CYPM1111-40LQXI |
CY7111 EZ-PD PMG1-S1 prototyping kit |
PMG1-CY7111 |
CYPM1211-40LQXI |
CY7112 EZ-PD PMG1-S2 prototyping kit |
PMG1-CY7112 |
表1. EZ-PDPMG1プロトタイピングキットと対応するBSP
1つのMCU用で作成されたプロジェクトは、機能/機能/リソースの移植が新しいMCUでサポートされている場合、PMG1ファミリの他のMCUに移植できます。 PMG1 MCU間でプロジェクトを移植するには、次の手順を参照してください。
図1. Quick PanelのLibrary Manager
図2. LibraryManagerでプロジェクトを新しいBSPへ移植
図3. MakefileでTARGET名を変更
図4. launch comfigurationのR再生成
これで、図5に示すように、Device Configuratorが新しいBSPに更新されます。移植中に古いBSPで使用されていたリソース/機能が新しいBSPでもサポートされていることを確認してください。
図5. 新しいBSPに更新されたDevice configurator
Original KBA: FX3: USB transfers do not occur even after data is committed to USB socket – KBA231898
Translated by: Kenshow
タイトル: FX3:データがUSBソケットにコミットされた後でもUSB転送は発生しません– KBA231898
バージョン: **
FX3 SDK 1.3.4では、CyU3PConnectState() APIを使用してUSB接続を設定する前にUSBソケットに関連付けられたDMAチャネルを作成すると、USBソケットへのデータのコミットに成功してもUSB転送が発生しない場合があります(CyU3PDmaChannelCommitBuffer()またはCyU3PDmaMultiChannelCommitBuffer() APIはCY_U3P_SUCCESSを返します)。シナリオ例を図1と図2に示します。
図1. USBソケットにコミットされたDMAバッファを示すUARTデバッグプリント
図2. USBコントロールセンタからのUSBIN転送が失敗する
ノート:
この問題は、FX3 SDKリリースノートに記載されている既知の問題が原因で発生する可能性があり、USB デバイスモードでの接続開始時に USB ソケットに関連付けられた DMA チャンネルの設定が無効になる可能性があることに言及しています。
この問題を回避するには、CyU3PDmaChannelReset()またはCyU3PDma-MultiChannelReset()APIを使用してDMAチャネルをリセットし、各エニュメレートサイクルの後に再度有効にする必要があります。これは、CY_U3P_USB_EVENT_SETCONFイベントが発生したときに実行でき、USBデバイスが正常にエニュメレートされたことを示します。CY_U3P_USB_EVENT_SETCONFイベントの前に、USBソケットに関連付けられたDMAチャネルを使用しないでください。