目次

last update: 2024/05

RI600V4 (ITRON) RTOS用BSPパッケージ
第9章: USB-Hostインターフェース
評価ボード:RX72N Envision Kit




テストサンプル

Demo Sample Application Folder:

Application
 └ _Exclude
     ├ USBH  ..... USB Host各種クラス機能のデモサンプル
Sample説明
USBH_Printer_Startプリンタクラスドライバのデモサンプル
USBH_MTP_StartUSBホストのMTPクラスドライバの使用方法を示すデモサンプル
USBH_MSD_StartMSDクラスのデモアプリケーション(ファイルシステムが必要です)
USBH_HID_Start標準HIDキーボード・マウスデバイス用デモサンプル
USBH_FT232_StartFTDI FT232クラスドライバのデモサンプル
USBH_CreateInterfaceListUSBポートに接続されているデバイスのステータス及びデバイス情報をIOコンソールに表示します
USBH_CDC_StartUSBホストのCDC-ACMクラスドライバのデモサンプル
USBH_CCID_StartCCID通信デバイスクラスドライバのデモサンプル
USBH_BULK_StartBULK(VENDOR)クラスドライバのデモサンプル
USBH_AUDIO_SpeakerAUDIO(スピーカーデバイス)クラスドライバのデモサンプル
USBH_AUDIO_ScanDevicesUSBポートにAUDIOクラスデバイスが接続された時にデバイスのベンダ・コンフィグレーション情報を表示します
USBH_AUDIO_MicrophoneAUDIO(マイクロフォンデバイス)クラスドライバのデモサンプル

関連設定ファイル:

BSP
 |- BSP_USB.c  .......... ボード依存の初期化設定ファイル(USB-HOST)
 |
 |- Setup
     |- USBH_Config_RX72N_Renesas_RX72N_EnvisionKit.c
               .......... USB-HOSTドライバ設定ファイル

Config
 |- USBH_Conf.h  ............... コンフィグレーション設定ファイル
 |
 |- IO
 |   |- USBH_ConfigIO.c  ....... デバッグコンソールIOインターフェース設定ファイル
 |
 |- OS
     |- libRI600V4_OSLayer_RXv3_L.lib  ..... OSインターフェース設定ファイル

ビルド・動作確認方法

プロジェクト設定では「\Application\_Exclude\USBH」フォルダはビルド対象外に設定しています。

「\_Exclude\USBH」フォルダ下の動作確認を行うテストサンプルファイルをビルド対象設定の「\Application」フォルダ下にコピーします。
各テストアプリケーションの動作確認方法はテストサンプルアプリケーションのヘッダのコメント情報を参照ください。
プロジェクトを再ビルドし、RX72N Envision評価ボードに接続してデバッグセッションを開始します。
テストアプリケーションの要件に合わせてUSBホストボードにデバイスを接続してプログラムを実行します。デバッガのIOコンソールのログ画面から結果を確認します。

USBH_MSD_Start:サンプルビルド方法

USBディスクドライブインターフェースを使用しますので、以下の手順でファイルシステム(emFile)のドライバ設定をUSBディスクドライブに変更してください。

  1. 「\BSP\Setup\FS_ConfigMMC_CM_RX72N_Renesas_RX72N_EnvisionKit.c」ファイルを「ビルド対象外」に設定します。
  2. 「\BSP\Setup\_Exclude」フォルダ下の「FS_USBH_MSDConfig.c」ファイルをビルド対象設定の「\BSP\Setup」フォルダ下にコピーします。又は「FS_USBH_MSDConfig.c」ファイルのをビルド対象に設定します。

テストレポート

(MSDクラス)Sample: USBH_CreateInterfaceList

操作手順:プログラム起動してUSBポートにUSBデバイスを挿入します。対象デバイスのクラス、Vendor情報はログウインドウから確認します。以下、LANアダプタ及びUSBディスク接続の事例です。

Debug IO Console:

SEGGER Software Evaluation Sample
Eval Board: RX72N Envision Kit
Base: Renesas RI600V4 RTOS
------------------------------------------------
0:022 INIT: emUSB-Host Init started. Version 2.36.6
0:031 INIT: *********************************************************************
0:103 INIT: *                       emUSB-Host Configuration                    *
0:116 INIT: *********************************************************************
0:129 INIT: * External hubs are ALLOWED
0:135 INIT: * Time before communicating with a newly connected device: 300 ms
0:215 INIT: *********************************************************************
0:228 INIT: Init completed
0:233 INIT: Enumeration of devices enabled
0:240 INIT: USBH_Task started
0:345 INIT: USBH_ISRTask started
1:250 APP: **** Device added [1]

1:259 APP: **** Device information for interface with ID 1
1:268 APP:    Device ID: 1
1:272 APP:    Vendor ID: 0x093A
1:277 APP:    Product ID: 0x2510
1:282 APP:    BCD device version: 0x100
1:289 APP:    Interface number: 0
1:315 APP:    Device class: 0x3
1:320 APP:    Device subclass: 0x1
1:325 APP:    Device protocol: 0x2
1:331 APP:    Number of open handles: 0
1:337 APP:    Exclusive state: 0
1:342 APP:    Speed: LowSpeed
1:357 APP:    Manufacturer name: PixArt
1:382 APP:    Product name: USB Optical Mouse
1:443 APP:       connected to port 1 of controller 0
7:423 APP: **** Device removed [1]

7:511 APP: No devices found.
14:880 APP: **** Device added [2]

14:888 APP: **** Device information for interface with ID 2
14:897 APP:    Device ID: 2
14:901 APP:    Vendor ID: 0x0411
14:907 APP:    Product ID: 0x023A
14:912 APP:    BCD device version: 0x110
14:919 APP:    Interface number: 0
14:950 APP:    Device class: 0x8
14:956 APP:    Device subclass: 0x6
14:961 APP:    Device protocol: 0x50
14:967 APP:    Number of open handles: 0
14:974 APP:    Exclusive state: 0
14:979 APP:    Speed: FullSpeed
14:985 APP:    Manufacturer name: BUFFALO
15:056 APP:    Product name: USB Flash Disk
15:064 APP:    Serial number: 0708411D9C20BD43
15:071 APP:       connected to port 1 of controller 0
18:786 APP: **** Device removed [2]

18:817 APP: No devices found.

(MSDクラス)Sample: USBH_MSD_Start

操作手順:ファイルシステムのUSBH-MSDドライバ定義ファイル「FS_USBH_MSDConfig.c」をビルド対象に設定してプロジェクトをビルドします。プログラム起動してUSBポートにUSBディスクを挿入します。
テスト完了後に「FS_USBH_MSDConfig.c」をビルド対象外に設定します。

Debug IO Console:

SEGGER Software Evaluation Sample
Eval Board: RX72N Envision Kit
Base: Renesas RI600V4 RTOS
------------------------------------------------
0:022 INIT: emUSB-Host Init started. Version 2.36.6
0:031 INIT: *********************************************************************
0:103 INIT: *                       emUSB-Host Configuration                    *
0:116 INIT: *********************************************************************
0:129 INIT: * External hubs are ALLOWED
0:135 INIT: * Time before communicating with a newly connected device: 300 ms
0:215 INIT: *********************************************************************
0:228 INIT: Init completed
0:232 INIT: Enumeration of devices enabled
0:239 INIT: USBH_Task started
0:244 INIT: USBH_ISRTask started
8:261 APP: **** Device added [0]
8:266 APP: The following device was detected:

8:273 APP: VendorId:           0x0411
8:279 APP: ProductId:          0x023A
8:285 APP: VendorName:         BUFFALO 
8:292 APP: ProductName:        USB Flash Disk  
8:299 APP: Revision:           1.00
8:353 APP: NumSectors:         60566016
8:359 APP: BytesPerSector:     512
8:365 APP: TotalSize:          29573 MByte
8:372 APP: HighspeedCapable:   No
8:377 APP: ConnectedToRootHub: Yes
8:383 APP: SelfPowered:        No
8:388 APP: Reported Imax:      150 mA
8:461 APP: Connected to Port:  1
8:466 APP: PortSpeed:          FullSpeed

8:473 APP: Checking whether the volume is formatted...
9:907 APP: Running sample on volume "msd:0:" DevIndex 0, LUN 0
9:917 APP: Reading volume information...
9:924 APP: **** Volume information for msd:0:
9:931 APP:    30270720 KBytes total disk space
9:938 APP:    30181248 KBytes available free space
9:948 APP:    32768 bytes per cluster
9:954 APP:    945960 clusters available on volume
9:962 APP:    943164 free cluster available on volume
9:970 APP: Creating file msd:0:\TestFile.txt...
9:993 APP: Ok
9:995 APP: Contents of msd:0: 
10:001 APP:        Attributes: A--- Size: 0
10:008 APP: TestFile.txt       Attributes: A--- Size: 318
10:017 APP: Firmware.old (Dir) Attributes: ---- Size: 0
10:026 APP: Firmware (Dir) Attributes: ---- Size: 0
10:034 APP: **** Unmount ****

19:460 APP: **** Device removed [0]

(HIDクラス)Sample: USBH_HID_Start

操作手順:プログラム起動してUSBポートにHID マウスデバイスを挿入します。マウス操作のレスポンスをログコンソールから確認します。

Debug IO Console:

SEGGER Software Evaluation Sample
Eval Board: RX72N Envision Kit
Base: Renesas RI600V4 RTOS
------------------------------------------------
0:022 INIT: emUSB-Host Init started. Version 2.36.6
0:031 INIT: *********************************************************************
0:088 INIT: *                       emUSB-Host Configuration                    *
0:101 INIT: *********************************************************************
0:114 INIT: * External hubs are ALLOWED
0:120 INIT: * Time before communicating with a newly connected device: 300 ms
0:201 INIT: *********************************************************************
0:214 INIT: Init completed
0:218 INIT: Enumeration of devices enabled
0:225 INIT: USBH_Task started
0:331 INIT: USBH_ISRTask started
14:453 APP: **** Device added [0]
14:487 APP: **** Device added [1]
16:663 APP: Keyboard:  Key h/H                       - pressed
16:728 APP: Keyboard:  Key h/H                       - released
16:769 APP: Keyboard:  Key g/G                       - pressed
16:850 APP: Keyboard:  Key g/G                       - released
16:917 APP: Keyboard:  Key j/J                       - released
16:942 APP: Keyboard:  Key g/G                       - pressed
17:042 APP: Keyboard:  Key j/J                       - pressed
17:059 APP: Keyboard:  Key g/G                       - released
17:100 APP: Keyboard:  Key j/J                       - released
19:141 APP: Keyboard:  Key Spacebar                  - pressed
19:214 APP: Keyboard:  Key Spacebar                  - released
22:281 *** Warning *** HID: _OnIntInCompletion: Retry count expired: read stopped: USBH_STATUS_NOTRESPONDING
22:422 APP: **** Device removed [0]
22:427 APP: **** Device removed [1]
28:380 APP: **** Device added [0]
29:533 APP: Mouse: xRel: 1, yRel: 5, WheelRel: 0, ButtonState: 0
29:544 APP: Mouse: xRel: 1, yRel: 0, WheelRel: 0, ButtonState: 0
29:563 APP: Mouse: xRel: 5, yRel: 0, WheelRel: 0, ButtonState: 0
29:574 APP: Mouse: xRel: 2, yRel: 0, WheelRel: 0, ButtonState: 0
29:623 APP: Mouse: xRel: 39, yRel: -19, WheelRel: 0, ButtonState: 0
29:634 APP: Mouse: xRel: 12, yRel: -8, WheelRel: 0, ButtonState: 0
29:645 APP: Mouse: xRel: 8, yRel: -6, WheelRel: 0, ButtonState: 0
29:664 APP: Mouse: xRel: 3, yRel: -1, WheelRel: 0, ButtonState: 0
29:730 APP: Keyboard:  Reserved/(no event indicated) - released
29:741 APP: Mouse: xRel: 0, yRel: -1, WheelRel: 0, ButtonState: 0
29:752 APP: Mouse: xRel: 0, yRel: -1, WheelRel: 0, ButtonState: 0
29:771 APP: Mouse: xRel: 0, yRel: -2, WheelRel: 0, ButtonState: 0
29:852 APP: Mouse: xRel: -3, yRel: -2, WheelRel: 0, ButtonState: 0
29:871 APP: Mouse: xRel: -2, yRel: 0, WheelRel: 0, ButtonState: 0
29:960 APP: Mouse: xRel: -1, yRel: 0, WheelRel: 0, ButtonState: 0
30:017 APP: Mouse: xRel: -1, yRel: -1, WheelRel: 0, ButtonState: 0
30:028 APP: Mouse: xRel: 1, yRel: 0, WheelRel: 0, ButtonState: 0
30:039 APP: Mouse: xRel: 9, yRel: -1, WheelRel: 0, ButtonState: 0
30:050 APP: Mouse: xRel: 8, yRel: -1, WheelRel: 0, ButtonState: 0
30:081 APP: Mouse: xRel: 13, yRel: -5, WheelRel: 0, ButtonState: 0
30:092 APP: Mouse: xRel: 4, yRel: -1, WheelRel: 0, ButtonState: 0
30:111 APP: Mouse: xRel: 3, yRel: -2, WheelRel: 0, ButtonState: 0
30:130 APP: Mouse: xRel: 2, yRel: -2, WheelRel: 0, ButtonState: 0
30:309 APP: Mouse: xRel: 3, yRel: -3, WheelRel: 0, ButtonState: 0
30:328 APP: Mouse: xRel: 1, yRel: -1, WheelRel: 0, ButtonState: 0
30:401 APP: Mouse: xRel: 0, yRel: 2, WheelRel: 0, ButtonState: 0
30:412 APP: Mouse: xRel: 0, yRel: 7, WheelRel: 0, ButtonState: 0
30:439 APP: Mouse: xRel: 0, yRel: 0, WheelRel: 0, ButtonState: 1
30:456 APP: Mouse: xRel: -1, yRel: 1, WheelRel: 0, ButtonState: 1
30:510 APP: Mouse: xRel: -1, yRel: 0, WheelRel: 0, ButtonState: 1
30:543 APP: Mouse: xRel: -1, yRel: 0, WheelRel: 0, ButtonState: 0
30:656 APP: Mouse: xRel: -1, yRel: 1, WheelRel: 0, ButtonState: 1
30:689 APP: Mouse: xRel: -1, yRel: 1, WheelRel: 0, ButtonState: 1
30:724 APP: Mouse: xRel: -1, yRel: 0, WheelRel: 0, ButtonState: 1
30:781 APP: Mouse: xRel: -1, yRel: -1, WheelRel: 0, ButtonState: 1
30:806 APP: Mouse: xRel: 0, yRel: 0, WheelRel: 0, ButtonState: 0
31:119 APP: Mouse: xRel: -1, yRel: 0, WheelRel: 0, ButtonState: 0
31:138 APP: Mouse: xRel: -1, yRel: 0, WheelRel: 0, ButtonState: 0
31:155 APP: Mouse: xRel: -1, yRel: 0, WheelRel: 0, ButtonState: 0
31:172 APP: Mouse: xRel: -2, yRel: -1, WheelRel: 0, ButtonState: 0
31:221 APP: Mouse: xRel: -1, yRel: 0, WheelRel: 0, ButtonState: 0
31:246 APP: Mouse: xRel: -1, yRel: 0, WheelRel: 0, ButtonState: 0
31:263 APP: Mouse: xRel: -1, yRel: 0, WheelRel: 0, ButtonState: 0
31:280 APP: Mouse: xRel: -2, yRel: -1, WheelRel: 0, ButtonState: 0
31:305 APP: Mouse: xRel: -1, yRel: -1, WheelRel: 0, ButtonState: 0
31:348 APP: Mouse: xRel: -1, yRel: 0, WheelRel: 0, ButtonState: 0
31:373 APP: Mouse: xRel: -1, yRel: 0, WheelRel: 0, ButtonState: 0
31:440 APP: Mouse: xRel: -1, yRel: 0, WheelRel: 0, ButtonState: 0
31:465 APP: Mouse: xRel: -1, yRel: 0, WheelRel: 0, ButtonState: 0
31:492 APP: Mouse: xRel: -2, yRel: 0, WheelRel: 0, ButtonState: 0
31:509 APP: Mouse: xRel: -1, yRel: 0, WheelRel: 0, ButtonState: 0
31:528 APP: Mouse: xRel: -1, yRel: 0, WheelRel: 0, ButtonState: 0
31:547 APP: Mouse: xRel: -1, yRel: 0, WheelRel: 0, ButtonState: 2
31:564 APP: Mouse: xRel: -1, yRel: 0, WheelRel: 0, ButtonState: 2
31:620 APP: Mouse: xRel: -4, yRel: 0, WheelRel: 0, ButtonState: 2
31:639 APP: Mouse: xRel: -2, yRel: 0, WheelRel: 0, ButtonState: 2
31:704 APP: Mouse: xRel: 0, yRel: 0, WheelRel: 0, ButtonState: 0
31:769 APP: Mouse: xRel: -1, yRel: 0, WheelRel: 0, ButtonState: 0
31:834 APP: Mouse: xRel: -1, yRel: 0, WheelRel: 0, ButtonState: 0
31:853 APP: Mouse: xRel: -1, yRel: 0, WheelRel: 0, ButtonState: 0
34:394 *** Warning *** HID: _SubmitInBuffer: SubmitUrb USBH_STATUS_DEVICE_REMOVED
34:407 APP: **** Device removed [0]

(FTD UARTクラス)Sample: USBH_FT232_Start

操作手順:プログラム起動してUSBポートにFTD UARTチップセットのUSB-UART変換アダプタデバイスを挿入します。UARTポートをパソコンに接続してTeraTermなど起動してCOMポートコンソールを開きます。COMポートコンソールから文字を入力してログコンソールからECHOレスポンスを確認します。

Debug IO Console:

SEGGER Software Evaluation Sample
Eval Board: RX72N Envision Kit
Base: Renesas RI600V4 RTOS
------------------------------------------------
0:022 INIT: emUSB-Host Init started. Version 2.36.6
0:031 INIT: *********************************************************************
0:104 INIT: *                       emUSB-Host Configuration                    *
0:117 INIT: *********************************************************************
0:130 INIT: * External hubs are ALLOWED
0:137 INIT: * Time before communicating with a newly connected device: 300 ms
0:230 INIT: *********************************************************************
0:243 INIT: Init completed
0:247 INIT: Enumeration of devices enabled
0:254 INIT: USBH_Task started
0:360 INIT: USBH_ISRTask started
18:543 APP: **** Device added [0]
18:550 APP: Vendor  Id = 0x0403
18:555 APP: Product Id = 0x6001
18:560 APP: bcdDevice  = 0x0400
33:829 APP: Received: "F"
34:066 APP: Received: "T"
34:226 APP: Received: "D"
36:370 APP: Received: "-"
36:721 APP: Received: "T"
36:929 APP: Received: "e"
37:169 APP: Received: "s"
37:297 APP: Received: "t"
43:457 APP: Received: "
"
47:807 APP: Received: "O"
47:950 APP: Received: "K"

(CCIDクラス)Sample: USBH_CCID_Start

操作手順:プログラム起動してUSBポートにCCIDクラス対応のスマートカードリーダーデバイスを挿入します。スマートカードリーダーにICカードを入力してログコンソールからカードステータス・レポートを確認します。

Debug IO Console:

SEGGER Software Evaluation Sample
Eval Board: RX72N Envision Kit
Base: Renesas RI600V4 RTOS
------------------------------------------------
0:022 INIT: emUSB-Host Init started. Version 2.36.6
0:031 INIT: *********************************************************************
0:096 INIT: *                       emUSB-Host Configuration                    *
0:109 INIT: *********************************************************************
0:122 INIT: * External hubs are ALLOWED
0:129 INIT: * Time before communicating with a newly connected device: 300 ms
0:223 INIT: *********************************************************************
0:236 INIT: Init completed
0:240 INIT: Enumeration of devices enabled
0:247 INIT: USBH_Task started
0:353 INIT: USBH_ISRTask started
1:206 APP: **** CCID Device added [0]
1:212 APP: New slot state 0
6:486 APP: New slot state 1
6:737 APP: ATR:
6:740 APP: 0000  3B XX AA BB CC DD EE FF 11 22 33 44 08 2D 
6:801 APP: Card inserted
6:858 APP: Answer:
6:861 APP: 0000  6E 00 
10:473 APP: New slot state 0
10:478 APP: Card removed

(AUDIOクラス)Sample: USBH_AUDIO_ScanDevices

操作手順:プログラム起動してUSBポートにAUDIO SPEAKER/Microphoneデバイスを挿入します。ログコンソールにAUDIOデバイスのクラス情報が表示されます。

Debug IO Console:

SEGGER Software Evaluation Sample
Eval Board: RX72N Envision Kit
Base: Renesas RI600V4 RTOS
------------------------------------------------
0:022 INIT: emUSB-Host Init started. Version 2.36.6
0:031 INIT: *********************************************************************
0:092 INIT: *                       emUSB-Host Configuration                    *
0:105 INIT: *********************************************************************
0:118 INIT: * External hubs are ALLOWED
0:124 INIT: * Time before communicating with a newly connected device: 300 ms
0:203 INIT: *********************************************************************
0:216 INIT: Init completed
0:221 INIT: Enumeration of devices enabled
0:227 INIT: USBH_Task started
0:333 INIT: USBH_ISRTask started
2:158 APP: **** AUDIO Interface added [0]
2:164 APP: **** AUDIO Interface added [1]
2:171 APP: **** AUDIO Interface added [2]
2:177 APP: AUDIO control interface found (DevId 1):
2:186 APP:   Vendor 2D0B, Product 0002, Version 1.0
2:195 APP:   Serial: 00000000
2:213 APP:   Manuf.: IPD Korea
2:237 APP:   Prod. : IPD USB Headset
2:243 APP:   Input terminal 1
2:248 APP:     Terminal type 402
2:253 APP:   Output terminal 3, Source 2
2:260 APP:     Terminal type 101
2:265 APP:   Input terminal 4
2:305 APP:     Terminal type 101
2:310 APP:   Output terminal 6, Source 5
2:316 APP:     Terminal type 402
2:322 APP:   Input terminal 10
2:327 APP:     Terminal type 201
2:332 APP:   Feature Unit 2, Source 1
2:338 APP:     Control channel 0, mask = 43
2:431 APP:       Volume: Cur = 0, Min = FFFFE200, Max = 500, Res = 100
2:442 APP:     Control channel 1, mask = 0
2:449 APP:     Control channel 2, mask = 0
2:455 APP:   Feature Unit 5, Source 12
2:462 APP:     Control channel 0, mask = 1
2:469 APP:     Control channel 1, mask = 2
2:556 APP:       Volume: Cur = 500, Min = FFFFCE00, Max = 500, Res = 100
2:567 APP:     Control channel 2, mask = 2
2:578 APP:       Volume: Cur = 500, Min = FFFFCE00, Max = 500, Res = 100
2:589 APP:   Feature Unit 11, Source 10
2:656 APP:     Control channel 0, mask = 3
2:667 APP:       Volume: Cur = 3B3, Min = 0, Max = 1000, Res = 1
2:677 APP:     Control channel 1, mask = 0
2:684 APP:     Control channel 2, mask = 0
2:691 APP:   Mixer Unit 12
2:695 APP:     Input 1 = source unit 4
2:764 APP:     Input 2 = source unit 11
2:770 APP:     Output channels 2, wChannelConfig = 3
2:778 APP:     Control mask[0] = 00
2:784 APP: AUDIO streaming interface found (DevId 1):
2:793 APP:   Found streaming IN EP on AltSetting 1
2:801 APP:     Terminal Link 3
2:873 APP:     Channels=2, Frame=2, Resolution=16
2:881 APP:   Sampling Frequencies:
2:886 APP:       8000 Hz
2:890 APP:      16000 Hz
2:894 APP:      24000 Hz
2:898 APP:      32000 Hz
2:902 APP:      44100 Hz
2:906 APP:      48000 Hz
2:929 APP: AUDIO streaming interface found (DevId 1):
2:937 APP:   Found streaming OUT EP on AltSetting 1
2:946 APP:     Terminal Link 4
2:951 APP:     Channels=2, Frame=2, Resolution=16
2:958 APP:   Sampling Frequencies:
2:964 APP:       8000 Hz
2:977 APP:      16000 Hz
2:981 APP:      24000 Hz
2:985 APP:      32000 Hz
2:989 APP:      44100 Hz
2:993 APP:      48000 Hz
13:037 APP: **** AUDIO Interface removed [0]
13:044 APP: **** AUDIO Interface removed [1]
13:051 APP: **** AUDIO Interface removed [2]

(AUDIOクラス)Sample: USBH_AUDIO_Speaker

操作手順:プログラム起動してUSBポートにAUDIO SPEAKERデバイスを挿入します。スピーカーから音声「It simply works」を確認します。

Debug IO Console:

SEGGER Software Evaluation Sample
Eval Board: RX72N Envision Kit
Base: Renesas RI600V4 RTOS
------------------------------------------------
0:022 INIT: emUSB-Host Init started. Version 2.36.6
0:031 INIT: *********************************************************************
0:104 INIT: *                       emUSB-Host Configuration                    *
0:117 INIT: *********************************************************************
0:130 INIT: * External hubs are ALLOWED
0:137 INIT: * Time before communicating with a newly connected device: 300 ms
0:216 INIT: *********************************************************************
0:229 INIT: Init completed
0:234 INIT: Enumeration of devices enabled
0:240 INIT: USBH_Task started
0:346 INIT: USBH_ISRTask started
2:168 APP: **** AUDIO Interface added [0]
2:174 APP: **** AUDIO Interface added [1]
2:181 APP: **** AUDIO Interface added [2]
2:187 APP: AUDIO device:
2:192 APP:   Vendor 2D0B, Product 0002, Version 1.0
2:214 APP:   Manuf.: IPD Korea
2:238 APP:   Prod. : IPD USB Headset
2:244 APP:   Found streaming OUT, Channels=2, Frame=2, Resolution=16
2:255 APP:   Sampling Frequencies:
2:261 APP:       8000 Hz
2:315 APP:      16000 Hz
2:319 APP:      24000 Hz
2:323 APP:      32000 Hz
2:327 APP:      44100 Hz
2:331 APP:      48000 Hz
2:335 APP: Configure Audio device...
2:341 APP: SetAltInterface to 1
2:347 APP: SetSampleFreq to 48000 Hz
2:354 APP: Feature unit 2, Source 1
2:439 APP:   Unmute Unit 2, control 0
2:446 APP:   Get volume unit 2, control 0
2:456 APP:     Volume[0] = 0, FFFFE200, 500, 100
2:463 APP:   Set volume to 30 % (EC80)
2:475 APP: Feature unit 5, Source 12
2:480 APP:   Unmute Unit 5, control 0
2:547 APP:   Get volume unit 5, control 1
2:557 APP:     Volume[1] = 500, FFFFCE00, 500, 100
2:565 APP:   Set volume to 30 % (DE80)
2:576 APP:   Get volume unit 5, control 2
2:586 APP:     Volume[2] = 500, FFFFCE00, 500, 100
2:594 APP:   Set volume to 30 % (DE80)
2:659 APP: Feature unit 11, Source 10
2:665 APP:   Unmute Unit 11, control 0
2:672 APP:   Get volume unit 11, control 0
2:682 APP:     Volume[0] = 3B3, 0, 1000, 1
2:688 APP:   Set volume to 30 % (4CC)
2:699 APP: Open streaming channel
2:704 APP: Playing ....
5:248 APP: End

(AUDIOクラス)Sample: USBH_AUDIO_Microphone

操作手順:プログラム起動してUSBポートにAUDIO Microphone(マイク)デバイスを挿入します。マイクから認識された音声データはログコンソール上にバーグラーフとして表示されます。

Debug IO Console:

SEGGER Software Evaluation Sample
Eval Board: RX72N Envision Kit
Base: Renesas RI600V4 RTOS
------------------------------------------------
0:022 INIT: emUSB-Host Init started. Version 2.36.6
0:031 INIT: *********************************************************************
0:106 INIT: *                       emUSB-Host Configuration                    *
0:119 INIT: *********************************************************************
0:132 INIT: * External hubs are ALLOWED
0:139 INIT: * Time before communicating with a newly connected device: 300 ms
0:215 INIT: *********************************************************************
0:228 INIT: Init completed
0:233 INIT: Enumeration of devices enabled
0:240 INIT: USBH_Task started
0:345 INIT: USBH_ISRTask started
2:163 APP: **** AUDIO Interface added [0]
2:169 APP: **** AUDIO Interface added [1]
2:176 APP: **** AUDIO Interface added [2]
2:186 APP: AUDIO device:
2:189 APP:   Vendor 2D0B, Product 0002, Version 1.0
2:211 APP:   Manuf.: IPD Korea
2:235 APP:   Prod. : IPD USB Headset
2:241 APP:   Found streaming IN, Channels=2, Frame=2, Resolution=16
2:297 APP:   Sampling Frequencies:
2:302 APP:       8000 Hz
2:306 APP:      16000 Hz
2:310 APP:      24000 Hz
2:314 APP:      32000 Hz
2:318 APP:      44100 Hz
2:322 APP:      48000 Hz
2:326 APP: Configure Audio device...
2:332 APP: SetAltInterface to 1
2:420 APP: SetSampleFreq to 48000 Hz
2:427 APP: Feature unit 2, Source 1
2:432 APP:   Unmute Unit 2, control 0
2:439 APP:   Get volume unit 2, control 0
2:449 APP:     Volume[0] = 0, FFFFE200, 500, 100
2:456 APP:   Set volume to maximum
2:467 APP: Feature unit 5, Source 12
2:529 APP:   Unmute Unit 5, control 0
2:537 APP:   Get volume unit 5, control 1
2:547 APP:     Volume[1] = 500, FFFFCE00, 500, 100
2:555 APP:   Set volume to maximum
2:565 APP:   Get volume unit 5, control 2
2:575 APP:     Volume[2] = 500, FFFFCE00, 500, 100
2:637 APP:   Set volume to maximum
2:648 APP: Feature unit 11, Source 10
2:654 APP:   Unmute Unit 11, control 0
2:661 APP:   Get volume unit 11, control 0
2:671 APP:     Volume[0] = 3B3, 0, 1000, 1
2:677 APP:   Set volume to maximum
2:747 APP: Open streaming channel
2:752 APP: Listening ....
#
##
#########




##

###
######
#
#
###
######
#
#
#########
#
##

####
####
#

########



#######
##

#######
###



####
#
###
#######




###########
##
#
#######
#



###########
##
#
########
#



##
###########

#
########




############
#
#
########
##



##########
#
#
#######




########
##

########
#




############
##

#######
#



######
###


#
########




#########
#

########
##



######
####

#
########



###########
#

#######
#


#
##########
#

####
#####




##########
#


##
##




#########


##

#


#######





前の章

セキュリティ機能の評価