Hi Mario,
The problem is caused by this line in the application code:
status_t adcStartConversionCurrentAndVoltage(void)
{
[...]
state = ADC_EnableHardwareTrigger(&adc0_instance, ADC_GROUPINDEX_00);
state = state && ADC_EnableHardwareTrigger(&adc1_instance, ADC_GROUPINDEX_00);
The compiler optimizes out the second call to ADC_EnableHardwareTrigger(&adc1_instance, ADC_GROUPINDEX_00);
This most likely happens because the first call returns state == STATUS_SUCCESS, which is in fact 0x0000 => && operation with 0 will always be false, so no need to call ADC_EnableHardwareTrigger(&adc1_instance, ADC_GROUPINDEX_00);
Change the line to something like:
state0 = ADC_EnableHardwareTrigger(&adc0_instance, ADC_GROUPINDEX_00);
state1 = ADC_EnableHardwareTrigger(&adc1_instance, ADC_GROUPINDEX_00);
if( state0 == STATUS_SUCCESS && state1 == STATUS_SUCCESS)
...
and the scenario will work fine.
Hope it helps,
Best regards,
Cosmin