Is it possible to read a single ended input on a DMx input pin?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is it possible to read a single ended input on a DMx input pin?

615 Views
robotjosh
Contributor IV

  I'm using the K40X256 tower board and one of the backemf signals from the 3phase motor board goes to ADC0_DM0 and I need to read it.  Processor expert warns me if I try to configure channel 0 as a single ended input but nothing in the datasheet I see indicates that channel 0 is differential-only.

0 Kudos
3 Replies

416 Views
mjbcswitzerland
Specialist V

Josh

All devices allow ADC0_DM0 as single ended ADC input.

To be absolutely sure I just connected the ADC0_DM0 input to the potentiometer wiper on the TWR-K40x256 board and compared the values read from ADC0_DM0 and ADC1_DM1 (both set up for single-ended operation) and the two ADC samples for the two inputs followed each other (to within 2 noise bits) across the potentiometer range (0x0000..0x0ffff).

Regards

Mark

0 Kudos

415 Views
robotjosh
Contributor IV

Did you set it up with processor expert adc_init?

Josh Jordan

Engineer

0 Kudos

415 Views
mjbcswitzerland
Specialist V

Josh

No - I just used the uTasker project since it supports the ADCs in interrupt and DMA mode on all K and KL boards (just selected the K40 TWR target and changed one line of code to select the input you asked about).

Try ignoring the warning (PE may have bugs and limitiations) and see whether it works or not.

Regards

Mark

0 Kudos