AN12232 QN908x ADC Application Note

Similar documents
TED-Kit 2, Release Notes

AN NHS3xxx Temperature sensor calibration. Document information

AN Energy Harvesting with the NTAG I²C and NTAG I²C plus. Application note COMPANY PUBLIC. Rev February Document information

AN MIFARE Plus Card Coil Design. Application note COMPANY PUBLIC. Rev April Document information

AN12165 QN908x RF Evaluation Test Guide

AN Maximum RF Input Power BGU6101. Document information. Keywords Abstract

AN11994 QN908x BLE Antenna Design Guide

R_ Driving LPC1500 with EPSON Crystals. Rev October Document information. Keywords Abstract

AN High-performance PCB antennas for ZigBee networks. Document information. Keywords

In data sheets and application notes which still contain NXP or Philips Semiconductors references, use the references to Nexperia, as shown below.

TN LPC1800, LPC4300, MxMEMMAP, memory map. Document information

UM OM29263ADK Quick start guide antenna kit COMPANY PUBLIC. Document information

In data sheets and application notes which still contain NXP or Philips Semiconductors references, use the references to Nexperia, as shown below.

PTN5100 PCB layout guidelines

OM29110 NFC's SBC Interface Boards User Manual. Rev May

UM10950 Start-up Guide for FRDM-KW41Z Evaluation Board Bluetooth Paring example with NTAG I²C plus Rev February

UM Slim proximity touch sensor demo board OM Document information

AN NTAG21xF, Field detection and sleep mode feature. Rev July Application note COMPANY PUBLIC. Document information

UM User manual for di2c demo board. Document information

ES_LPC1114. Errata sheet LPC1114. Document information

AN NFC, PN533, demo board. Application note COMPANY PUBLIC. Rev July Document information

AN PR533 USB stick - Evaluation board. Application note COMPANY PUBLIC. Rev May Document information

PN7120 NFC Controller SBC Kit User Manual

AN Ohm FM LNA for embedded Antenna in Portable applications with BGU7003W. Document information. Keywords Abstract

UM DALI getting started guide. Document information

AN TEA1892 GreenChip synchronous rectifier controller. Document information

AN Thermal considerations BGA3131. Document information. Keywords Abstract

UM DALI getting started guide. Document information

AN Replacing HMC625 by NXP BGA7204. Document information

UM GreenChip TEA1995DB1295 synchronous rectifier controller demo board. Document information

AN Low Noise Fast Turn ON-OFF GHz WiFi LNA with BFU730F. Document information

AN UBA2015/UBA2017 saturating inductor support during ignition. Document information

UM Description of the TDA8029 I2C Demo Board. Document information

BGU8007/BGU7005 Matching Options for Improved LTE Jammer Immunity

AN Programming the PCA200x family of watch ICs. Document information

AN PN7150X Frequently Asked Questions. Application note COMPANY PUBLIC. Rev June Document information

AN BFU725F/N1 2.4 GHz LNA evaluation board. Document information. Keywords. LNA, 2.4GHz, BFU725F/N1 Abstract

PN7150 Raspberry Pi SBC Kit Quick Start Guide

PN7120 NFC Controller SBC Kit User Manual

AN UCODE I2C PCB antenna reference designs. Application note COMPANY PUBLIC. Rev October Document information

AN12082 Capacitive Touch Sensor Design

In data sheets and application notes which still contain NXP or Philips Semiconductors references, use the references to Nexperia, as shown below.

AN GHz to 2.7 GHz Doherty power amplifier using the BLF7G27LS-150P. Document information

UM TEA1721 universal mains white goods flyback SMPS demo board. Document information

In data sheets and application notes which still contain NXP or Philips Semiconductors references, use the references to Nexperia, as shown below.

Two elements in series configuration in a small SMD plastic package Low diode capacitance Low diode forward resistance AEC-Q101 qualified

AN Relay replacement by NXP high-power bipolar transistors in LFPAK56. Document information

TN ADC design guidelines. Document information

Planar PIN diode in a SOD523 ultra small plastic SMD package.

Four planar PIN diode array in SOT363 small SMD plastic package.

VHF variable capacitance diode

AN How to design an antenna with DPC. Rev November Application note COMPANY PUBLIC. Document information.

BAP Product profile. 2. Pinning information. 3. Ordering information. Silicon PIN diode. 1.1 General description. 1.2 Features and benefits

Quad 2-input EXCLUSIVE-NOR gate

50 ma LED driver in SOT457

Hex non-inverting precision Schmitt-trigger

PNP 5 GHz wideband transistor. Oscilloscopes and spectrum analyzers Radar systems RF wideband amplifiers

BFU550XR ISM 433 MHz LNA design. BFU520, BFU530, BFU550 series, ISM-band, 433MHz 866MHz Abstract

HEF4002B. 1. General description. 2. Features and benefits. 3. Ordering information. 4. Functional diagram. Dual 4-input NOR gate

AN High Ohmic FM LNA for embedded Antenna in Portable applications with BGU6102. Document information. Keywords

NPN power transistor with integrated diode

BB Product profile. 2. Pinning information. 3. Ordering information. FM variable capacitance double diode. 1.1 General description

Hex inverting HIGH-to-LOW level shifter

20 ma LED driver in SOT457

Single D-type flip-flop; positive-edge trigger. The 74LVC1G79 provides a single positive-edge triggered D-type flip-flop.

BCP56H series. 80 V, 1 A NPN medium power transistors

KMA22x; KMA32x handling information

Single Schmitt trigger buffer

Quad 2-input EXCLUSIVE-NOR gate

4-bit bidirectional universal shift register

AN BGA GHz 16 db gain CATV amplifier. Document information. Keywords. BGA3021, Evaluation board, CATV, Medium Power.

Symbol Parameter Conditions Min Typ Max Unit V F forward voltage I F =10mA

Dual 4-bit static shift register

Broadband LDMOS driver transistor. A 5 W LDMOS power transistor for broadcast and industrial applications in the HF to 2500 MHz band.

Planar PIN diode in a SOD882D leadless ultra small plastic SMD package.

Hex non-inverting HIGH-to-LOW level shifter

AN BGU6009/N2 GNSS LNA evaluation board. Document information. Keywords. BGU6009/N2, GNSS, LNA Abstract

HEF4014B. 1. General description. 2. Features and benefits. 3. Applications. 4. Ordering information. 8-bit static shift register

Hyperfast power diode in a SOD59 (2-lead TO-220AC) plastic package.

74HC03; 74HCT03. Quad 2-input NAND gate; open-drain output

74AHC1G00; 74AHCT1G00

Quad 2-input NAND buffer (open collector) The 74F38 provides four 2-input NAND functions with open-collector outputs.

Analog high linearity low noise variable gain amplifier

74HC86; 74HCT86. Quad 2-input EXCLUSIVE-OR gate

Analog high linearity low noise variable gain amplifier

Symbol Parameter Conditions Min Typ Max Unit V F forward voltage I F =10mA

Hex inverting buffer; 3-state

LOCMOS (Local Oxidation CMOS) to DTL/TTL converter HIGH sink current for driving two TTL loads HIGH-to-LOW level logic conversion

Quad 2-input EXCLUSIVE-NOR gate

74AHC1G08; 74AHCT1G08

BYV34X Product profile. 2. Pinning information. Dual rectifier diode ultrafast. 1.1 General description. 1.2 Features. 1.

1-of-2 decoder/demultiplexer

1-of-8 FET multiplexer/demultiplexer. The CBT3251 is characterized for operation from 40 C to +85 C.

Logic controlled high-side power switch

74HC4075; 74HCT General description. 2. Features and benefits. Ordering information. Triple 3-input OR gate

BT D. 1. General description. 2. Features and benefits. 3. Applications. 4. Quick reference data. 4Q Triac

Output rectifiers in high-frequency switched-mode power supplies

75 MHz, 30 db gain reverse amplifier

In data sheets and application notes which still contain NXP or Philips Semiconductors references, use the references to Nexperia, as shown below.

4-bit bidirectional universal shift register

Transcription:

Rev. 0.1 August 2018 Application note Document information Info Content Keywords QN908x, BLE, ADC Abstract This application note describes the ADC usage.

Revision history Rev Date Description 0.1 2018/08 Initial release Contact information For more information, please visit: http://www.nxp.com All information provided in this document is subject to legal disclaimers. NXP Semiconductors N.V.2018. All rights reserved. Application note Rev. 0.1 August 2018 2 of 18

1. Introduction 2. Input mode The Analog Digital Converter (ADC) is a Sigma Delta ADC with CIC filter and decimation filter. Main Features: 23 bits data output, containing 1 sign bit Integrated PGA 8 external input channels and 3 internal channels for battery monitoring, temperature sensing, offset calibration and random number generation Selectable reference voltage from VCC, internal bandgap, or external reference Window compare function with interrupt capability Supports DMA The following will introduce the single mode, differential mode. Before using the ADC module, the power and clock for ADC should be enabled. single-ended mode: Single-ended mode For single-ended analog input usage, the negative input is connected to an internal voltage, Vinn, which is generated from the ADC reference voltage (Vref) and configurable from Vref, 3/4 Vref, 1/2 Vref or GND. If PGA_GAIN =1 and ADC_GAIN=1, then the formula for single mode is: (Vadcx Vinn) / Vref = RegData / 2 22 Vadcx = (RegData / 2 22 ) * Vref + Vinn Vadcx: Voltage of analog input single from pin Vinn: Voltage common input, it can be chosen from Vref, 1/2Vref, 3/4Vref and GND. All information provided in this document is subject to legal disclaimers. NXP Semiconductors N.V. 2018 All rights reserved. Application note Rev. 0.1 August 2018 3 of 18

Vref: Reference voltage, it can be chosen from internal bandgap, VCC and external reference on pin PA07. The internal bandgap voltage store on flash information address(0x210b07f4). RegData: Read from DATA register. Measurement range: ADCx Vinn range from -Vref to +Vref. That is -Vref <= (ADCx Vinn) <= Vref Vinn - Vref <= ADCx <= (Vinn + Vref) In addition, Vss <= ADCx <= Vcc. For example: Vss = GND Vcc = 3.0V Vref = internal bandgap voltage about 1.2V. Vref Gain = 1.0 GAIN = 1.0 Vinn = 3/4 Vref = 0.9 V Vinn - Vref <= ADCx <= Vinn + Vref -0.3 V <= ADCx <= 2.1 V GND <= ADCx <= 2.1 V differential mode: Differential mode The ADC core is a differential ADC. The channels 0~3 are for external differential input. The formula for defferential mode is: (Vp Vn) / Vref = RegData / 2 22 Vp Vn = (RegData / 2 22 ) * Vref The Vp Vn can be either positive or negative depending on which input is at higher voltage. Vp: Analog input from positive pin All information provided in this document is subject to legal disclaimers. NXP Semiconductors N.V. 2018 All rights reserved. Application note Rev. 0.1 August 2018 4 of 18

Vn: Analog input from negative pin Vref: Reference voltage, it can be chosen from internal bandgap, VCC and external reference on pin PA07. The internal bandgap voltage store on flash information address(0x210b07f4). RegData: Read from DATA register. 3. Output data rate The output data rate depends on ADC clock and CIC down sample rate. Output data rate = ADC clock / down sample rate For example, the clock is 500 k, which is simply set as adcconfigstruct.clock = kadc_clock500 K; the down sample rate is 256, which is simply set as adcsdconfigstruct.downsample = kadc_downsample256; set the convert mode to Burst convert mode, which is set as adcconfigstruct.convmode = kadc_convmodeburst; each time the conversion is completed, output a pulse in a GPIO pin, and the following waveform can be obtained. The output data rate is 500 K / 256 = 1.953 K, it is consistent with the measurement results. Output data rate All information provided in this document is subject to legal disclaimers. NXP Semiconductors N.V. 2018 All rights reserved. Application note Rev. 0.1 August 2018 5 of 18

4. Conversion modes The ADC supports multiple conversion modes, which are controlled by register bits CONV_MODE and SCAN_MODE. The following is the conversion process of each mode. Single mode: In this mode, ADC performs only one conversion of one channel, and then stops once the conversion is complete. Single mode convmode = kadc_convmodesingle; ADC_DoSoftwareTrigger() kadc_datareadyflag is ok? N Y ADC_GetConversionResult() End of conversion Flow chart (Single mode) All information provided in this document is subject to legal disclaimers. NXP Semiconductors N.V. 2018 All rights reserved. Application note Rev. 0.1 August 2018 6 of 18

Burst mode: In this mode, ADC will perform successive conversion of one channel, and will not stop until the register bit ENABLE is cleared. burst mode convmode = kadc_convmodeburst; ADC_DoSoftwareTrigger() kadc_datareadyflag is ok? N Y ADC_GetConversionResult() reach the number of conversions? N Y ADC_Enable(DEMO_ADC_BASE, false) End of conversion Flow chart (Burst mode) All information provided in this document is subject to legal disclaimers. NXP Semiconductors N.V. 2018 All rights reserved. Application note Rev. 0.1 August 2018 7 of 18

Single scan mode: In this mode, ADC performs only one conversion of all the selected channels by register CH_SEL. After complete one round of scan of all enabled channels, the ADC will stop automatically. Single scan mode convmode = kadc_convmodesinglescan; ADC_DoSoftwareTrigger() kadc_datareadyflag is ok? N Y ADC_GetConversionResult() All channel conversions are complete? N Y End of conversion Flow chart (Single scan mode) All information provided in this document is subject to legal disclaimers. NXP Semiconductors N.V. 2018 All rights reserved. Application note Rev. 0.1 August 2018 8 of 18

burst scan mode: In this mode, ADC will perform successive conversion of all the selected channels by register CH_SEL, and will not stop until the register bit ENABLE is cleared. All information provided in this document is subject to legal disclaimers. NXP Semiconductors N.V. 2018 All rights reserved. Application note Rev. 0.1 August 2018 9 of 18

burst scan mode convmode = kadc_convmodeburstscan; ADC_DoSoftwareTrigger() kadc_datareadyflag is ok? N Y ADC_GetConversionResult() All channel conversions are complete? N Y reach the number of conversions? N ADC_Enable(DEMO_ADC_BASE, false) Y End of conversion Flow chart (Burst scan mode) 5. Cautions Input Voltage Range: All information provided in this document is subject to legal disclaimers. NXP Semiconductors N.V. 2018 All rights reserved. Application note Rev. 0.1 August 2018 10 of 18

Input voltage range(vinp-vinn) is either 0.8 * Vref / GAIN at Vref = 1.2 V, or 0.5 * Vref / GAIN at Vref = VCC. where, GAIN = PGA_GAIN * ADC_GAIN. If a PGA is enabled, pay attention to output voltage swing limitations of the operational amplifier. The following figure is a comparison instance of PGA enable and bypass. PGA_GAIN=1 VS PGA_BYPASS Sample vs Noise: According to the Sigma Delta ADC principle, the higher down sample rate, the smaller the noise, as shown in the two figures below. down sample 32 / down sample 256 All information provided in this document is subject to legal disclaimers. NXP Semiconductors N.V. 2018 All rights reserved. Application note Rev. 0.1 August 2018 11 of 18

down sample 32 / down sample 256 6. Calibration In order to get the best performance from the ADC two parameters should be calibrated. These parameters are offset and gain. When the PGA is bypass, the input and output errors of ADC are small, and the customers can choose whether or not to calibrate according to their own system requirements. It can be seen from fig.11 that the measurement value of ADC is the largest deviation of the actual value of 2 mv. PAG Bypass All information provided in this document is subject to legal disclaimers. NXP Semiconductors N.V. 2018 All rights reserved. Application note Rev. 0.1 August 2018 12 of 18

When the PGA is enable, the input and output errors of ADC gets large, we can do some calibration to correct the error. The calibration process is as follows: 1) Prepare two accurate voltage output, V1, V2 2) Measure these two voltage points to get ADC output adc1, adc2 3) According to points of (adc1, V1), (adc2, V2), find the function Vy = adcx * a + b 4) The correct voltage value can be calculated by a and b The figure 12 is a set of test data before calibration, can see that the measured value and the actual value deviation are up to 8 mv. The figure 13 is a set of test data after calibration, the deviation decreased to 0.2 mv. PAG Gain=1 Before the calibration All information provided in this document is subject to legal disclaimers. NXP Semiconductors N.V. 2018 All rights reserved. Application note Rev. 0.1 August 2018 13 of 18

PAG Gain=1 After the calibration 7. Temperature measurement The ADC module has a P-N transistor junction with temperature dependent properties acting as an embedded temperature sensor. The voltage across this junction rises or lowers with temperature allowing silicon to act as a temperature sensor. Figure 14 shows the typical ADC readings(mv) of the temperature sensor output across a range of temperatures. Typical ADC Temperature Readings All information provided in this document is subject to legal disclaimers. NXP Semiconductors N.V. 2018 All rights reserved. Application note Rev. 0.1 August 2018 14 of 18

The graph shows that the temperature sensor output is linear. The temperature sensor output voltage is highest at cold temperatures and lowest at hot temperatures. The readings range from 916d at 40 C down to 755d at 80 C. An approximate transfer function demonstrated in the following sections represents this behavior. Typically, the relation between Temp sensor value (T) vs output voltage V will exhibit this equation: V = -a * T + b where: a and b are constant. After the test statistics, we fixed slope a as coe ; Through the calibration of a point, that is, we measure the corresponding voltage value of a temperature point in the production phase, and we can obtain a point on the line (T0, offset). where: T0 is the ambient temperature during the production calibration; offset is the voltage value of the measured ADC output. Then the formula above can be deformed: V offset = (T0 T) * coe T = (offset V) / coe + T0 The value of offset coe and T0 are stored in flash, and detailed information is in the 7.3.1.1 flash information page section of UM11023. Because the measured temperature is the internal temperature of the chip, it may be affected by the heat dissipation condition of the actual device. The final value of offset will add a correction factor ADC_TEMP_CORRECTION_FACTOR in the application. Table 1. Measurement result shown: Temperature ( ) ADC Output (mv) Temperature Result( ) Delta( ) -40 916.05-39.43 0.57-20 888.925-19.35 0.65 0 862.48 0.24 0.24 20 835.73 20.05 0.05 40 808.92 39.91-0.09 All information provided in this document is subject to legal disclaimers. NXP Semiconductors N.V. 2018 All rights reserved. Application note Rev. 0.1 August 2018 15 of 18

60 782.26 59.66-0.34 80 755.3 79.63-0.37 Temperature Error All information provided in this document is subject to legal disclaimers. NXP Semiconductors N.V. 2018 All rights reserved. Application note Rev. 0.1 August 2018 16 of 18

8. Legal information 8.1 Definitions Draft The document is a draft version only. The content is still under internal review and subject to formal approval, which may result in modifications or additions. NXP Semiconductors does not give any representations or warranties as to the accuracy or completeness of information included herein and shall have no liability for the consequences of use of such information. 8.2 Disclaimers Limited warranty and liability Information in this document is believed to be accurate and reliable. However, NXP Semiconductors does not give any representations or warranties, expressed or implied, as to the accuracy or completeness of such information and shall have no liability for the consequences of use of such information. NXP Semiconductors takes no responsibility for the content in this document if provided by an information source outside of NXP Semiconductors. In no event shall NXP Semiconductors be liable for any indirect, incidental, punitive, special or consequential damages (including - without limitation - lost profits, lost savings, business interruption, costs related to the removal or replacement of any products or rework charges) whether or not such damages are based on tort (including negligence), warranty, breach of contract or any other legal theory. Notwithstanding any damages that customer might incur for any reason whatsoever, NXP Semiconductors aggregate and cumulative liability towards customer for the products described herein shall be limited in accordance with the Terms and conditions of commercial sale of NXP Semiconductors. Right to make changes NXP Semiconductors reserves the right to make changes to information published in this document, including without limitation specifications and product descriptions, at any time and without notice. This document supersedes and replaces all information supplied prior to the publication hereof. Suitability for use NXP Semiconductors products are not designed, authorized or warranted to be suitable for use in life support, life-critical or safety-critical systems or equipment, nor in applications where failure or malfunction of an NXP Semiconductors product can reasonably be expected to result in personal injury, death or severe property or environmental damage. NXP Semiconductors and its suppliers accept no liability for inclusion and/or use of NXP Semiconductors products in such equipment or applications and therefore such inclusion and/or use is at the customer s own risk. Applications Applications that are described herein for any of these products are for illustrative purposes only. NXP Semiconductors makes no representation or warranty that such applications will be suitable for the specified use without further testing or modification. Customers are responsible for the design and operation of their applications and products using NXP Semiconductors products, and NXP Semiconductors accepts no liability for any assistance with applications or customer product design. It is customer s sole responsibility to determine whether the NXP Semiconductors product is suitable and fit for the customer s applications and products planned, as well as for the planned application and use of customer s third party customer(s). Customers should provide appropriate design and operating safeguards to minimize the risks associated with their applications and products. NXP Semiconductors does not accept any liability related to any default, damage, costs or problem which is based on any weakness or default in the customer s applications or products, or the application or use by customer s third party customer(s). Customer is responsible for doing all necessary testing for the customer s applications and products using NXP Semiconductors products in order to avoid a default of the applications and the products or of the application or use by customer s third party customer(s). NXP does not accept any liability in this respect. Export control This document as well as the item(s) described herein may be subject to export control regulations. Export might require a prior authorization from competent authorities. Translations A non-english (translated) version of a document is for reference only. The English version shall prevail in case of any discrepancy between the translated and English versions. Evaluation products This product is provided on an as is and with all faults basis for evaluation purposes only. NXP Semiconductors, its affiliates and their suppliers expressly disclaim all warranties, whether express, implied or statutory, including but not limited to the implied warranties of noninfringement, merchantability and fitness for a particular purpose. The entire risk as to the quality, or arising out of the use or performance, of this product remains with customer. In no event shall NXP Semiconductors, its affiliates or their suppliers be liable to customer for any special, indirect, consequential, punitive or incidental damages (including without limitation damages for loss of business, business interruption, loss of use, loss of data or information, and the like) arising out the use of or inability to use the product, whether or not based on tort (including negligence), strict liability, breach of contract, breach of warranty or any other theory, even if advised of the possibility of such damages. Notwithstanding any damages that customer might incur for any reason whatsoever (including without limitation, all damages referenced above and all direct or general damages), the entire liability of NXP Semiconductors, its affiliates and their suppliers and customer s exclusive remedy for all of the foregoing shall be limited to actual damages incurred by customer based on reasonable reliance up to the greater of the amount actually paid by customer for the product or five dollars (US$5.00). The foregoing limitations, exclusions and disclaimers shall apply to the maximum extent permitted by applicable law, even if any remedy fails of its essential purpose. 8.3 Licenses Purchase of NXP <xxx> components <License statement text> 8.4 Patents Notice is herewith given that the subject device uses one or more of the following patents and that each of these patents may have corresponding patents in other jurisdictions. <Patent ID> owned by <Company name> 8.5 Trademarks Notice: All referenced brands, product names, service names and trademarks are property of their respective owners. <Name> is a trademark of NXP Semiconductors N.V. All information provided in this document is subject to legal disclaimers. NXP Semiconductors N.V.2018. All rights reserved. Application note Rev. 1.0 18 April 20168 17 of 18

9. Index Contents 1. Introduction... 3 2. Input mode... 3 3. Output data rate... 5 4. Conversion modes... 6 5. Cautions... 10 6. Calibration... 12 7. Temperature measurement... 14 8. Legal information... 17 8.1 Definitions... 17 8.2 Disclaimers... 17 8.3 Licenses... 17 8.4 Patents... 17 8.5 Trademarks... 17 9. Index... 18 All information provided in this document is subject to legal disclaimers. NXP Semiconductors N.V.2018. All rights reserved. Application note Rev. 0.1 August 2018 18 of 18