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.

error #20: identifier "FLL_CTL0" is undefined

Other Parts Discussed in Thread: MSP430F5529

用的是MSP430F5529,刚新建了一个项目,输入源程序人如下:

#include <msp430.h>
/*
* main.c
*/
int main(void) {
int i;
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
FLL_CTL0 |=XCAP18PF;
P2DIR |=0x01;
while(1){
for(i=0;i<20000;i++){
P2OUT^=0x01;
}
}
return 0;
}

结果报了两个错误:

"../main.c", line 8: error #20: identifier "FLL_CTL0" is undefined

"../main.c", line 8: error #20: identifier "XCAP18PF" is undefined

  • sfesly sfesly,

    FLL_CTL0和XCAP18PF在头文件 msp430f5529.h中并没有定义。我想你是想设置UCSCTL6 Register中对应的 XCAP Field。故建议写程序时,请参照对应的user guide和 msp430f5529.h头文件。O(∩_∩)O~

  • 注意编译器有没有用错?现在编译器较多,例程也多,你参考那个我们都不知道。你自己审核了!