s12xs Temperature Sensor

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

s12xs Temperature Sensor

Jump to solution
785 Views
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

Labels (1)
0 Kudos
1 Solution
609 Views
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

View solution in original post

0 Kudos
4 Replies
609 Views
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 Kudos
609 Views
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 Kudos
610 Views
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 Kudos
609 Views
alexkey
Contributor I

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

Very much appreciated!

0 Kudos