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.

编译报 identifier "UPCS0" is undefined

Other Parts Discussed in Thread: MSP430F5529, MSP430G2755, MSP430G2855, MSP430G2955

最近购买了一个ADS1x9xEVM评估板,编译源代码工程时,报在identifier "UPCS0" is undefined。

评估板的MCU为 ,MSP430f5529

报错文件为usb.c 

BYTE USB_enable()

{

.....

 if (USB_PLL_XT == 2)
    {
        USBPLLCTL = UPCS0 + UPFDEN + UPLLEN;// Select XT2 as Ref / Select PLL for USB / Discrim. on, enable PLL
    }
    else
    {
        USBPLLCTL = UPFDEN + UPLLEN;        // Select XT1 as Ref / Select PLL for USB / Discrim. on, enable PLL
    }

....

}

我搜索了一下在include的文件msp430f5529.h里面能够找到UPFDEN , UPLLEN的定义,但是找不到UPCS0定义。

请问该UPCS0需要怎么定义?或者是否需要哪个头文件?谢谢!

  • 用最新的库移植下,或者换以前的库,新版本不支持这个函数了。看勘误说明或者更新说明

    Version: 1.073
    ==========================================================================================
    release Package 11.03.2013
    ==========================================================================================
    11.03.2013 added DCOR to MSP430G2x55 devices
    added 5xx style defintions for 2xx/4xx devices for TA0IV Register
    fixed some typos in 5xx/6xx device with TimerA/B Interrupt vector definitions
    10.02.2013 fixed size of Signature in FRAM Devices
    ==========================================================================================
    release Package 31.01.2013
    ==========================================================================================
    31.01.2013 added MSP430G2755, MSP430G2855, MSP430G2955
    15.01.2013 changed defines to CapTouchIO from CapSenseIO to align with Users Guide
    13.12.2012 Module name changed from RTC_CE to RTC_C
    13.12.2012 CCS: Removed Legacy CCE V2 defines for Interrupt Vectors
    14.11.2012 fixed missing UCA1 in FR57x3/7
    14.11.2012 FR56xx: fixed typo in SYSRSTIV_MPUSEG defintions
    replaced COMP_B with COMP_E
    ==========================================================================================
    release Package 13.11.2012
    ==========================================================================================
    24.10.2012 replaced define TBSSEL__TACLK with TBSSEL__TBCLK
    ADC12B: fixed some Typos in ADC12 definitions (ADC10 was used before)
    28.09.2012 USB devices: removed UPCS0 definition

  • 楼上正解。如果只是学习例程,推荐使用旧版的库

  • 非常感谢楼上两位的详细回答,我觉得楼上两位分析很有道理。我现在只想把程序编译过去,能够跟踪TI提供的样例程序,所以就想用老版本的库。请问要到哪里找老版本的库,如何替换?谢谢!

  • 这个函数已经重写了,请参看最新的usb.c

  • 非常感谢你的答复指导,我下载这个2438.usb.c试了之后,报了很多错误,可能需要匹配的相关头文件。不知道如何下载整体更新包,包括头文件的。或者如何退回到老版本的开发包,在哪里下载?谢谢!

  • http://dl.21ic.com/download/msp430ware_users_guide-1_00_00_00-pdf-ic-96339.html

    21ic有1.0版本的下载,你可以看看这个版本。