TSI USB Features

Introduction

The TLSR8258F512 has a full-speed(12Mbps) USB interface for communicating with other compatible digital deivces. The USB interface acts as a USB peripheral, responding to requests from a master host controller. The chip contains internal 1.5kohm pull-up resistor for the DP pin, which can be enabled by the relative API

Telink USB interface supports the Universal Serial Bus Specification, Revision v2.0 (USB v2.0 Specification)

The chip supports 9 endpoints, including control endpoint 0 and 8 configurable data endpoints. The specific description of each endpoint is as follows:

Endpoints Description
EDP0 control endpoint
EDP1 data endpoint: input
EDP2 data endpoint: input
EDP3 data endpoint: input
EDP4 data endpoint: input
EDP5 data endpoint: output
EDP6 data endpoint: output
EDP7 data endpoint: input
EDP8 data endpoint: input

In audio class application, only endpoint 6 supports Synchronous transmission (ISO) output mode, while endpoint 7 supports ISO input mode. In other applications, each endpoint can be configured as Bulk, Interrupt and ISO mode. For control endpoint 0, the chip's hardware vendor command is configurable.

The USB interface belongs to an independent power domain, and it can be configured to power down independently.

The USB Pins(DP and DM) is used as GPIO by default, so it can not be recognized by host controller after initial power on. To use USB function, user must configurate USB Pins (DP and DM).

USB APIs List

In order to facilitate users to quickly develop products according to their own needs, TSI provide the following related APIs and examples.

APIs list Description Example Update Date Status
usb_dp_pullup_en() enable or disable the 1.5k pull-up resistor of DP - 2019-1-10 Done
usb_power_on() power on or down the USB module, powered on by default - 2019-1-10 Done
usb_set_pin_en() enable the DP and DM of USB API-USB-CASE1 2019-1-10 Done
usbhw_reset_ctrl_ep_ptr() reset the pointer of control Endpoint - 2019-1-10 Done
usbhw_get_ctrl_ep_irq() get the irq status of control Endpoint - 2019-1-10 Done
usbhw_clr_ctrl_ep_irq() clear the irq status of control Endpoint - 2019-1-10 Done
usbhw_write_ctrl_ep_ctrl() set the value of control Endpoint - 2019-1-10 Done
usbhw_read_ctrl_ep_data() read the data of control Endpoint - 2019-1-10 Done
usbhw_write_ctrl_ep_data() write the data of control Endpoint - 2019-1-10 Done
usbhw_is_ctrl_ep_busy() determine whether control Endpoint is busy - 2019-1-10 Done
usbhw_reset_ep_ptr() reset the pointer of Endpoint - 2019-1-10 Done
usbhw_get_eps_irq() get the irq status of Endpoint - 2019-1-10 Done
usbhw_clr_eps_irq() clear the irq status of Endpoint - 2019-1-10 Done
usbhw_read_ep_data() read the data of Endpoint - 2019-1-10 Done
usbhw_write_ep_data() write the data of Endpoint - 2019-1-10 Done
usbhw_is_ep_busy() determine whether Endpoint is busy - 2019-1-10 Done
usbhw_data_ep_ack() set the specified data EndPoint to ack API-USB-CASE1 2019-1-10 Done
usbhw_data_ep_stall() set the specified data EndPoint to stall - 2019-1-10 Done
usbhw_set_printer_threshold() set the threshold of printer - 2019-1-10 Done
usbhw_disable_manual_interrupt() disable the manual interrupt - 2019-1-10 Done
usbhw_enable_manual_interrupt() enable the manual interrupt - 2019-1-10 Done
usbhw_write_ep() sends a bulk of data to host via the specified endpoint - 2019-1-10 Done
usbhw_write_ctrl_ep_u16() sends two bytes data to host via the control endpoint - 2019-1-10 Done
usbhw_read_ctrl_ep_u16() reads two bytes data from host via the control endpoint - 2019-1-10 Done
usb_irq_init() enable manual interrupt - 2019-1-10 Done
usb_handle_request_process() handle interrupt request from USB host at the begining, which is used to enum USB device API-USB-CASE1 2019-1-10 Done
usb_handle_ctl_ep_setup() handle SETUP process - 2019-1-10 Done
usb_handle_ctl_ep_data() handle DATA process - 2019-1-10 Done
usb_handle_ctl_ep_status() handle STATUS process - 2019-1-10 Done
usb_handle_irq_process() handle interrupt request from USB host for data transmition API-USB-CASE1 2019-1-10 Done
usb_cdc_tx_data_to_host() send CDC data to USB host API-USB-CASE3 2019-1-10 Done
usb_keyboard_hid_report() send key value of keyboard to USB host API-USB-CASE2 2019-1-10 Done
usb_mouse_hid_report() send key value of mouse to USB host API-USB-CASE1 2019-1-10 Done

TSI provides the following examples of this module to help users quickly understand and apply related modules.

Examples list Description Update Date Status
API-USB-CASE1 Mouse device 2019-1-10 Done
API-USB-CASE2 Keyborad device 2019-1-10 Done
API-USB-CASE3 CDC device 2019-1-10 Done
API-USB-CASE4 Microphone device 2019-1-10 Done
API-USB-CASE5 Speaker device 2019-1-10 Done

History Record

Date Description Author
2019-1-10 initial release LJW