S32K311 ADC 12bit resolution

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

S32K311 ADC 12bit resolution

1,061 次查看
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 项奖励
回复
4 回复数

1,042 次查看
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 项奖励
回复

1,046 次查看
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 项奖励
回复

1,028 次查看
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

标记 (1)
0 项奖励
回复

1,020 次查看
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 项奖励
回复