Hi,
I am looking for a solution for the same question.
I would like to read multiple channels using a single request.
I did this workaround using a variable "adcSelect" to alternate between the two handles.
switch( RCM_GetUserConvState())
{
case RCM_USERCONV_IDLE :
if(adcSelect == FES_SELECTED)
RCM_RequestUserConv(FEShandle);
else if(adcSelect == TRTL_SELECTED)
RCM_RequestUserConv(TRTLhandle);
else //error
{}
break;
case RCM_USERCONV_REQUESTED :
break;
case RCM_USERCONV_EOC :
switch(adcSelect)
{
case FES_SELECTED :
FES_Datum = RCM_GetUserConv();
adcSelect = TRTL_SELECTED;
break;
case TRTL_SELECTED :
TRTL_Datum = RCM_GetUserConv();
adcSelect = FES_SELECTED;
break;
default : //error
break;
}
break;
}
It worked well until I saw the code crash in an infinite while loop waiting for ADC EOC in the regular_conversion_manager.c file
/* Wait EOC */
while ( LL_ADC_IsActiveFlag_EOC( RCM_handle_array[handle]->regADC ) == RESET )
{
}
Weirdly it happens when there is a separate Timer Input Capture Interrupt Triggered "only" when I use multiple RCM registrations.
I want to avoid all this.
Looking for help.