Questions about ADC of S32 DS

cancel
Showing results for 
Search instead for 
Did you mean: 

Questions about ADC of S32 DS

273 Views
nimenhao
Contributor I

Hi,everyone.

My MCU is MPC5744P. I want to use AD port to monitor the voltage of a temperature sensor and calculate the temperature.The SDK is v0.9.0.There are some problems.

1.I have used the example of the SDK.First initialize ADC,then start a loop of conversion and get the results.Where can I find the results?I want to add expressions in debug window,but it doesn't work.

2.I want to use the results to calculate the temperature,should I add a formula in the loop?And where can I find the value of the formula?I tried to add the variable to expressions,but I thought the result was wrong.I think my step having being something wrong but I don't know where to correct.

2018-05-30_105325.png

3.If I connect one more sensor,I should add one more ADC_DRV_EnableChannel.But when I add it , the value of ADC_DRV_GetConvResultsToArray will be changed right? If I want to get the result respectively,which function can I use?

2018-05-30_104311.png

Thank you very much!

#5744p

Labels (1)
0 Kudos
1 Reply

115 Views
nimenhao
Contributor I

Hi everyone,I have solved the problem.I want to monitor 2 values,but in the function ADC_DRV_GetConvResultsToArray,I forgot to correct the length to 2 and keep it 1,so I thought the 2 values related.

After I modify the length to 2,it did work.

Thanks a lot everyone!

0 Kudos