Hi Runar Haaskjol
What IDE are you using? You are using an example code?
Yes, as you said you have two option;
You can select the DACREF_1, in the DACRFS field from the DACx_C0 control register, in the KDS IDE this can be done by: DAC0_C0 |= DAC_C0_DACRFS_MASK;
Or, in case you are using kinetis KSDK, in the main of the dac_example_frdmk64f you will find:
// Fill the structure with configuration of software trigger.
DAC_DRV_StructInitUserConfigNormal(&dacUserConfig);
// Initialize the DAC Converter.
DAC_DRV_Init(DAC_INSTANCE, &dacUserConfig);
Where
dac_status_t DAC_DRV_StructInitUserConfigNormal(dac_converter_config_t *userConfigPtr)
{
if (!userConfigPtr)
{
return kStatus_DAC_InvalidArgument;
}
userConfigPtr->dacRefVoltSrc = kDacRefVoltSrcOfVref2; /* Vdda */
userConfigPtr->lowPowerEnable = false;
return kStatus_DAC_Success;
}
When you can see that the refVolt is selected. You can copy this code and put it in your project
Hope this information helps
Regards
Jorge Alcala