AnsweredAssumed Answered

ADC INIT MK02

Question asked by Jack Xu on Sep 6, 2016
Latest reply on Sep 7, 2016 by xiangjun.rong

Hi there,

 

I can init most adc channel like the following

 

   ADC16_GetDefaultConfig(&adc16ConfigStruct);
   ADC16_Init(DEMO_ADC16_BASE, &adc16ConfigStruct);
   ADC16_EnableHardwareTrigger(DEMO_ADC16_BASE, false);                /* Make sure the software trigger is used. */
#if defined(FSL_FEATURE_ADC16_HAS_CALIBRATION) && FSL_FEATURE_ADC16_HAS_CALIBRATION
   if (kStatus_Success == ADC16_DoAutoCalibration(DEMO_ADC16_BASE))
   {
        PRINTF("ADC16_DoAutoCalibration() Done.\r\n");
   }
   else
   {
      PRINTF("ADC16_DoAutoCalibration() Failed.\r\n");
   }
#endif /* FSL_FEATURE_ADC16_HAS_CALIBRATION */
   adc16ChannelConfigStruct.channelNumber = DEMO_ADC16_USER_CHANNEL;
   adc16ChannelConfigStruct.enableInterruptOnConversionCompleted = false;
#if defined(FSL_FEATURE_ADC16_HAS_DIFF_MODE) && FSL_FEATURE_ADC16_HAS_DIFF_MODE
   adc16ChannelConfigStruct.enableDifferentialConversion = false;
#endif /* FSL_FEATURE_ADC16_HAS_DIFF_MODE */

 

but how to init the channel se4a, channel 4b,channel se5a, channel se5b etc

      how to init the channel DM0, channel DP0 etc (the same using as channel se0)

or how to init the temp sensor?

 

Thanks in advance!

-Jack

Outcomes