S32K146: Some ADC channels not working

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

S32K146: Some ADC channels not working

Jump to solution
1,691 Views
dasitor
Contributor II

Hello,

We are currently debugging a custom PCB with the S32K146 (144 LQFP). We must monitor a large number of analog inputs. So far we have been using software triggering of the conversion. Channels 14, 22 and 23 of ADC0 do not read their input voltages: they output values near 0. The rest of the channels read correctly their input voltages (except 12 and 13 of ADC0 which behave "funny", but in a different way).

According to the Reference Manual, package 144 LQFP of S32K146 has 24 channels per ADC module, so there is no limit here. We have also checked the PORT and ADC configuration several times, and it looks OK. We have measured input voltages at the processor pins, and they are correct. The board itself in general seems to work fine.

What are we missing?

Thanks in advance for any suggestion you may make.

1 Solution
1,551 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello dasitor,

What numbers are you writing to the SC1A[ADCH] register?

pastedImage_2.png

Thanks,

BR, Daniel

View solution in original post

3 Replies
1,551 Views
dasitor
Contributor II

Hello again,

We have configured the affected ADC pins as GPIO inputs and they work fine: no soldering problems or anything like that.

I made a mistake identifying the ADC channels involved. Now it is clear that all the failing and "funny" channel indices are above index 15. Our current hypothesis is that, although the package we are using is the 144 LQFP, which should have 24 channels per ADC module, for some reason we are only able to use 16 channels per ADC module. This number of channels is the one present in the packages with less pins. Channels we have tested and are not working properly are: ADC0 - 16 to 23; ADC1 - 19, 20, 22, 23 . The rest of channels with index over 15 are not used. Channels with index under 16 seem to work fine.

We are not using 3rd party drivers or OS. Our ADC configuration and auxiliary functions are based on the S32DS examples.

0 Kudos
1,552 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello dasitor,

What numbers are you writing to the SC1A[ADCH] register?

pastedImage_2.png

Thanks,

BR, Daniel

1,551 Views
dasitor
Contributor II

Many thanks!

That solved the problem. We were "of course" introducing the channel number as a decimal parameter. Now we are mapping each analog signal to a channel identifier for the SC1 register. Everything works fine!

Thank you again.