This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
resources:tools-software:uc-drivers:ltc2672 [22 Feb 2023 02:31] – Marc Sosa | resources:tools-software:uc-drivers:ltc2672 [06 Apr 2023 04:42] (current) – Marc Sosa | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== LTC2672 - No-OS Driver ====== | ====== LTC2672 - No-OS Driver ====== | ||
- | ===== Supported Devices | + | ==== Supported Devices ==== |
* [[adi> | * [[adi> | ||
+ | ==== Evaluation Boards ==== | ||
+ | * [[ADI> | ||
+ | \\ | ||
===== Overview ===== | ===== Overview ===== | ||
The [[adi> | The [[adi> | ||
Line 12: | Line 14: | ||
The [[adi> | The [[adi> | ||
- | === Applications === | + | ==== Applications |
- | * Tunable | + | * Tunable |
* Semiconductor optical amplifier biasing | * Semiconductor optical amplifier biasing | ||
* Resistive heaters | * Resistive heaters | ||
- | * Current mode biasing | + | * Current-mode biasing |
{{ : | {{ : | ||
===== ADI No-OS ===== | ===== ADI No-OS ===== | ||
- | The goal of ADI Microcontroller No-OS is to be able to provide reference projects for lower end processors, which can't run Linux, or aren't running a specific operating system, to help those customers using microcontrollers with ADI parts. ADI No-OS offers **generic drivers** which can be used as a base for any microcontroller platform and also **example projects** which are using these drivers on various microcontroller platforms. | + | The goal of ADI Microcontroller No-OS is to provide reference projects for lower end processors, which can't run Linux or aren't running a specific operating system, |
- | + | ||
- | For more information about ADI No-OS and supported microcontroller platforms see: [[: | + | |
+ | For more information about ADI No-OS and supported microcontroller platforms, visit the [[: | ||
+ | \\ | ||
+ | \\ | ||
===== LTC2672 ADI No-OS driver ===== | ===== LTC2672 ADI No-OS driver ===== | ||
- | ==== LTC2672 | + | ==== Driver Source Code ==== |
The source code for LTC2672 driver can be found here: | The source code for LTC2672 driver can be found here: | ||
- | <WRAP round download | + | <WRAP round center |
* {{https:// | * {{https:// | ||
* {{https:// | * {{https:// | ||
</ | </ | ||
- | The driver also uses the ADI util library, so make sure you also add the necessary files in your project. The source code for the util library can be found here: | + | This driver also uses the ADI utility |
- | <WRAP round download | + | <WRAP round center |
* {{https:// | * {{https:// | ||
* {{https:// | * {{https:// | ||
</ | </ | ||
- | In order to be able to use this driver | + | To use the LTC2672 No-OS Driver, |
- | If the SPI communication is chosen, there are three functions which are called by the ADXL355 | + | If the SPI communication is chosen, there are three functions which are called by the LTC2672 |
- | * no_os_spi_init() | + | <WRAP center box 60%> |
- | * no_os_spi_write_and_read() | + | | **no_os_spi_init()** | initializes the communication peripheral. |
- | * no_os_spi_remove() | + | | **no_os_spi_write_and_read()** | writes and reads data to/from the device. |
+ | | **no_os_spi_remove()** | deinitializes the communication peripheral. | ||
+ | </ | ||
And there are two data types that have to be defined: | And there are two data types that have to be defined: | ||
- | | + | <WRAP center box 60%> |
- | * no_os_spi_init_param | + | | **no_os_spi_desc** | structure holding the SPI descriptor |
- | + | | **no_os_spi_init_param** | structure holding the parameters for SPI initialization | |
- | An example of a header file containing the prototypes of the functions which have to be implemented, | + | </ |
+ | An example of a header file containing the prototypes of the functions which have to be implemented, | ||
- | <WRAP round download | + | <WRAP round center |
* {{https:// | * {{https:// | ||
</ | </ | ||
- | ==== LTC2672 | + | ==== Code Documentation ==== |
- | Source code documentation for the driver is automatically generated using the Doxygen tool and it is available below: | + | Source code documentation for the driver is automatically generated using the Doxygen tool and can be accessed in these links: |
+ | <WRAP round center download 80%> | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
+ | </ | ||
- | + | ==== Device Configuration ==== | |
- | ==== LTC2672 | + | |
=== Driver Initialization === | === Driver Initialization === | ||
- | In order to use the device, you will have to provide the support for the communication protocol (SPI) as mentioned above. | + | To use the device, you need to provide the support for the communication protocol (SPI) as mentioned above. |
- | The first API to be called is **ltc2672_init**. Make sure that it returns 0, indicating | + | \\ |
+ | \\ | ||
+ | The first API function | ||
+ | \\ | ||
+ | \\ | ||
=== Output Span Configuration === | === Output Span Configuration === | ||
- | Each channel' | + | |
- | + | Use either of the following functions to configure the channel output span: | |
- | <note important> | + | <WRAP center box 80%> |
+ | | **ltc2672_set_span_channel** | allows each channel' | ||
+ | | **ltc2672_set_span_all_channels** | sets same output span across all channels | ||
+ | </ | ||
+ | <note important> | ||
=== Monitor Multiplexer Output Configuration === | === Monitor Multiplexer Output Configuration === | ||
- | The LTC2672 contains a multiplexer pin output which allows an external controller or Analog-to-Digital Converter | + | The [[ADI>LTC2672]] contains a multiplexer pin output, which allows an external controller or analog-to-digital converter |
- | + | \\ | |
- | == Current Measurement using Multiplexer | + | \\ |
- | The output current from any one channel can be measured by configuring the multiplexer | + | **Current Measurement using Multiplexer |
+ | \\ | ||
+ | The output current from any one channel can be measured by configuring the multiplexer | ||
< | < | ||
I_OUTx = I_FS(mA) * V_MUX / V_REF | I_OUTx = I_FS(mA) * V_MUX / V_REF | ||
</ | </ | ||
- | Where **V_REF** is the measurement from the VREF pin (~1.25V) | + | where: |
- | + | \\ | |
- | The current isn't directly measured but instead estimated from the DAC settings of the specified channel. This means that the measurement using the above equation is only valid when the output is properly terminated (not open / dropping out) and the output span is configured to a valid value (refer to header implementation). | + | **V_REF** is the measurement from the VREF pin (~1.25V). |
- | + | \\ | |
- | == Die Temperature Measurement using Multiplexer Output | + | **I_FS(mA)** is the output span setting in mA. |
- | Similar with the output current, the die temperature of the LTC2672 can also be measured through the **ltc2672_monitor_mux** function. The voltage at the multiplexer output pin varies directly with the temperature with a temperature coefficient of -3.7mV / °C. The die temperature can be estimated | + | \\ |
+ | \\ | ||
+ | The current isn't directly measured, but instead estimated from the DAC settings of the specified channel. This means that the measurement using the above equation is only valid when the output is properly terminated (not open/ | ||
+ | \\ | ||
+ | \\ | ||
+ | **Die Temperature Measurement using Multiplexer Output** | ||
+ | \\ | ||
+ | Similar with the output current, the die temperature of the [[ADI>LTC2672]] can also be measured through the **ltc2672_monitor_mux** function. The voltage at the multiplexer output pin varies directly with the temperature with a temperature coefficient of -3.7 mV/°C. The die temperature can be estimated | ||
< | < | ||
T = T0 + (V0 − V_MUX) / (3.7 mV/°C). | T = T0 + (V0 − V_MUX) / (3.7 mV/°C). | ||
</ | </ | ||
- | Where **T0 = 25°C** (initial temperature) | + | where: |
+ | \\ | ||
+ | **T0 = 25°C** (initial temperature). | ||
+ | \\ | ||
+ | **V0 = 1.4 V** (initial voltage). | ||
+ | \\ | ||
For calibration or more accurate measurements, | For calibration or more accurate measurements, | ||
+ | \\ | ||
+ | \\ | ||
=== Output Current Configuration === | === Output Current Configuration === | ||
- | Once the channel output spans have been set, the current output for each can now be set. Current can be set individually per channel using the **ltc2672_set_current_channel** API or similarly across all channels, given that they have the same output span, using the **ltc2672_set_current_all_channels**. | ||
- | < | + | Once the channel |
+ | |**ltc2672_set_current_channel**| allows output | ||
+ | | **ltc2672_set_current_all_channels** | sets similar output current across all channels (given that they have the same output span) | | ||
- | == Load Termination and Combining Multiple Channels | + | < |
- | Each output channel of the LTC2672 can output a maximum of 300mA. In instances where current greater than 300mA is needed, multiple channels can be tied together to produce the desired level. Channels tied together must operate in the same span category which can be done via **ltc2672_set_span_all_channels**. | + | \\ |
+ | **Load Termination and Combining Multiple Channels** | ||
+ | \\ | ||
+ | Each output channel of the [[ADI>LTC2672]] can output a maximum of 300 mA. In instances where current greater than 300 mA is needed, multiple channels can be tied together to produce the desired level. Channels tied together must operate in the same span category, which can be set using the **ltc2672_set_span_all_channels** | ||
- | Once the desired channels have been set to have similar output span, the target current can then be set by configuring the same channels via **ltc2672_set_current_channel**. For example, | + | Once the desired channels have been set to have similar output span, the target current can then be set by configuring the same channels via **ltc2672_set_current_channel** |
- | < | + | < |
=== Power Down Options === | === Power Down Options === | ||
- | Single or multiple channels can be powered down by using the **ltc2672_power_down_channel** or **ltc2672_power_down_all_channels** | + | To save power, you may use the following functions: |
+ | | **ltc2672_power_down_channel** | ||
+ | | **ltc2672_power_down_all_channels** | ||
+ | | **ltc2672_chip_power_down** | used to power down the entire chip, shutting down all other blocks such as the internal reference | ||
+ | \\ | ||
=== Output Current Toggle Configuration === | === Output Current Toggle Configuration === | ||
- | For instances | + | For instances |
- | + | <WRAP center box 50%> | |
- | Once setup, perform the toggle by repeatedly using the **ltc2672_global_toggle** | + | **ltc2672_setup_toggle** |
+ | \\ | ||
+ | **ltc2672_enable_channel** | ||
+ | </ | ||
+ | Once set up, perform the toggle by repeatedly using the **ltc2672_global_toggle** | ||
+ | \\ | ||
+ | \\ | ||
=== Fault Register Bits === | === Fault Register Bits === | ||
- | The first 8 bits of a SPI transaction response serve as fault indicators. Whenever a fault is detected, the corresponding Fault Register bit is set and is outputted on the next SPI transaction. If a SPI transaction fixes any of the existing faults, the cleared fault register bit is reflected on the next SPI transaction response. The faults that are detected include open circuit detection for any of the output channels, overtemperature detection (> 175°C) with thermal protection, and invalid SPI transaction length (valid lengths are 24, 32 and multiple of 32 bits). | + | The first 8 bits of an SPI transaction response serve as fault indicators. Whenever a fault is detected, the corresponding Fault Register bit is set and is outputted on the next SPI transaction. If an SPI transaction fixes any of the existing faults, the cleared fault register bit is reflected on the next SPI transaction response. The faults that are detected include open circuit detection for any of the output channels, overtemperature detection (> 175°C) with thermal protection, and invalid SPI transaction length (valid lengths are 24, 32, and multiple of 32 bits). |
+ | \\ | ||
+ | \\ | ||
+ | == Configuration Command == | ||
- | == Configuration Command == | + | |**ltc2672_config_command** |
- | Using the **ltc2672_config_command** allows disabling of any of the active fault detection mechanisms | + | |
- | ==== LTC2672 | + | For the valid corresponding mask or values, refer to the device data sheet. |
+ | \\ | ||
+ | \\ | ||
+ | ==== Driver Initialization Example ==== | ||
=== Example Initialization Using Maxim SDK as Platform === | === Example Initialization Using Maxim SDK as Platform === | ||
Line 192: | Line 236: | ||
} | } | ||
</ | </ | ||
+ | \\ | ||
+ | \\ | ||
+ | ==== Driver Application Example ==== | ||
+ | <WRAP center round tip 100%> | ||
+ | You can find application example projects for LTC2672 driver here: [[resources: | ||
+ | </ | ||
- | ==== LTC2672 Driver Application Example ==== | ||
- | You can find Application Example Projects for LTC2672 driver here: [[resources: |