usbcsink3 2.1.0.0
|
USB C Sink 3 Click is a compact add-on board with a standalone autonomous USB power delivery controller. This board features the AP33771, a high-performance USB PD sink controller from Diodes Incorporated. It supports dead battery mode to allow a system to be powered from an external source directly, establishes a valid source-to-sink connection, and negotiates a USB power delivery (PD) contract with a PD-capable source device. It also supports a flexible PD3.0 and PPS for applications that require direct voltage and current requests, with fine-tuning capabilities.
We provide a library for the USB-C Sink 3 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
This library contains API for USB-C Sink 3 Click driver.
usbcsink3_cfg_setup
Config Object Initialization function. usbcsink3_init
Initialization function. usbcsink3_default_cfg
Click Default Configuration function. usbcsink3_set_voltage
USB-C Sink 3 set the voltage function. usbcsink3_set_power
USB-C Sink 3 set the power function. usbcsink3_get_vbus
USB-C Sink 3 get VBUS function. This example demonstrates the use of USB-C Sink 3 Click boardâ„¢ by setting DC power requests and control for Type-C connector-equipped devices (TCD).
The demo application is composed of two sections :
Initializes SPI, I2C and ADC modules and log UART. After driver initialization the app set default settings: Voltage Selection: 5 [V] and Power: 15.0 [W].
In this example, the app configures Power Data Objects (PDO) highest priority profile and requests power from a standard USB PD source adapter. It interprets power input requirements (voltage/current and maximum power) from the TCD. The example uses two configurations:
- Voltage 5 [V] and Power 15.0 [W]
- Voltage 9 [V] and Power 18.0 [W] Results are being sent to the Usart Terminal where you can track their changes.
FAULT LED flickering notified of the system status:
- Charging: Breathing light (2 sec dimming), 1 cycle is 4 sec.
- Fully charged: Continuously lit Charging current < 500mA.
- Mismatch: 1s flicker Voltage or power mismatch. Non-PD power source, 1 cycle is 2sec.
- Fault: 300ms flicker OVP, 1 cycle is 600ms.
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MikroElektronika compilers.