s12xs Temperature Sensor

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

s12xs Temperature Sensor

ソリューションへジャンプ
817件の閲覧回数
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 解決策
641件の閲覧回数
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 返答(返信)
641件の閲覧回数
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 件の賞賛
641件の閲覧回数
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 件の賞賛
642件の閲覧回数
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 件の賞賛
641件の閲覧回数
alexkey
Contributor I

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

Very much appreciated!

0 件の賞賛