S32K311 ADC 12bit resolution

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

S32K311 ADC 12bit resolution

1,065 Views
truptikavadi1
Contributor I

Hi,

I have selected the ADC resolution from CALBISTREG Register as 12bit, but in the CDATA register when I am reading the ADC data, I am getting the value for 15bit resolution.

May I know the steps to read the ADC data from CDATA in terms of 12bit resolution. 

0 Kudos
Reply
4 Replies

1,046 Views
truptikavadi1
Contributor I

I have configured the 12bit ADC Resolution from given CALBISTREG Register. But I am getting ADC raw value as 6040 in CDATA bit from ICDR register for voltage applied 12V which is incorrect.

So are there any other configuration to be done to achieve 12bit correct ADC raw value  

0 Kudos
Reply

1,050 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@truptikavadi1

The description of this register is very clear. If you have any questions, please let me know.

Senlent_0-1749718134873.png

 

0 Kudos
Reply

1,032 Views
truptikavadi1
Contributor I

HI Senlent

I am configuring the ADC for 12 bit resolution. So the maximum count i am expecting is 4095 with 3.3 V at the ADC pin.

When i read the CDATA register the value is approximately 32700.

How can i map it with a 12 bit resolution?

If i configure the same to 8 bit i am expecting the maximum count to be 255 and for 10 bit 1023. But for all the bit resolution configured i am getting ~32700 which is the maximum value for 15bit.

Can you please help me with mapping these values?

 

Thanks

Trupti

Tags (1)
0 Kudos
Reply

1,024 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@truptikavadi1

https://community.nxp.com/t5/S32K/S32K344-ADC-data-alignment-and-bit-resolution/td-p/1571229

So your case:

image001.png

32700->0111111110111100->0b0111111110111100->0b111111101111 = 4079.

0 Kudos
Reply