S32K 144 ADC configuration

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

S32K 144 ADC configuration

3,219 Views
nirmalthomas
Contributor I

Hello,

 

Iam using S32K144 EVB board and S32 design studio.

Can anyone help me with ADC configuration. Using autocode generation.

I am trying to read the potentiometer in the EVB board, but its not working.

 

Thank you.

Labels (1)
0 Kudos
Reply
5 Replies

1,968 Views
raresvasile
NXP Employee
NXP Employee

Hi,

Can you please attach the project? In this way I can view the exact configuration for the ADC.

Thank you,
Rares

0 Kudos
Reply

1,968 Views
nirmalthomas
Contributor I

Hi Rares,

Please find the attached project file.

Thank you,

0 Kudos
Reply

1,968 Views
raresvasile
NXP Employee
NXP Employee

Hi,

Software trigger for ADC is available only for the first result and configuration register (SC1A, RA).

So by modifying the following lines of code the application shall work.

ADC_DRV_ConfigChan(ADC_INSTANCE, 0U, &adConv1_ChnConfig0);
/* Wait for the conversion to be done */
ADC_DRV_WaitConvDone(ADC_INSTANCE);
/* Store the channel result into a local variable */
ADC_DRV_GetChanResult(ADC_INSTANCE, 0U, &adcRawValue);

Best regards,

Rares

0 Kudos
Reply

1,968 Views
nirmalthomas
Contributor I

Hi,

Thank you for the reply.

Can you help me configure the ADC module for auto code generation. When debugging it ends up in some breakpoints.

I am new to auto code generation.

I checked the workshop document for auto code generation of clock, timer interrupt etc .. and it is working but can not make ADC and PWM work.

Do you have any documets? Or can you help me configure them.

Thank you,

Nirmal

0 Kudos
Reply

1,968 Views
nirmalthomas
Contributor I

ADC is working.

Thank you for the help.

Regards,

Nirmal

0 Kudos
Reply