USB Control CenterによるBulk Out転送について

Tip / ログイン to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
s-ichinose
Level 1
Level 1
10 sign-ins 5 sign-ins First reply posted

こんにちは。

現在、EZ-USB FX3 Device (CYUSB3014-BZXC)を使って開発しています。

自作のimageファイルをFX3のRAMに書き込み、FX3のコールドリセットを行いたいです。

imageファイルにはBulk Out転送で "reset" 文字列を送信するとコールドリセットが行われる機能が備わっています。

USB Control CenterによるBulk Out転送では正しくコールドリセットが行われます。

(※controlcenter-1.png、controlcenter-2.png 参照)

USBControlCenter-1.png

USBControlCenter-2.png

しかし、C++としてコードにした場合にはBulk Out転送がうまくできません。(※source.png 参照

BulkOut.png

原因としては何が考えられるでしょうか、また、解決策を教えてください。

よろしくお願いします。

0 件の賞賛
1 解決策
Takashi_M
Moderator
Moderator
Moderator
1000 replies posted 500 solutions authored 750 replies posted

いくつか確認事項及びコメントを記載させて頂きます。

1.Why is the device being reset in the below line?
下記コードに於いて、デバイスをリセットしている理由をご教授ください。

TakashiM_61_0-1616380656788.jpeg

2.Is the XferData() function getting called, if yes, is it failing?

XferData() 関数が呼ばれてますでしょうか?もし呼ばれている場合、Failしますでしょうか?

3.In the XferData() function for a bulk transfer, it is recommended to pass only the first two parameters to the XferData() function. So we would advise to remove the “NULL” and “false” parameter.

Bulk転送のXferData() 関数では、最初の2パラメータのみXferData() 関数に渡すことを推奨します。"NULL"、"False"パラメータは削除してください。

4.Could you verify if the USBDevice object is not pointing to NULL when the device is connected?

デバイス接続時にUSBDevice object がNULLでないことを確認してください。

5.Could you specify the “CyAPI.lib” library version being used for the application?

アプリケーションに使用している“CyAPI.lib” library versionを教えて頂けないでしょうか?

 

 

元の投稿で解決策を見る

4 返答(返信)
Takashi_M
Moderator
Moderator
Moderator
1000 replies posted 500 solutions authored 750 replies posted

いくつか確認事項及びコメントを記載させて頂きます。

1.Why is the device being reset in the below line?
下記コードに於いて、デバイスをリセットしている理由をご教授ください。

TakashiM_61_0-1616380656788.jpeg

2.Is the XferData() function getting called, if yes, is it failing?

XferData() 関数が呼ばれてますでしょうか?もし呼ばれている場合、Failしますでしょうか?

3.In the XferData() function for a bulk transfer, it is recommended to pass only the first two parameters to the XferData() function. So we would advise to remove the “NULL” and “false” parameter.

Bulk転送のXferData() 関数では、最初の2パラメータのみXferData() 関数に渡すことを推奨します。"NULL"、"False"パラメータは削除してください。

4.Could you verify if the USBDevice object is not pointing to NULL when the device is connected?

デバイス接続時にUSBDevice object がNULLでないことを確認してください。

5.Could you specify the “CyAPI.lib” library version being used for the application?

アプリケーションに使用している“CyAPI.lib” library versionを教えて頂けないでしょうか?

 

 

ご回答ありがとうございます。

質問に答えさせていただきます。

 

> いくつか確認事項及びコメントを記載させて頂きます。

> 1.Why is the device being reset in the below line?
> 下記コードに於いて、デバイスをリセットしている理由をご教授ください

 こちらは、コーディングミスのため修正します。

 

> 2.Is the XferData() function getting called, if yes, is it failing?

> XferData() 関数が呼ばれてますでしょうか?もし呼ばれている場合、Failしますでしょうか?

 XferData()関数は呼ばれます。また、返り値はtrueとなります。

 

> 3.In the XferData() function for a bulk transfer, it is recommended to pass only the first two parameters to the XferData() function. So we would advise to remove the “NULL” and “false” parameter.

> Bulk転送のXferData() 関数では、最初の2パラメータのみXferData() 関数に渡すことを推奨します。"NULL"、"False"パラメータは削除してください。

 こちらは、修正します。

 

> 4.Could you verify if the USBDevice object is not pointing to NULL when the device is connected?

> デバイス接続時にUSBDevice object がNULLでないことを確認してください。

 デバイス接続時はNULLではありません。

 

> 5.Could you specify the “CyAPI.lib” library version being used for the application?

> アプリケーションに使用している“CyAPI.lib” library versionを教えて頂けないでしょうか?

 確認方法が分からなかったのですが、

 CyAPI.pdfを確認したところ2011年Releaseです。

 また、CyAPI.libの更新日時は2012/05/07 12:08です。

0 件の賞賛

1と3を修正したら解決しました!

ありがとうございました。

0 件の賞賛

ご連絡、有難うございます。

問題解決とのこと、安心いたしました。

またもし何かございましたら、CDCにお問い合わせください。