Electronic Components Datasheet Search
  English  ▼

X  

UM0851 Datasheet(PDF) 187 Page - STMicroelectronics

Part # UM0851
Description  SPEAr is a family of highly customizable ARM-based embedded
PDF  245 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

UM0851 Datasheet(HTML) 187 Page - STMicroelectronics

Back Button UM0851 Datasheet HTML 183Page - STMicroelectronics UM0851 Datasheet HTML 184Page - STMicroelectronics UM0851 Datasheet HTML 185Page - STMicroelectronics UM0851 Datasheet HTML 186Page - STMicroelectronics UM0851 Datasheet HTML 187Page - STMicroelectronics UM0851 Datasheet HTML 188Page - STMicroelectronics UM0851 Datasheet HTML 189Page - STMicroelectronics UM0851 Datasheet HTML 190Page - STMicroelectronics UM0851 Datasheet HTML 191Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 187 / 245 page
background image
UM0851
Human interface device (HID) drivers
Doc ID 16604 Rev 2
187/245
Common configuration of all ADC channels can be done using the following calls:
User level:
ioctl(fd, ADCIOC_CONFIG, &config);
On success, zero is returned otherwise -1 is returned and errno is set appropriately.
Kernel level:
spear_adc_configure(dev, ADC_CHANNEL0, &config);
On success, zero is returned otherwise negative standard kernel errors are returned.
The above functions will be successful if the ADC is not being used by another user.
In the function calls, config is an instance of struct adc_config:
struct adc_config {
enum adc_conv_mode mode; /* mode to be configured, can be single or
continuous . */
enum adc_volt_ref volt_ref; /* reference of voltage, can be internal
or external
*/
unsigned int mvolt; /* This is reference voltage applied to ADC. It
will be useful in calculating output voltage in
millivolts. Provide mvolt in millivolt. */
enum adc_scan_ref scan_ref; /* reference of scan rate, can be internal or
external */
#ifdef CONFIG_MACH_SPEAR300
enum adc_resolution resolution; /* resolution of output data, can be
normal, 10 bit, or high, 17 bit, only
for SPEAR300*/
#endif
unsigned int req_clk; /* ADC clock requested, in Hz
*/
unsigned int avail_clk; /* closest clock less than equal to req_clk
possible, in Hz
*/
};
The default configuration done at initialization is:
struct adc_config adc_config = {
.mode = CONTINUOUS_CONVERSION;
.volt_ref = EXTERNAL_VOLT;
.mvolt = 2500,
.scan_ref = INTERNAL_SCAN;
#ifdef CONFIG_MACH_SPEAR300
.resolution = NORMAL_RESOLUTION;
#endif
.req_clk = 14000000};
ADC channel configuration
Channel configuration can be done using the following calls:
User level:
ioctl (fd, ADCIOC_CHAN_CONFIG, &chan_config);
On success, a zero is returned otherwise -1 is returned and errno is set appropriately.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com