LPC4300 Series microcontrollers combine the high performance and flexibility of an asymmetric dual-core architecture (ARM Cortex-M4F and Cortex-M0 coprocessor) with multiple high-speed connectivity options, advanced timers, analog, and optional security features to secure code and data communications. DSP capabilities enable all LPC43xx families to support complex algorithms in data-intensive application. Flash and Flashless options support large, flexible internal and external memory configurations.
LPC4370/LPC43S70 products provide 12-bit high-speed ADC module with up to 80MSamples/s. This document does not test 12-bit high-speed ADC performance. LPC43xx/LPC43Sxx series products provide two 10-bit SAR ADC module with below features:
* Measurement range 0 to 3.3 V
* 10-bit conversion time = 2.45 us (up to 400K Samples/s)
* Burst conversion mode for single or multiple inputs
* Support hardware/software trigger
* Support Interrupt/DMA mode
This test hardware platform uses Keil MCB4357 evaluation board (OM13040), which enables customer to create and test working programs based on the LPC4300 family of Dual Core ARM Cortex™-M4/M0 devices. Keil MCB4357 with below features:
This test software uses LPCOpen software ADC demo, the software version is V2.20.
ADC demo default path is:
..\lpcopen_2_19_keil_iar_keil_mcb_4357\applications\lpc18xx_43xx\iar\keil_mcb_4357\periph_example.eww
LPCOpen software [periph_example.eww] project provides LPC4357 most modules driver application demos.
The ADC demo need precompile MCB4357 board support package (lib_lpc_board_keil_mcb_4357) and LPC43xx chip driver (lib_lpc_chip_43xx). MCB4357 board support package provides MCB4357 board related pins configuration, clock configuration, on-board external memory configuration, Ethernet PHY driver configuration and board hardware resource configuration; LPC43xx chip driver provides LPC43xx modules driver API function.
ADC demo provides three modes to get ADC conversion value: polling mode, interrupt mode and DMA mode. The demo config 10-bit ADC module with 400K Samples/s and ARM Cortex-M4 core clock frequency with 204MHz. The test uses Timer0 module as time-base and counter reference clock is same with ARM Cortex-M4 core clock frequency (204MHz).
Timer0 initialization code comments:
ADC module initialization code comments:
ADC polling mode code comments:
ADC interrupt mode code comments:
ADC DMA mode code comments:
The test will use TIMER0 counter to calculate each test item time interval.
The test includes below test items:
Single/no burst: ADC convert one time with burst mode disabled
100K/no burst: ADC convert 100K times with burst mode disabled
Single/burst: ADC convert one time with burst mode enabled
100K/burst: ADC convert 100K times with burst mode enabled