Instruction manual
Renesas USB MCU and USB ASSP USB Basic Host and Peripheral firmware
R01AN0512EJ0210 Rev.2.10 Page 116 of 157
Apr 1, 2013
5.8 Data Transfer and Control Data Transfer
5.8.1 Data transfer request
When using the ANSI IO API interface, use read() or write() to start the data transfer request.
When not using the ANSI interface, use R_usb_pstd_TransferStart() to start the data transfer. For more details on the
API functions described here, please refer to the corresponding API section.
[Note] Control transfer cannot use the ANSI interface. Please use R_usb_hstd_TransferStart(), when Control transfer is
performed.
5.8.2 Notice of a transmission result
When a data transfer completes, the firmware notifies the HDCD of the data transfer completion and the sequence toggle
bit information in the call-back function registered when the data transfer was requested.
The results of the transfer are stored in the USB_UTR_t structure member (status).
Below, a communication result is shown.
USB_CTRL_END : Control transfer normal end
USB_DATA_NONE : Data transmit normal end
USB_DATA_OK : Data receive normal end
USB_DATA_SHT : Data receive normal end with less than specified data length
USB_DATA_OVR : Receive data size exceeded
USB_DATA_ERR : No-response condition or over/under run error detected
USB_DATA_STALL : STALL response or MaxPacketSize error detected
USB_DATA_STOP : Data transfer forced end
USB_DATA_TMO : Forced end due to timeout, no call-back (RTOS only)
5.8.3 Data transfer retry
When a no-response condition occurs on a pipe, USB-BASIC-FW performs communication retries up to the user-
specified number of times. If the no-response condition continues through the end of the user-specified number of retries,
the notification USB_DATA_ERR is returned to HDCD.