0

カーネルコンフィグで、
USB Modem (CDC/ACM) support ✔︎CDCACM とデフォルトでチェックされてると思います

USB Bulk転送/受信するサンプルとかありませんでしょうか

■環境 Spresense SDK 1.5.1


続きのカーネルコンフィグでできそうな雰囲気がプンプンするのですが、ソフトの書き方がよくわかりません

Device Drivers ➤ USB Device Driver Support ➤ USB Modem (CDC/ACM)
support

Endpoint 0 max packet size 64 CDCACM_EP0MAXPACKET

Endpoint 0 max packet size. Default 64.

Depends on: !CDCACM_COMPOSITE && CDCACM && USBDEV

Device Drivers ➤ USB Device Driver Support ➤ USB Modem (CDC/ACM)
support

Interrupt IN endpoint number 6 CDCACM_EPINTIN

The logical 7-bit address of a hardware endpoint that supports
interrupt IN operation. Default 1.

Depends on: !CDCACM_COMPOSITE && CDCACM && USBDEV

Device Drivers ➤ USB Device Driver Support ➤ USB Modem (CDC/ACM)
support

Interupt IN full speed MAXPACKET size 64 CDCACM_EPINTIN_FSSIZE

Max package size for the interrupt IN endpoint if full speed mode.
Default 64.

Depends on: CDCACM && USBDEV

Device Drivers ➤ USB Device Driver Support ➤ USB Modem (CDC/ACM)
support

Interupt IN high speed MAXPACKET size 64 CDCACM_EPINTIN_HSSIZE

Max package size for the interrupt IN endpoint if high speed mode.
Default 64.

Depends on: CDCACM && USBDEV

Device Drivers ➤ USB Device Driver Support ➤ USB Modem (CDC/ACM)
support

Bulk OUT endpoint number 5 CDCACM_EPBULKOUT

The logical 7-bit address of a hardware endpoint that supports bulk
OUT operation. Default: 3

Depends on: !CDCACM_COMPOSITE && CDCACM && USBDEV

Device Drivers ➤ USB Device Driver Support ➤ USB Modem (CDC/ACM)
support

Bulk OUT full speed MAXPACKET size 64 CDCACM_EPBULKOUT_FSSIZE

Max package size for the bulk OUT endpoint if full speed mode. Default
64.

Depends on: CDCACM && USBDEV

Device Drivers ➤ USB Device Driver Support ➤ USB Modem (CDC/ACM)
support

Bulk OUT out high speed MAXPACKET size 512 CDCACM_EPBULKOUT_HSSIZE

Max package size for the bulk OUT endpoint if high speed mode. Default
512.

Depends on: CDCACM && USBDEV

Device Drivers ➤ USB Device Driver Support ➤ USB Modem (CDC/ACM)
support

Bulk IN endpoint number 4 CDCACM_EPBULKIN

The logical 7-bit address of a hardware endpoint that supports bulk IN
operation. Default: 2

Depends on: !CDCACM_COMPOSITE && CDCACM && USBDEV

Device Drivers ➤ USB Device Driver Support ➤ USB Modem (CDC/ACM)
support

Bulk IN full speed MAXPACKET size 64 CDCACM_EPBULKIN_FSSIZE

Max package size for the bulk IN endpoint if full speed mode. Default
64.

Depends on: CDCACM && USBDEV

Device Drivers ➤ USB Device Driver Support ➤ USB Modem (CDC/ACM)
support

Bulk IN high speed MAXPACKET size 512 CDCACM_EPBULKIN_HSSIZE

Max package size for the bulk IN endpoint if high speed mode. Default
512.

Depends on: CDCACM && USBDEV

Device Drivers ➤ USB Device Driver Support ➤ USB Modem (CDC/ACM)
support

Number of read requests that can be in flight 4 CDCACM_NRDREQS

The number of read requests that can be in flight

Depends on: CDCACM && USBDEV

Device Drivers ➤ USB Device Driver Support ➤ USB Modem (CDC/ACM)
support

Number of write requests that can be in flight 4 CDCACM_NWRREQS

The number of write/read requests that can be in flight

Depends on: CDCACM && USBDEV

Device Drivers ➤ USB Device Driver Support ➤ USB Modem (CDC/ACM)
support

Size of one write request buffer 768 CDCACM_BULKIN_REQLEN

Ideally, the BULKOUT request size should not be the same size as the
maxpacket size. That is because IN transfers of exactly the maxpacket
size will be followed by a NULL packet. The BULKOUT, on the other
hand, request buffer size is always the same as the maxpacket size.

There is also no reason from CDCACM_BULKIN_REQLEN to be greater than
CDCACM_TXBUFSIZE-1, since a request larger than the TX buffer can
never be sent.

Depends on: CDCACM && USBDEV

Device Drivers ➤ USB Device Driver Support ➤ USB Modem (CDC/ACM)
support

Receive buffer size 3080 CDCACM_RXBUFSIZE

Size of the serial receive buffers. The actual amount of data that can
be held in the buffer is this number minus one due to the way that the
circular buffer is managed. So an RX buffer size of 257 will hold four
full-speed, 64 byte packets; a buffer size of 513 will hold one
high-speed, 512 byte packet.

Depends on: CDCACM && USBDEV

Device Drivers ➤ USB Device Driver Support ➤ USB Modem (CDC/ACM)
support

Transmit buffer size 769 CDCACM_TXBUFSIZE

Size of the serial transmit buffers. The actual amount of data that
can be held in the buffer is this number minus one due to the way that
the circular buffer is managed. So a TX buffer size of 769 will hold
one request of size 768; a buffer size of 193 will hold two requests
of size 96 bytes.

Depends on: CDCACM && USBDEV

Device Drivers ➤ USB Device Driver Support ➤ USB Modem (CDC/ACM)
support

Vendor ID 0x054c CDCACM_VENDORID

The vendor ID code/string. Default 0x0525 and "NuttX" 0x0525 is the
Netchip vendor and should not be used in any products. This default
VID was selected for compatibility with the Linux CDC ACM default VID.

Depends on: !CDCACM_COMPOSITE && CDCACM && USBDEV

Device Drivers ➤ USB Device Driver Support ➤ USB Modem (CDC/ACM)
support

Product ID 0x0bc2 CDCACM_PRODUCTID

The product ID code/string. Default 0xa4a7 and "CDC/ACM Serial" 0xa4a7
was selected for compatibility with the Linux CDC ACM default PID.

Depends on: !CDCACM_COMPOSITE && CDCACM && USBDEV

Device Drivers ➤ USB Device Driver Support ➤ USB Modem (CDC/ACM)
support

Vendor string SONY CDCACM_VENDORSTR

There is no help available for this option.

Depends on: !CDCACM_COMPOSITE && CDCACM && USBDEV

Device Drivers ➤ USB Device Driver Support ➤ USB Modem (CDC/ACM)
support

Product string CDC/ACM Serial CDCACM_PRODUCTSTR

There is no help available for this option.

Depends on: !CDCACM_COMPOSITE && CDCACM && USBDEV

1

1 件の回答 1

0

SDKチュートリアルが参考になると思います。
https://developer.sony.com/develop/spresense/docs/sdk_tutorials_ja.html#_system_cdcacm
この通りに設定すれば、拡張ボード側のUSBが新たなCOMポートとしてPC上に認識されると思います。
Spresenseソースコードからは/dev/ttyACM0 をopenしてread/writeすることでPCと通信できてます。

あと、Spresense Arduino環境でのUSBSerialライブラリというものも見つけました。
https://qiita.com/baggio/items/e62cb26630fdb78881f2
これも中身は/dev/ttyACM0に対してread/writeを行っているみたいです。

この質問に回答するには、ログインする必要があります。

求めていた回答ではありませんか? のタグが付いた他の質問を参照する。