MPC5744 TSENS&CTU

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

MPC5744 TSENS&CTU

1,245 Views
liujinhang
Contributor III

Hi all

I want to get the temperature acquisition by MPC5744 , I find the ADC0.MCR.B. CTUEN must be set to 0,

then the function of CTU will shut down,SO how to set the TSENS successful initialization on ADC

and ADC_0.MCR.B. CTUEN = 1 .

Thanks

Best Regards

Labels (1)
0 Kudos
3 Replies

559 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

There is no need to use the ADC’s CPU mode (ADC0.MCR.B.CTUEN=0) for TSENS conversion. It is up to user how the ADC will be configured. There is a demo code, https://community.freescale.com/docs/DOC-104657, which uses the ADC’s CPU mode for sensing the TSENS, however you can simply configure the CTU to send commands to convert desired channels. On the https://community.freescale.com/docs/DOC-329623 you can find several examples for the CTU-ADC usage, so you can create your own code to start TSENS output sampling by the CTU.

BR, Petr

0 Kudos

559 Views
liujinhang
Contributor III

Dear Petr:

     Thanks you for the relay. The example I use is the demo code Example MPC5744P TSENS temperature calculation ,In ADC initialization ,if

the ADC0.MCR.B. CTUEN =1; The program will stop here (while (ADC_0.CDR[15].B.VALID != 1) {}; /* Wait for last scan to complete */).

As shown below,and please tell me the reason.

Thanks

Best Regards

2.bmp

    1.bmp

0 Kudos

559 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

If you select CTU conversion mode, you also need to configure CTU module to send commands to the ADC so the conversion is started. This is not done in the example you pointed to. In the CTU mode normal conversion cannot be used.

As I mentioned on the https://community.freescale.com/docs/DOC-329623 you can find several examples for the CTU-ADC usage, so you can create your own code to start TSENS output sampling by the CTU.

BR, Petr