kevinmehall/usb

Unable to read more the 1 Byte using ATSAMD21 USB CDC

Closed this issue · 1 comments

-My application is to receive data from java (GUI) application,and send it back to the GUI.
The reading of the received data is creating the issue. It is only able to read one byte.

-I can send other data it is not a problem. So i'm assuming that the read call is creating issue.
-Receiving of multiple bytes only creating issue. I checked the USB traffic using wireshark. Here the
host is sending complete data.
->I'm working using atmel studio 7.0, the code which i'm using is USB Communication Device Class (CDC) for ATSAMD21.

->The code which i'm using and the documentation link is here http://asf.atmel.com/docs/latest/common.services.usb.class.cdc.device.example.samd21_xpro/html/files.html
-For sending and receiving i'm using the same Target USB port .
-My application is to read the data coming from host using Target USB port & Send the exact data back
through Target USB port .
-Here i'm attaching the part of the code where the main application please check the file "uart_samd.c" and following functions

1.static void usart_rx_callback(struct usart_module *const module)
2.static void usart_tx_callback(struct usart_module *const module)
3.void uart_rx_notify(uint8_t port) 

Please check this issue and help me with a solution.

Thanks in Advance

It sounds like you're using the Atmel ASF USB code rather than this library? This is not the place to get help with ASF.