Hi All,
I have just returned to a development that I have been doing with the MSP430F5510 using USB.
I use Rowley Crossstudio for MSP430 to do my development, and have converted the TI USB stack so that it will compile with this development platform. Occasionally Rowley update the support packages for the MSP430 to include new processor variants, and when I returned to my code today there was such an update. Having installed the update I attempted to re-compile the code that I had used before and found an error is the file usb.c as follows.
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
}
Gives me an error with an undeclared identifier 'CPCS0'
I had a look in "MSP430x5xx and MSP430x6xx Family.pdf" to check out the bits in the USBPLLCTL register to try to see what was going wrong and CPCSO is not defined.
I then booted up my copy of CCS with the standard TI USB code and tracked back into the header files where I find
/* USBPLLCTL Control Bits */
//#define RESERVED (0x0001) /* USB - */
//#define RESERVED (0x0002) /* USB - */
//#define RESERVED (0x0004) /* USB - */
//#define RESERVED (0x0008) /* USB - */
//#define RESERVED (0x0010) /* USB - */
//#define RESERVED (0x0020) /* USB - */
#define UCLKSEL0 (0x0040) /* USB - Module Clock Select Bit 0 */
#define UCLKSEL1 (0x0080) /* USB - Module Clock Select Bit 1 */
#define UPLLEN (0x0100) /* USB - PLL enable */
#define UPFDEN (0x0200) /* USB - Phase Freq. Discriminator enable */
//#define RESERVED (0x0400) /* USB - */
//#define RESERVED (0x0800) /* USB - */
#define UPCS0 (0x1000) /* USB - PLL Clock Select Bit 0 */
//#define RESERVED (0x2000) /* USB - */
//#define RESERVED (0x4000) /* USB - */
//#define RESERVED (0x8000) /* USB - */
This shows a definition for UPCS0 in USBPLLCTL, but it is in a position that the reference manual says is reserved.
Can anyone tell me what is going on here, is the reference manual correct or is the header file correct??
Regards
Roy