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-F280039C: 在使用例程adc_ex6_soc_continuous_dma时,无法对变量GpioDataRegs进行操作,显示未定义

Part Number: LAUNCHXL-F280039C
Other Parts Discussed in Thread: C2000WARE

首先,在main函数中对gpio47进行了定义

void set_GPIO_init()
{
GPIO_setPinConfig(GPIO_47_GPIO47);
GPIO_setPadConfig(ADCItrPin, GPIO_PIN_TYPE_STD);
GPIO_setQualificationMode(ADCItrPin, GPIO_QUAL_SYNC);
GPIO_setDirectionMode(ADCItrPin, GPIO_DIR_MODE_OUT);
GPIO_setControllerCore(ADCItrPin, GPIO_CORE_CPU1);
}

在ADCA的ADCINT1中断函数中想对47管脚进行翻转操作:

#pragma CODE_SECTION(adcA1ISR, ".TI.ramfunc");
__interrupt void adcA1ISR(void)
{
//set pin
//GPIO_togglePin(ADCItrPin);
GpioDataRegs.GPBTOGGLE.bit.GPIO47=1;
//
// Remove ePWM trigger
//
EPWM_disableADCTrigger(EPWM2_BASE, EPWM_SOC_A);


//
// Disable this interrupt from happening again
//
Interrupt_disable(INT_ADCA1);

//
// Acknowledge interrupt
//
Interrupt_clearACKGroup(INT_myADC0_1_INTERRUPT_ACK_GROUP);
}

变量GpioDataRegs在f28003x_gpio.h已被定义为extern,但最终报错为该变量未定义