Potentiometer Live Values via ADC

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Potentiometer Live Values via ADC

1,879件の閲覧回数
ishoboiM
Contributor III

Hello, we were wondering whether I could have a project/code where we can see the Live expression of ADC values of the Potentiometer in S32K3X4EVB-T172, we are trying to do a few ADC projects and didnt find any luck in example projects as well as online community.

0 件の賞賛
返信
7 返答(返信)

1,820件の閲覧回数
ZooTech
Contributor I

We have already tried these methods, but we are not clear about the values at the output. When we manually measure and calculate the voltage at the terminals of the potentiometer, we obtain a value between 0 and 16,383. However, the output, represented by the data variable, is giving us random values between 2,000 and 6,000, which change randomly even before we adjust the input in rerun mode.

0 件の賞賛
返信

1,811件の閲覧回数
PavelL
NXP Employee
NXP Employee

Hello @ZooTech ,

What S32K3 RTD version do you use?

Could you share your project as a zip file?

Best regards,

Pavel

0 件の賞賛
返信

1,803件の閲覧回数
ishoboiM
Contributor III

Hello Pavel,

We have tried from both 3.0.0 and 5.0.0 RTD versions, 

 

In the 5.0.0 version the error we are getting is that make is not found in path and it expected a 4.0.0 rtd in manage sdks folder 

ishoboiM_0-1748608099120.png

 

Whereas coming to the system with the 3.0.0 rtd in @ZooTech 's system, We tried the example project Adc_sar_bctu_Ip_example code instead and we got random values as a result as she explained in her query.

Attached file down below, Apologies for any misunderstanding and thanks for the reply

0 件の賞賛
返信

1,570件の閲覧回数
PavelL
NXP Employee
NXP Employee

Hello @ishoboiM ,

I apologize for delayed answer.

I found only two issues in your project:

  1. Adc_Sar_Ip - Adc Hardware Unit shall be ADC1
  2. Main.c:
    missing - extern void Adc_Sar_1_Isr(void);
    ADC0 shall be ADC1 - IntCtrl_Ip_InstallHandler(ADC1_IRQn, Adc_Sar_1_Isr, NULL_PTR);
    ADC0 shall be ADC1 - IntCtrl_Ip_EnableIrq(ADC1_IRQn);

I created an example for you. Data is printed out by semihosting.  Feel free to use my RTD300 ADC example.

Bets regards,

Pavel

 

0 件の賞賛
返信

1,786件の閲覧回数
PavelL
NXP Employee
NXP Employee

Hello @ishoboiM ,

Let me share a comment to RTD installation first.

Having multiple RTD versions installed within a single S32 Design Studio environment is not recommended. My colleagues and I follow a good practice of naming the installation folder after the RTD version. For example:
C:\NXP\S32DS.3.5_RTD400
with a corresponding workspace:
C:\Users\...\workspaceS32DS.3.5_RTD400

 

I will do my best to check your project on my T172 board next week. 

Best regards,

Pavel

0 件の賞賛
返信

1,685件の閲覧回数
ishoboiM
Contributor III
Hello Pavel,

Thank you for your response, will make sure to follow that practice

Thank you
0 件の賞賛
返信

1,854件の閲覧回数
PavelL
NXP Employee
NXP Employee

Hello @ishoboiM ,

please check out this S32K knowledge base article - [RTD400 LLD]K344 ADC SW+HW trigger - NXP Community

Best regards,

Pavel

0 件の賞賛
返信