s12xs Temperature Sensor

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

s12xs Temperature Sensor

跳至解决方案
1,619 次查看
alexkey
Contributor I

Hi all,

          i have been trying in vain to get the voltage regulator Temperature Sensor mapped to an ADC channel. the thing is i can't find which channel it gets mapped to. The datasheet and AN3624 seem to imply that it is mapped to ATD channel 17. But i have no way of accessing this.

Am I missing something completely obvious?

 

thanks

标签 (1)
0 项奖励
回复
1 解答
1,443 次查看
DPB
NXP Employee
NXP Employee

Hello

The first result by default should be stored to ATD0DR0-3.

By default means with the ATDCTL3 reset value of 0x20. This ATDCTL3 configuration uses a sequence of 4 conversions.

So the results are stored in ATD0DR0, ATD0DR1, ATD0DR2, ATD0DR3 respectively, with the input mapped to the temperature sensor ATDCTL5 =0x41.

i.e. all conversions are from the same channel because MULT=0.

So the registers should contain similar values, as the temperature does not vary so quickly.

DPB

在原帖中查看解决方案

0 项奖励
回复
4 回复数
1,443 次查看
DPB
NXP Employee
NXP Employee

Hello

ATD0 channel 17 can be accessed by writing 0x41 to ATDCTL5.

i.e. SC should be set and CD,CC,CB,CA should be 0,0,0,1 respectively.

Or do you use this config already?

If so, can you convert other channels successfully?

DPB

0 项奖励
回复
1,443 次查看
alexkey
Contributor I

Hi, i am already using this config. I think my real question is in fact what register name should i be using to access the data.

e.g. for reading channels 0 - 4 i use ATD0DR0 - ATD0DR3 but there doesn't seem to be a ATD0DR16

thanks

0 项奖励
回复
1,444 次查看
DPB
NXP Employee
NXP Employee

Hello

The first result by default should be stored to ATD0DR0-3.

By default means with the ATDCTL3 reset value of 0x20. This ATDCTL3 configuration uses a sequence of 4 conversions.

So the results are stored in ATD0DR0, ATD0DR1, ATD0DR2, ATD0DR3 respectively, with the input mapped to the temperature sensor ATDCTL5 =0x41.

i.e. all conversions are from the same channel because MULT=0.

So the registers should contain similar values, as the temperature does not vary so quickly.

DPB

0 项奖励
回复
1,443 次查看
alexkey
Contributor I

Thank you so much I now have this up and running correctly!

Very much appreciated!

0 项奖励
回复