AnsweredAssumed Answered

How to start an ADC, Processor ecpert, KSDK 1.3.0

Question asked by Rande Newberry on Feb 29, 2016
Latest reply on Mar 7, 2016 by Rande Newberry

Using KDS_3.0+KSKD_1.3+PE with a MK02FN64VLH10 on a custom board.

I'm new to this and its probably something obvious..but after a day of trying I have to ask:

 

I used PE and the adCnv1:fsl_adc16 component to set up ADC0_se12 as an 8 bit Converter.

I checked Pin_mux>ADC , and this was the default for 2,PTB , so I did not change anything there.

I selected A/D channel (pin), and under ADC Configurations>Name, I changed this to Low_Bat_InitConfig0.

 

For some reason I have a new event, ADC0_IRQHandler. I don't want to convert on an interrupt, I want to:

 

1. Start a conversion in code. (can't find anything that looks like it will do this)

2. Wait for the Conversion to finish, See this one: ADC16_DRV_WaitConvDone(adConv1_IDX,); But not sure what the pass values are..

3. Get the results, also see this, ADCBattvaule=ADC16_DRV_GetConvValueSigned(adConv1_IDX,); Again, not sure what to pass in..

 

What is the structure to get the adc started?

And, exactly what should I put after the comma in the in the parenthesis?

Outcomes