Community Translated by NoTa_4591161 Version: **
Translation - English: Using CyU3PDebugPrint API to Send Debug Messages over USB-CDC Interface from FX3 Firmware – KBA231478
この記事は、AN75779-USBビデオクラス(UVC)フレームワークでEZ-USB®FX3™を使用してイメージセンサーインターフェイスを実装する方法に添付されているプロジェクトに基づいています。この記事を使用するには、この記事に関連付けられているZIPファイルをダウンロードして解凍する必要があります。
CyU3PDebugPrintのAPIは、専用のオンボードUART-USBブリッジデバイスを使用するのではなく、USB-CDCインターフェースを介してホストにデバッグメッセージを送信するために使用することができます。これを行うために、AN75779のファームウェアで次の変更が加えられます。
この関数は、CyFxUVCApplnUSBEventCB()でSET_CONFIGURATIONイベントが発生したときに呼び出されます。
これらの変更が加えられたファームウェアがFX3デバイスにプログラムされると、次のデバイスがホストに列挙され、デバイスマネージャーで次のように表示されます。
次のデバッグメッセージがターミナルに表示されます。
ファームウェアに次のコードがあるため、「cdc-debug-enabled」というメッセージが表示されます。アプリケーションに応じて変更できます。
注意:
Show Less
Community Translated by NoTa_4591161NoTa_4591161 Version: **
Translation - English: Using Auto channel for SPI transfers in FX3 – KBA230715
質問:プロデューサとしてSPI、コンシューマとしてUSBで自動チャネルを使用するにはどうすればよいですか?
回答:この記事に添付されているファームウェアプロジェクトでは、自動チャネルを実装するために、FX3SDKの次のパスで利用可能なUsbSpiDmaModeの例にいくつかの変更が加えられています。
C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\serialif_examples\cyfxusbspidmamode
注意:
テスト手順は次のとおりです。
付属のファームウェアでは、自動チャネルにはサイズ0x200のバッファ1つしかないため、データ長(wLength)> 0x200の読み取りはサポートされていません。プロデューサとしてSPIを使用する自動チャネルに複数のバッファがある場合の機能は、現在の説明の範囲外です。
USBホストによって0x200バイトがBulkINエンドポイントから読み取られる場合にのみ、接続されているファームウェアを参照してください。このイベントCY_U3P_DMA_CB_XFER_CPLTは、DMAコールバックで受信されます。
Show Less
Community Translated by: NoTa_4591161 Version: *A
Translation - English: CX3 Hardware: Frequently Asked Questions - KBA91295
回答:
1. 質問:CX3に単一のクロックソースを使用することは可能ですか?
回答:はい。19.2MHzの単一のクロックソースを使用することが可能です。このクロック入力は、「REFCLK」ピンと「CLKIN」ピンに接続する必要があります。「CLKIN32」はオプションの信号です。「ウォッチドッグ」機能を使用する場合は、32kHzクロック入力でこれを供給する必要があります。
2. 質問: CX3は、イメージセンサまたはイメージシグナルプロセッサの「クロック入力」として使用できる「クロックアウト」を提供できますか?
回答:CX3は、イメージセンサをテストするためだけにクロック出力信号「MCLK」を提供します。この信号は、最終製品での使用には適していません。最終製品では、イメージセンサのクロック入力として外部クロックジェネレータを使用します。
3. 質問:CX3はUSB VBUS電源からどのくらいの電流を引き出しますか?
回答:通常モードで5Vソースから流れるCX3の合計電流は約112.6mAです。これは最悪のシナリオの場合です(30fpsで1080p、24ビットデータバス、VBUSで6 V、I/O電源用に3.6V、コア/ USB3.0電源用に1.25V)。
注:これらの値は、以下の表に要約されている以下の基準に基づいています。これは、5Vから1.2V、1.8 V、または3.3 Vの変換で約85%の効率のスイッチングレギュレータを使用することを前提としています。
パラメータ | 電圧(V) | 電流(mA) | 電力(W) | 外部電力変換器の効率 | 入力電力(W) |
---|---|---|---|---|---|
コア | 1.25 | 159.2 | 0.199 | ||
VBUS | 6 | 22.6 | 0.136 | ||
U3Tx | 1.25 | 17.1 | 0.021 | ||
U3Rx | 1.25 | 30.2 | 0.038 | ||
I/O supply | 3.6 | 23.5 | 0.085 | ||
総電力 | 0.478 | 0.85 | 0.563 | ||
VBUSからの電流 | 5 | 112.6 |
CX3のUSB2.0ポートのみを使用する場合、消費される電流は約98.6mAです。デバイスがスタンバイモードの場合、約68uAを消費します。サスペンドモードでは、約3.2mAを消費します。
4. 質問:シリアルカメラコントロールバス(SCCB)ポートを備えたOV5640やOV10822などのOmniVision®イメージセンサはCX3で動作しますか?
回答:OmniVision SCCB標準は、「Ack」ビットを「don’t care」として扱うことが期待されています(したがって、エラーをチェックせずにトランザクションを続行します)。ただし、OVセンサは各トランザクションの後に「Ack」ビットを設定します。これはCX3のI2Cマスタで機能します。
5. 質問:CX3は、パラレルまたはシリアルの低電圧差動信号(LVDS)、サブLVDS、または高速ピクセルインターフェース(HiSPi)のインターフェースを持ったイメージセンサをサポートしていますか?
回答:いいえ。CX3は、モバイルインダストリープロセッサインターフェース(MIPI)カメラシリアルインターフェース(CSI)-2イメージセンサのみをサポートします。
イメージセンサとパラレルインターフェースのインターフェースが必要な場合は、Cypress FX3を使用する必要があります。さらに、シリアルLVDS、サブLVDS、またはHiSPiインターフェースを持ったイメージセンサは、外部シリアルLVDS-パラレルコンバーター、FPGA、またはイメージシグナルプロセッサー(ISP)を使用してFX3にインターフェースできます。
FPGA + CypressFX3を搭載した「LATTICESEMICONDUCTOR」の以下のキットを使用できます。http://www.latticesemi.com/en/Products/DevelopmentBoardsAndKits/LatticeUSB3VideoBridgeDevelopmentKit.aspx
Latticeには、並列ブリッジへのLVDS(HiSPi、SubLVDS)用のIPがあります。これを使用して、LVDSをパラレルバスに変換してから、FX3のGPIFインターフェースに接続できます。
6. 質問: 1つまたは2つのレーンを持つ2つのMIPI CSI-2イメージセンサを1つのCX3に接続することは可能ですか?CX3はMIPI CSI-2仕様の仮想チャネル(VC)機能をサポートしていますか?
回答:いいえ。2つのイメージセンサを1つのCX3に接続することはできません。2つのセンサを1つのCX3に接続するには、2つのイメージセンサ入力チャネルと1つのMIPI CSI-2出力インターフェースを備えた外部ISPが必要です。CX3は、MIPI CSI-2仕様の仮想チャネル(VC)機能をサポートしていません。
一度に2つのイメージセンサのうち1つだけを使用する場合は、MIPI CSIスイッチを使用できます。https://www.fairchildsemi.com/datasheets/FS/FSA642.pdfを参照してください。
7. 質問:CX3にはPWMを使用してLEDを制御する方法がありますか?これには追加のマイクロコントローラが必要ですか?
回答: CX3には、PWM出力を提供できるGPIOがあります。CX3の内蔵マイクロコントローラーは、PWM出力を使用してLEDを制御するために使用できます。PWM機能の使用方法については、FX3テクニカルリファレンスマニュアル(TRM)のドキュメントを参照してください。
8. 質問:MIPI CSI-2回線をルーティングする際に従うべきルーティングガイドラインは何ですか?
回答:「AN70707-FX3 / FX3Sハードウェア設計ガイドライン」アプリケーションノートでは、CX3にも適用可能なFX3/FX3Sハードウェア設計の推奨プラクティスについて説明しています。
MIPI CSI-2信号の場合、次の追加のルーティングガイドラインを使用します。
9.質問:CX3リファレンスデザインキット(CX3 RDK)のリファレンス回路図はどこにありますか?
回答:CX3のリファレンスデザインキットは、サイプレスのデザインパートナーの1つであるe-conSystemsによって製造および販売されています。CX3 RDKは、以下のリンクを使用してオンラインストアから購入できます。CX3 RDKの回路図は、同じWebページの「ドキュメント」セクションからダウンロードすることもできます。http://www.e-consystems.com/CX3-Reference-Design-Kit.asp
10. 質問:CX3には、デバッグのためにテストピンに送ることができるテスト信号がありますか?
回答:はい。次の信号のテストポイントを提供できます。これは、さまざまなイメージセンサのMIPI CSI-2レシーバー構成のデバッグに役立ちます。トレース長が長くならないように、これらのテストポイントがピンの近くにあることを確認してください。
CX3ピン# | テスト信号名 |
H8 | PCLKテスト信号 |
G6 | HSYNCテスト信号 |
H5 | VSYNCテスト信号 |
さらに、シリアルポート(E4-UART_RX、E5-UART_TX)のRxおよびTxラインをテストポイントに引き出して、デバッグに役立てることができます。
11. 質問:CX3リファレンスデザインキット(RDK)用の独自のイメージセンサドーターカードを作成するにはどうすればよいですか?
回答: CX3RDK用に独自のイメージセンサドーターカードを作成できます。下図は、CX3RDKメインボードとコネクタの固定穴の寸法です。取付穴のドリルサイズは3.2mmです。
OV5640センサドーターボードの回路図は、e-conシステムのWebサイトからダウンロードできます。(http://www.e-consystems.com/CX3-Reference-Design-Kit.asp )。
12. 質問:CX3RDK用に独自のドーターカードを作成しました。ただし、CX3とイメージセンサ間のI2C通信が機能していません。この問題を修正するにはどうすればよいですか?
回答:CX3RDKメインボードにはI2Cバッファがあります。 このバッファの出力電力は、ドーターカードから供給される必要があります。 I2Cバッファ出力セクションへの2.8V電源がない場合、I2C通信障害が発生します。 インターフェイスコネクタのPin15に2.8Vを供給すると、機能するはずです。
13. 質問:CX3は「連続MIPIクロック」モードと「ゲートMIPIクロック」モードをサポートしますか?
回答:はい。CX3は両方のクロックモードをサポートします。CX3チップは、最初にMIPI CSILPからHSモードへの移行によってCSIクロックを認識します。したがって、CX3 MIPIブリッジの初期化が完了した後、CSIクロックはLPモードからHSモードに移行する必要があります。「連続クロックモード」でセンサを使用している場合は、ファームウェアで次のシーケンスを使用する必要があります。
14. 質問:MIPI CSIラインで使用される終端抵抗の値は何ですか?
回答:MIPI CSI-2に使用されるMIPIDPHYには、HS(高速)モード中にアクティブに切り替えられる100Ωの終端抵抗が内蔵されています。これらのラインに外部抵抗を接続する必要はありません。
15. 質問:CX3ボードのリファレンスレイアウトとルーティングを示すボード設計例はありますか?
回答:CX3ボードのリファレンス回路図とボードファイルは、ケイデンスのAllegro(Rev 16.5)形式(CYPRESS_CX3_REFERENCE_DESIGN_SCHEMATIC_17SEP14_CX3.DSN)とボードファイル(CX3_REFERENCE_DESIGN_Board_17SEP14_CX3.brd)で添付されています。
OrCAD Symbol for CX3は、以下のリンクからダウンロードすることもできます。
16. 質問:CX3のIBISモデルはどこにありますか?
回答:CX3のIBISモデルは、以下のリンクからダウンロードできます。
17. 質問:CX3の未使用のMIPI CSI-2データレーンをフローティングのままにしておくことはできますか?
回答:いいえ。CX3の未使用のMIPI CSI-2データレーンはグランドに接続する必要があります。たとえば、1つのMIPI CSI-2レーンでイメージセンサを使用する場合は、CX3の2番目、3番目、および4番目のMIPICSI-2データレーンをグラウンドに接続する必要があります。
Show LessAuthor: HemanthR_06 Version: **
Translation - Japanese: FX3でのSPI転送にAutoチャネルを使用する - KBA230715 - Community Translated (JA)
Question: How to use Auto channel with SPI as the producer and USB as the consumer?
Answer: The firmware project attached with this article has few modifications done on UsbSpiDmaMode example, available in FX3 SDK in the following path, to implement Auto channel:
C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\serialif_examples\cyfxusbspidmamode
Note:
Testing procedure is as follows:
With the attached firmware, reading data length(wLength) > 0x200 is not supported as the Auto channel has only one buffer of size 0x200. The functionality when there are multiple buffers in the Auto channel with SPI as the producer is not in the scope of present discussion.
Refer to the attached firmware, only when the 0x200 bytes are read out of the Bulk IN endpoint by the USB Host. This event CY_U3P_DMA_CB_XFER_CPLT is received in the DMA callback.
Show LessAuthor: HemanthR_06 Version: **
Translation - Japanese: CyU3PDebugPrint APIを使用して、FX3ファームウェアからUSB-CDCインターフェースを介してデバッグメッセージを送信する - KBA231478 - Community Translated (JA)
This article is based on the project attached to AN75779 - How to Implement an Image Sensor Interface Using EZ-USB® FX3™ in a USB Video Class (UVC) Framework. To use this article, you should download and extract the ZIP file associated with this article.
The CyU3PDebugPrint API can be used to send debug messages to the host over the USB-CDC interface instead of using a dedicated onboard UART-USB bridge device. To do this, the following changes are made to the AN75779 firmware.
a. Configure the endpoints required for the CDC interface.
b. Call CyU3PDebugInit() by passing the USB consumer socket as argument. Doing this allows the use of the CyU3PDebugPrint API function for sending debug messages over the CDC interface.
This function is called when the SET_CONFIGURATION event occurs in CyFxUVCApplnUSBEventCB().
When the firmware with these changes is programmed to the FX3 device, the following devices get enumerated in the host which can be seen in Device Manager as follows:
The following debug messages appear in the terminal:
The message “cdc-debug-enabled” appears because of the following code in the firmware. You can change this according to your application.
Note:
Community Translated by NoTa_4591161 Version: **
Translation - English: Cypress CyUsb3.sys Programmer’s Reference - KBA99226
質問:
サイプレスのCyUsb3.sysドライバーに関する詳細情報はどこで入手できますか?
回答:
CyUsb3.sysは、カーネルモードのUSB機能ドライバーであり、サイプレスUSB製品およびサイプレスUSBチップを採用した製品でのみ配布が許可されています。
詳細なCyUsb3.sysプログラマーズリファレンスマニュアル(CyUSB.pdf)は、FX3SDKのドキュメントフォルダにあります。これは、次のデフォルトのSDKインストールパスにあります。
64ビットWindows:
C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\doc\SuiteUSB
32ビットWindows:
C:\Program Files\Cypress\EZ-USB FX3 SDK\1.3\doc\SuiteUSB
Show LessCommunity Translated by NoTa_4591161 Version: **
Translation - English: Verifying Flash Content – KBA225064
質問:
フラッシュのコンテンツが正しいかどうかを確認するにはどうすればよいでしょうか?
回答:
FX3/CX3デザインでは、ファームウェアの保存にSPIフラッシュがよく使用されます。お客様がよく直面する問題の1つは、FX3/CX3がフラッシュから起動しないことです。フラッシュに保存されているファームウェアが有効かどうかを確認するには、フラッシュの読み取り/書き込みファームウェアをトラブルシューティングに使用できます。
サンプルプロジェクトはC:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\serialif_examples\cyfxusbspidmamodeにあります。
ImgファイルをビルドしてFX3 RAMにダウンロードします。次のスクリーンショットに示すように、FX3はバルクループデバイスとして列挙されます
図1. ファームウェアをRAMにダウンロード
図2. FX3はバルクループデバイスとして列挙されます
configuration 1を展開し、コントロールエンドポイントを選択して、パネルの右側の空白を埋めます。その後、[ Transfer Data ]をクリックします。これはベンダーコマンドを発行し、バイトアドレス0から1024バイトを読み取ります。
図3. フラッシュから1024バイトを読み取る
読み出しデータの長さと開始アドレスは必要に応じて変更できます。このコマンドの詳細については、このプロジェクトのreadme.txtを確認してください。
読み戻されたデータは、hexファイルに保存できます。フラッシュ全体の内容を確認した後、フラッシュ内のデータを16進エディターと比較して、それが有効かどうかを確認できます。
Show Less
Version: **
The pow(a,b) function returns the value of ‘a’ raised to the power of ‘b’. It is defined inside the math.h header file. Do the following to use this function in an FX3 project in EZ USB Suite:
Version: **
By default, the S25FS128S flash device comes with hybrid sectors (the first sector of 64KB divided into 9 sectors (8 sectors of 4KB and one 32KB sector). All remaining sectors are uniform (64KB each).
When you use the Control Center application from the FX3 SDK, the internal programming utility (CyBootProgrammer.img) assumes uniform sector size for the flash device; this leads to corrupted data in the first sector, which is a hybrid sector.
To prevent this, configure the flash device to use uniform sectors of 64KB each by modifying the Configuration Register 3 (CR3NV) – see Figure 1.
Figure 1. Configuration Register 3 (CR3NV): Address = 0x00000004
To configure the flash with uniform 64KB sectors, write ‘1’ to CR3NV[3] and ‘0’ to CR3NV[1] using the WRAR 71h command (write 0x08 into the CR3NV register). After updating this register, use the default Control Center application to load the firmware image to the flash.
An alternative approach is to modify the default programmer tool in the Control Center utility (CyBootProgrammer.img). However, note that this may cause errors if other types of flash are used. Therefore, create a backup of CyBootProgrammer.img for use with other flash devices.
Do the following to modify CyBootProgrammer.img:
1. Import the SDK example project cyfxflashprog from the following location into EZ-USB Suite:
C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\basic_examples\cyfxflashprog
2. Open the cyfxflashprog.c source file, and locate the CyFxFlashProgSpiInit function.
3. Add the following lines of code to the end of this function:
uint32_t reg_adr = 0x000004;
uint32_t temp;
uint8_t location[5], rdBuf[2];
location[0] = 0x06; /* Write enable. */
CyU3PSpiSetSsnLine (CyFalse);
status = CyU3PSpiTransferWords (location, 1, 0, 0);
CyU3PSpiSetSsnLine (CyTrue);
rdBuf[0] = 0x8;
location[0] = 0x71; /* Sector erase. */
temp = reg_adr;
location[1] = (temp >> 16) & 0xFF;
location[2] = (temp >> 8) & 0xFF;
location[3] = temp & 0xFF;
location[4] = 0x08;
CyU3PSpiSetSsnLine (CyFalse);
status = CyU3PSpiTransferWords (location, 5, 0, 0);
CyU3PSpiSetSsnLine (CyTrue);
4. Build the project.
5. Rename the .img file generated to CyBootProgrammer.img.
6. Copy and paste this file to the following location:
C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\bin.
7. Create a backup of the existing CyBootProgrammer.img in this location so that it can be used with other SPI flash devices.
8. Use the Control Center utility (CyControl.exe) to program the flash.
The attached cyfxflashprog SDK example project has the required firmware modification.
See Control Center user guide:C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\application\c_sharp
Show LessAuthor: YangyangC_06 Version: **
Translation - Japanese: Flashのコンテンツ確認 – KBA225064 - Community Translated (JA)
Question:
How can I check if the flash content is correct?
Answer:
In the FX3/CX3 design, SPI Flash is frequently used to store firmware. One of the problems customers often face is that of FX3/CX3 not booting from flash. To check if the firmware stored in flash is valid, the flash read/write firmware can be used for troubleshooting.
The example project is located at C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\serialif_examples\cyfxusbspidmamode. Build and download the Img file into FX3 RAM. FX3 will enumerate as the bulkloop device, as shown in the following screenshots
Figure1. Download Firmware into RAM
Figure 2. FX3 Enumerates as Bulk Loop Device
Expand configuration 1, choose control endpoint, and fill the blanks on the right side of the panel. After that, click Transfer Data. This will issue the vendor command, which reads 1024 bytes from byte address 0.
Figure 3. Read 1024 Bytes from Flash
The length of the read data and the start address can be changed as required. For more information about this command, check the readme.txt in this project.
The data read back can be stored in a hex file. After checking the content of entire flash, the data in flash can be compared with the Hex editor to check if it is valid.
Show Less