S32K344 ADC coversion result jump problem

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

S32K344 ADC coversion result jump problem

Jump to solution
1,432 Views
tianxing
Contributor III

Dear sir:

Recently I use S32K344 ADC module to measure a voltage and the conversion result is always jump from 0.61 mv to 4907mv in ADC_TRIGG_SRC_HW mode with HW trigger. when I use the ADC_CONV_MODE_CONTINUOUS with SW trigger mode the result is from 10mv to 110mv .The channel is S8_ChanNum32. And I used 21 channels for voltage measurement only this channel conversion result is jump up and down.I want to know why this happened? And below picture is the circuit map for the voltage IMV2 ,IMV2 is the voltage I measured which always jump.The attach file is the source code.

tianxing_1-1660269795205.png

 

 

0 Kudos
1 Solution
1,393 Views
tianxing
Contributor III

Yes,the S32CT configuration worked .

I didn't compare the code and I will do that and share the result.

 

View solution in original post

0 Kudos
9 Replies
1,419 Views
tianxing
Contributor III

I used EB to configure ADC function and would you please help me to check if there is any problem with ADC configuration in EB project?The attach file is the EB project.

0 Kudos
1,415 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi tianxing

Seems that you are using S32K3 Real-Time Drivers Version 2.0.0 D2203. You will find related information by search "DCMRWF4" in SW32K3_RTD_4.4_2.0.1_D2207_ReleaseNotes.pdf


Best Regards,
Robin

0 Kudos
1,371 Views
tianxing
Contributor III

Hi Robin:

I checked again for this problem.You are right it was DCMRWF4[1] abnormal which cause this problem.Now we can use Emios with ADC .

Thank you.

0 Kudos
1,411 Views
tianxing
Contributor III

Dear Robin :

I am using  SW32K3_RTD_4.4_2.0.0 with EB.

And I also checked DCMRWF4[1] it is 0.

The problem is not happened on whiteboard it is happened on the self designed board.And if we use SDK code which configured by mex file the voltage is not jump.And the SDK code is in scan mode. So I think may be there is some mistake with the EB configuration.

Thank you for your help.

 

0 Kudos
1,397 Views
namnguyenviet
NXP Employee
NXP Employee

Hello @tianxing,

My understanding is the S32CT configuration worked, while the EB Tresos configuration didn't work, right? Because the driver code between S32CT version and EB Tresos version should be identical, did  you try to compare the generated code between them?

Best Regards,

Nam

0 Kudos
1,394 Views
tianxing
Contributor III

Yes,the S32CT configuration worked .

I didn't compare the code and I will do that and share the result.

 

0 Kudos
1,389 Views
tianxing
Contributor III

Dear Nam and Robin_Shen:

I found the problem when I enable the Emios module the voltage will jump from 0~4.9V.If disable Emios module the voltage jump from 100mv to 200 mv.

And I also changed Adc Unit Normal Sampling Duration 1 (8 -> 255) from 22 to 120 which is same with the example and the voltage is 1.5mv seems right now.

Thank you for your help.

Best regards.

0 Kudos
1,406 Views
tianxing
Contributor III

请问IMV2信号用万用表实测是稳定的吗?

==》IMV2用万用表测试的电压是1.6mv
自己设计的开发板,实际哪个引脚连接到IMV2?

==》实际连接到PTA0_GPIO[0]
S8_ChanNum32是指ADC0_S8吗?

==》是的
S32K344-WB上的ADC0_S8连接在PTB13(GPIO45),所以调试白板的时候应该可以看到DCMRWF4[1]=1吧?

==》是的

ADC_CONV_MODE_CONTINUOUS SW trigger mode 10mv to 110mv,符合IMV2信号实际电压吗?

==>也不太符合
0 Kudos
1,400 Views
tianxing
Contributor III

Is imv2 signal measured by multimeter stable?

==The voltage measured by imv2 multimeter is 1.6mv

Which pin is actually connected to imv2 in the development board designed by yourself?

==Actual connection to PTA0_ GPIO[0]

S8_ Channum32 refers to ADC0_ S8?

==Yes

ADC0 on s32k344-wb_ S8 is connected to ptb13 (gpio45), so you can see dcmrwf4 [1] = 1 when debugging the whiteboard, right?

==Yes

ADC_ CONV_ MODE_ Continuous SW trigger mode 10mV to 110mV, is it consistent with the actual voltage of imv2 signal?

==>Not quite

And I changed the EB configuration for Trgmux Logic Group (PIT_CH0 trigger ADC0 and ADC1 changed to PIT_CH0 trigger ADC0 )  and I found the voltage was not jump from 0~4.9V now.But It jumpped from 110mv to 250 mv now.

 

 

0 Kudos