The TLSR8258F512 integrates one Successive Approximation Register type (SAR) Analog-to-Digital Converter (ADC) module, which can be used to sample analog input signals such as battery voltage, temperature sensor, mono or stereo audio signals, as well as internal noise signal. ADC module supports 4 channels as follows:
All channels above can be combined freely or independently except Right channel, which only can be applied to the stereo audio with Left channel.
The operation process of every channel in the ADC module can be roughly divided into channel configuration phase ("Set State") and data conversion phase ("Capture State"). In the channel configuration phase, you must offer enough time to ensure all configurations be finished. Similarly, there is enough time for data conversion operations during the data conversion phase. All channels have data conversion phase and channel configuration phase except RNS channel. RNS channel only have data conversion phase.
The ADC module uses a polling mechanism to access the enabled channels in sequence. if all channels are enabled, The ADC module converts data from the RNS, to the left channel, to the right channel, and finally to the MISC channel.
In the channel configuration phase("Set State"), The main work of the ADC module is as follows:
In the data conversion phase("Capture State"), the RNS channel is to capture random number sequence(RNS) derived from internal noise. For the Left , Right and MiSC channels, data sampling, data conversion, and data output are required at this stage.
The total duration is the sum of the length of "Set State" and "Capture State" of all enabled channels, determines the sampling rate.
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 |
---|---|---|---|---|
adc_power_on_sar_adc() | power on ADC Module | API-ADC-CASE1 | 2019-1-10 | Done |
adc_reset_adc_module() | reset ADC Module | - | 2019-1-10 | Done |
adc_enable_clk_24m_to_sar_adc() | enable the clock of ADC Module | - | 2019-1-10 | Done |
adc_set_sample_clk() | set the divider of clock frequency for ADC Module | - | 2019-1-10 | Done |
adc_set_vref_chn_misc() | set the Vref of Misc channel | - | 2019-1-10 | Done |
adc_set_vref_chn_left() | set the Vref of Left channel | - | 2019-1-10 | Done |
adc_set_vref_chn_right() | set the Vref of Right channel | - | 2019-1-10 | Done |
adc_set_ref_voltage() | set the Vref for the specified channel | - | 2019-1-10 | Done |
adc_set_vref_vbat_divider() | set the divider of Vref for battery Detect | - | 2019-1-10 | Done |
adc_set_ain_negative_chn_misc() | select negative pin for Misc channel | - | 2019-1-10 | Done |
adc_set_ain_positive_chn_misc() | select positive pin for Misc channel | - | 2019-1-10 | Done |
adc_set_ain_negative_chn_left() | select negative pin for Left channel | - | 2019-1-10 | Done |
adc_set_ain_positive_chn_left() | select positive pin for Left channel | - | 2019-1-10 | Done |
adc_set_ain_negative_chn_right() | select negative pin for Right channel | - | 2019-1-10 | Done |
adc_set_ain_positive_chn_right() | select positive pin for Right channel | - | 2019-1-10 | Done |
adc_set_ain_channel_single_ended_input_mode() | set the input pin of the single-end mode for the specified channel | - | 2019-1-10 | Done |
adc_set_ain_channel_differential_mode() | set the positive and negative pin of the differential mode for the specified channel | - | 2019-1-10 | Done |
adc_set_ain_pre_scaler() | set the input prescaler for the specified channel | - | 2019-1-10 | Done |
adc_set_resolution_chn_misc() | set the resolution for Misc channel | - | 2019-1-10 | Done |
adc_set_resolution_chn_left() | set the resolution for Left channel | - | 2019-1-10 | Done |
adc_set_resolution_chn_right() | set the resolution for Right channel | - | 2019-1-10 | Done |
adc_set_resolution() | set the resolution for the specified channel | - | 2019-1-10 | Done |
adc_set_input_mode_chn_misc() | set the input mode for Misc channel | - | 2019-1-10 | Done |
adc_set_input_mode_chn_left() | set the input mode for Left channel | - | 2019-1-10 | Done |
adc_set_input_mode_chn_right() | set the input mode for Right channel | - | 2019-1-10 | Done |
adc_set_input_mode() | set the input mode for the specified channel | - | 2019-1-10 | Done |
adc_set_tsample_cycle_chn_misc() | set the sampling cycle for Misc channel | - | 2019-1-10 | Done |
adc_set_tsample_cycle_chn_left() | set the sampling cycle for Left channel | - | 2019-1-10 | Done |
adc_set_tsample_cycle_chn_right() | set the sampling cycle for Right channel | - | 2019-1-10 | Done |
adc_set_tsample_cycle() | set the sampling cycle for the specified channel | - | 2019-1-10 | Done |
adc_set_length_set_state() | set the length of set state for all channel | - | 2019-1-10 | Done |
adc_set_length_capture_state_for_chn_misc_rns() | set the length of capture state for Misc and RNS channel | - | 2019-1-10 | Done |
adc_set_length_capture_state_for_chn_left_right() | set the length of capture state for Left and Right channel | - | 2019-1-10 | Done |
adc_set_state_length() | set the length of set and capture state for all channels | - | 2019-1-10 | Done |
adc_set_chn_enable() | enable the specified channel | - | 2019-1-10 | Done |
adc_set_max_state_cnt() | set the number of max state for ADC module | - | 2019-1-10 | Done |
adc_set_itrim_preamp() | set pre-scaling for comparator preamp bias current trimming | - | 2019-1-10 | Done |
adc_set_itrim_vrefbuf() | set pre-scaling for Vref buffer bias current trimming | - | 2019-1-10 | Done |
adc_set_itrim_vcmbuf() | set pre-scaling for Vref(Vcmbuf) buffer bias current trimming | - | 2019-1-10 | Done |
adc_set_mode() | set mode for ADC Module | - | 2019-1-10 | Done |
pga_left_chn_power_on() | power on the Left channel of PGA | - | 2019-1-10 | Done |
pga_right_chn_power_on() | power on the Right channel of PGA | - | 2019-1-10 | Done |
adc_set_left_boost_bias() | set the boost bias of Left channel for ADC Module | - | 2019-1-10 | Done |
adc_set_right_boost_bias() | set the boost bias of Right channel for ADC Module | - | 2019-1-10 | Done |
adc_set_left_gain_bias() | set the gain bias of Left chanenl for ADC Module | - | 2019-1-10 | Done |
adc_set_right_gain_bias() | set the gain bias of Right chanenl for ADC Module | - | 2019-1-10 | Done |
adc_sample_and_get_result() | start adc sampling and get results | API-ADC-CASE1 | 2019-1-10 | Done |
adc_init() | initiate ADC Module | API-ADC-CASE1 | 2019-1-10 | Done |
adc_base_pin_init() | initiate the pin in the BASE mode of ADC Module | API-ADC-CASE1 | 2019-1-10 | Done |
adc_vbat_pin_init() | initiate the pin in the VBAT mode of ADC Module | API-ADC-CASE2 | 2019-1-10 | Done |
adc_base_init() | initiate ADC Module in the BASE mode | API-ADC-CASE1 | 2019-1-10 | Done |
adc_vbat_init() | initiate ADC Module in the VBAT mode | API-ADC-CASE2 | 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-ADC-CASE1 | Measuring external voltage by gpio | 2019-1-10 | Done |
API-ADC-CASE2 | Measuring internal battery voltage | 2019-1-10 | Done |
API-ADC-CASE3 | Measuring random number sequence | 2019-1-10 | Done |
Date | Description | Author |
---|---|---|
2019-1-10 | initial release | LJW |
2019-8-15 | update api name for application | LJW |