Hello again @frank_m @xiangjun_rong ,
I think it is not a problem of impedances, but of ports, because the signals I send are sent through different ports of the operating system, and unless I send the signal through channel 3 it does not read it well.
I'm attaching the code and the configurations in case you can find any faults.
I only attach one module of the program, there is a call to start the ADC conversion, but it is in another module.
static void _TskConvADC(void)__attribute__((noreturn));
static void _TskConvADC(void)
{
adc_result_info_t ValTen;
ADC_savedat_t Save;
while(true)
{
ulTaskNotifyTake(pdFALSE, portMAX_DELAY);
/* Wait for the converter to be done. */
// ADC_GetChannelConversionResult(ADC0, ADC_DIS, &ValTen);
ADC_GetChannelConversionResult(ADC0, ADCNS, &ValTen);
Save.ADC_NS = ValTen.result;
ADC_GetChannelConversionResult(ADC0, ADCE0, &ValTen);
Save.ADC_EO = ValTen.result;
ADC_GetChannelConversionResult(ADC0, ADC_DIS, &ValTen);
Save.ADC_Dis = ValTen.result;
ADC_GetChannelConversionResult(ADC0, ADCRSSI, &ValTen);
Save.ADC_RSSI = ValTen.result;
//Mandamos los datos al módulo Mod_Operaciones
if(_repDatTensiones != NULL)
_repDatTensiones(&Save,sizeof(Save));
}
} //void _TskConvADC(void)
/******************************************************//**
** Métodos públicos
*********************************************************/
/*! \fn void ADCinit(void)
* \brief Inicializa las conversiones AD.
* \return Nada.
*/
void ADCinit(void)
{
BaseType_t xReturned;
// uint32_t frequency = 0U;
// ** Inicializa variables **
_repDatTensiones = NULL;
// ** Inicializa el driver **
POWER_DisablePD(kPDRUNCFG_PD_VDDA); /* Power on VDDA. */
POWER_DisablePD(kPDRUNCFG_PD_ADC0); /* Power on the ADC converter. */
POWER_DisablePD(kPDRUNCFG_PD_VD2_ANA); /* Power on the analog power supply. */
POWER_DisablePD(kPDRUNCFG_PD_VREFP); /* Power on the reference voltage source. */
ADC_DoSelfCalibration(ADC0);
if(!ModoConfig())
{
xReturned = xTaskCreate((TaskFunction_t)_TskConvADC,"TskConvADC",4 * configMINIMAL_STACK_SIZE, NULL, APP_TSK_HIGH_PRIORITY, &_tskHandleADC);
configASSERT(xReturned);
} //if(!ModoConfig())
} // void ADCinit(void)
/*! \fn void AdcStartConv(void)
* \brief Fuerza la conversión(llamada por un timer).
* \return Nada.
*/
void AdcStartConv(void)
{
// ** Fuerza el arranque de la conversión de la secuencia A **
// ADC_DoSoftwareTriggerConvSeqA(ADC0);
ADC_DoSoftwareTriggerConvSeqA(ADC0);
} // void AdcStartConv(void)
/*! \fn void RepDatADC (GenRxCallBack_t callBack)
* \brief Establece la función de call-back para reporte de datos.
* \param[in] callBack Función que establecer.
* \return Nada.
*/
void RepDatADC (GenRxCallBack_t callBack)
{
_repDatTensiones = callBack;
} //void RepDatADC (GenRxCallBack_t callBack)
/* ADC0_SEQA_IRQn interrupt handler */
//void ADC0_ADC_SEQ_A_IRQHANDLER(void)
void ADC0_ADC_SEQ_A_IRQHANDLER(void)
{
BaseType_t tskWoken;
if (kADC_ConvSeqAInterruptFlag == (kADC_ConvSeqAInterruptFlag & ADC_GetStatusFlags(ADC0)))
{
ADC_ClearStatusFlags(ADC0, kADC_ConvSeqAInterruptFlag);
vTaskNotifyGiveFromISR(_tskHandleADC, &tskWoken);
portYIELD_FROM_ISR(tskWoken);
} // if (kADC_ConvSeqAInterruptFlag == (kADC_ConvSeqAInterruptFlag & ADC_GetStatusFlags(ADC0)))
/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F
Store immediate overlapping exception return operation might vector to incorrect interrupt. */
#if defined __CORTEX_M && (__CORTEX_M == 4U)
__DSB();
#endif
} // ADC0_ADC_SEQ_A_IRQHANDLER()