This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-F28379D: Universal Servo Drive F28p65 to F28379D conversion -> ADC Configuration not triggering interrupt

Part Number: LAUNCHXL-F28379D
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

I used one click migration to convert the Universal_Servo_Drive code for the F28p65 to be used on the F28379D launchpad. My code compiles without error, but when I run the debugger:

The program is stuck at line 627 in motor1_drive.c. This is the line

while(ADC_getInterruptStatus(MTR1_ADC_INT_BASE, MTR1_ADC_INT_NUM) == false); becuase the getInterruptStatus function never produces a boolean output due to invalid values to operate on.

Stepping into adc.h, the function
ADC_getInterruptStatus(uint32_t base, ADC_IntNumber adcIntNum)
{
//
// Check the arguments.
//
ASSERT(ADC_isBaseValid(base));
//
// Get the specified ADC interrupt status.
//
return((HWREGH(base + ADC_O_INTFLG) & (1U << (uint16_t)adcIntNum)) != 0U);
}

Contains the value ADC_0_INTFLG which when clicked says "could not find symbol 'ADC_O_INTFLG' in index". In subsequent functions in the adc.h file like ADC_clearInterruptStatus, ADC_getInterruptOverflowStatus, ADC_clearInterruptOverflowStatus, there are similar macros that cannot be found like ADC_O_INTFLGCLR, and ADC_O_INTOVF, for example.

Why are these values not found? Is it the way the ADCs were setup in Sysconfig? Or does a device support file need to manually edited? 

Thinking that this could be caused by the ADC not getting triggered, or the ADC trigger ISR not getting properly setup, I went back to Sysconfig to investigate. First, I confirmed that the interrupts were correctly enabled and similar between the two files. The F28379D sysconfig is on the left and the F28P65 sysconfig is on the right below. 

ADCA:

ADCB:


ADC

These seem to be configured properly. 

Then I checked the SOC configurations for the two boards. Based on my understanding of this conversion document, where the F28p65 is utilizing ADCIN7, the F28379D should use ADCIN2 instead. Is this correct? In the universal_servo_drive, the SOC channels are set to "single-ended, ADCIN7". 

However, this still doesn't make sense. An incorrect channel would not cause no interrupt to be triggered, even if the above is incorrect. 

What might be going wrong and where should I continue to look? 

See the project attached here: 1460.universal_servo_drive_f28p65x_convertedto_f28379D.zip

  • I have resolved my issue. I did not correctly align the EPWM to the SOC trigger. In the F28p65, the ADC is triggered by EPWM5, but this needs to be corrected for whichever new board you are using. In my case MTR1_PWM_U utilizes EPWM1. All 7 SOC triggers in my code needed to be set to