Hi Marco,
When customer want to modify resolutionMode value, it need to modify at [ksdk_platform_lib] project <fsl_adc_driver.c> below function:
/*FUNCTION*********************************************************************
*
* Function Name : ADC_DRV_StructInitUserConfigForIntMode
* Description : Fill the initial user configuration for interrupt mode.
* Then call initialization function with the filled parameter would configure
* the ADC module work as the interrupt mode.
*
*END*************************************************************************/
adc_status_t ADC_DRV_StructInitUserConfigForIntMode(adc_user_config_t *userConfigPtr)
{
if ( !userConfigPtr )
{
return kStatus_ADC_InvalidArgument;
}
userConfigPtr->intEnable = true;
userConfigPtr->lowPowerEnable = true;
userConfigPtr->clkDividerMode = kAdcClkDividerInputOf8;
userConfigPtr->resolutionMode = kAdcResolutionBitOf12or13;
userConfigPtr->clkSrcMode = kAdcClkSrcOfAsynClk;
userConfigPtr->asyncClkEnable = true;
userConfigPtr->highSpeedEnable = false;
userConfigPtr->hwTriggerEnable = false;
#if FSL_FEATURE_ADC_HAS_DMA
userConfigPtr->dmaEnable = false;
#endif /* FSL_FEATURE_ADC_HAS_DMA */
userConfigPtr->refVoltSrcMode = kAdcRefVoltSrcOfVref;
userConfigPtr->continuousConvEnable = true;
return kStatus_ADC_Success;
}
After that, customer need compile the lib and related demo projects, the ADC resolution will be changed.
Wish it helps.
best regards
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------