Here is the configuration:
/*! @brief PAL instance information */
const adc_instance_t adc_pal_1_instance = { ADC_INST_TYPE_ADC_S32K1xx, 0u };
/*! @brief PAL extension */
static extension_adc_s32k1xx_t adc_pal_1_extensionConfig = {
.clockDivide = ADC_CLK_DIVIDE_1,
.resolution = ADC_RESOLUTION_12BIT,
.inputClock = ADC_CLK_ALT_1,
.voltageRef = ADC_VOLTAGEREF_VREF,
.supplyMonitoringEnable = false,
.pdbPrescaler = PDB_CLK_PREDIV_BY_1
};
/*! @brief configuration structure */
const adc_config_t adc_pal_1_config = {
.groupConfigArray = adc_pal_1_groupArray,
.numGroups = 2u,
.sampleTicks = 12u,
.extension = &adc_pal_1_extensionConfig
};
/*! @brief array of conversion groups */
const adc_group_config_t adc_pal_1_groupArray[2u] = {
/* Conversion group 0 */
{
.inputChannelArray = adc_pal_1_channelsArray0,
.resultBuffer = adc_pal_1_results0,
.numChannels = 8u,
.numSetsResultBuffer = 1u,
.hwTriggerSupport = false,
.triggerSource = TRGMUX_TRIG_SOURCE_DISABLED,
.delayType = ADC_DELAY_TYPE_NO_DELAY,
.delayArray = NULL,
.continuousConvEn = false,
.callback = SYSTEM_ADC_MODULE1_GROUP1_IRQ_HANDLER,
.callbackUserData = NULL
},
/* Conversion group 1 */
{
.inputChannelArray = adc_pal_1_channelsArray1,
.resultBuffer = adc_pal_1_results1,
.numChannels = 4u,
.numSetsResultBuffer = 1u,
.hwTriggerSupport = false,
.triggerSource = TRGMUX_TRIG_SOURCE_DISABLED,
.delayType = ADC_DELAY_TYPE_NO_DELAY,
.delayArray = NULL,
.continuousConvEn = false,
.callback = SYSTEM_ADC_MODULE1_GROUP2_IRQ_HANDLER,
.callbackUserData = NULL
},
};
/*! @brief group 0: input channels array */
adc_input_chan_t adc_pal_1_channelsArray0[8u] = {
/* 0 */ ADC_INPUTCHAN_EXT2,
/* 1 */ ADC_INPUTCHAN_EXT3,
/* 2 */ ADC_INPUTCHAN_EXT4,
/* 3 */ ADC_INPUTCHAN_EXT5,
/* 4 */ ADC_INPUTCHAN_EXT8,
/* 5 */ ADC_INPUTCHAN_EXT9,
/* 6 */ ADC_INPUTCHAN_EXT10,
/* 7 */ ADC_INPUTCHAN_EXT11,
};
/*! @brief group 0: results buffer */
uint16_t adc_pal_1_results0[8u];
/*! @brief group 1: input channels array */
adc_input_chan_t adc_pal_1_channelsArray1[4u] = {
/* 0 */ ADC_INPUTCHAN_EXT12,
/* 1 */ ADC_INPUTCHAN_EXT13,
/* 2 */ ADC_INPUTCHAN_EXT14,
/* 3 */ ADC_INPUTCHAN_EXT15,
};
/*! @brief group 1: results buffer */
uint16_t adc_pal_1_results1[4u];
used SDK 4.0.2 on S32DS 3.4
解決済! 解決策の投稿を見る。
Sorry, fault in other place found. Can be closed