How can i find the result of Supply Voltage Sensor in MC9S12VR Chip?

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

How can i find the result of Supply Voltage Sensor in MC9S12VR Chip?

683 Views
kernwang
Contributor II

I am using the MC9S12VR family chip for WR.

I know it is having  Supply Voltage Sensor and Chip temperature sensor AD Special channel.

But i cannot find the Conversion Result Registers of Supply Voltage Sensor(Chapter 16) and Chip temperature sensor(section 4.3.2.13) in Datesheet.

Someone can help to explain for me? 

Thank you very much!

Labels (1)
0 Kudos
3 Replies

510 Views
RadekS
NXP Employee
NXP Employee

Hi Juejie,

The Conversion Result Registers is the same for all ADC measurements - ATDDR0~ATDDR5.

The internal channels are routed to ADC by setting SC bit in ATDCTL5 register.

Please look at Table 1-14. Usage of ADC Special Conversion Channels in RM (page 51, RM Rev4.2) for channel settings of internal channels.

S12VR ADC Internal channels.png

So, the Bandgap Voltage VBG or Chip temperature sensor VHT are measured on Internal_7 channel and VSENSE or VSUP voltage is measured on Internal_4 channel.

Prior ADC measurement, you have to also configure the appropriate module. For example:

CPMUHTCTL=0x08; // temperature VHT signal, the voltage amplifier is enabled

Or

BATE=0x08; // BATS VSUP ADC Connection Enable


I hope it helps you.

Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

510 Views
kernwang
Contributor II

Hi Radek

Thanks very much for your detail explain!

It looks like some mistakes in "MC9S12VR Family Reference Manual, Rev. 2.8".  I hope official team can update this information ASAP.

pastedImage_1.png

But I still have a query about the Conversion Result Registers.

If i use the Multi-Channel Sample Mode (MULT  = 1),scan mode(SCAN = 1) and enable the AN0, AN1, Supply Voltage Sensor and Chip temperature sensor.

How the Conversion Result Registers will be allotted for all ADC channels?

In my mind, the allocation as following:

ATDDR0 --> AN0

ATDDR1 --> AN1

ATDDR2 --> Internal_4

ATDDR3 --> Internal_7

Is it correct?

And If i enable the AN0~AN5, Supply Voltage Sensor and Chip temperature sensor.

In this case  how the ATDDR0~ATDDR5 will be allotted ?

Thanks again!

0 Kudos

510 Views
RadekS
NXP Employee
NXP Employee

Hi Juejie,

Unfortunately, the ATD module isn’t such flexible in channel selection.

SC bit in ATDCTL5 register selects whether you will measure internal or external channels. So, you cannot measure AN0 together with Internal_4 channel in continuous mode.

You may measure AN0~AN5 with results in ATDDR0~ATDDR5 registers or Internal _7..Internal_5 channels with results in ATDDR0~ATDDR5 registers.

In fact, I am not sure how internal channel results will be sorted when you select Multi-Channel Sample Continuous mode –I never test it. I used just single channel one shot measurement (result will be always in ATDDR0).


I hope it helps you.

Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos