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.

MSP430F5359: Unlock the Battery Backup Subsystem before trying to use the XT1 clock in any way/any mode

Part Number: MSP430F5359
Other Parts Discussed in Thread: MSP430F2618, , MSP430WARE, MSP-EXP430F5529LP, BOOSTXL-CAPKEYPAD, MSP430F5529

I am converting a design from using an MSP430F2618 to MSP430F5359. I've had a very tough time getting XT1 to run even though I was using the sample code provided by TI. The difficulty, as it turns out, was that I was not unlocking the Battery Backup System.

The necessary code:

while(BAKCTL & LOCKBAK) // Unlock XT1 pins for operation
BAKCTL &= ~(LOCKBAK);

was found in this post:

Unfortunately, this code ISN'T PRESENT in any of TI's example code nor is the requirement discussed anywhere in the 

MSP430x5xx and MSP430x6xx Family User's Guide
Literature Number: SLAU208P
June 2008–Revised October 2016

Nor in the

SLAS700C –OCTOBER 2012–REVISED OCTOBER 2013
MSP430F665x, MSP430F645x, MSP430F565x, MSP430F535x Mixed Signal Microcontrollers Data Sheet

This was a show-stopper for us. If this has not already been fixed, could someone from TI please file the necessary bug report within TI to get this lack of documentation remedied?

  • Hi Atlant,

    Thank you for bringing this to our attention. I agree that this needs to be documented better in this device's User's Guide and/or datasheet. I'm taking the appropriate actions to get this added to the next update of these documents.

    I also checked all of our examples provided in MSP430Ware for the MSP430F5359 and noticed that any example using XT1 include the code snippet you've pointed out in your post. For example, here is a link to an example that uses the code snippet:
    dev.ti.com/.../

    Can you provide a link to the examples that aren't showing the correct setup so I can also take action to get these updated?

    Best regards,
    Caleb Overbay
  • Caleb:

    >I agree that this needs to be documented better in this device's User's Guide and/or datasheet. I'm taking the appropriate actions to get this added to the next update of these documents. 

    Thanks!

    > Can you provide a link to the examples that aren't showing the correct setup so I can also take action to get these updated?

    A few days ago on another thread, Cameron P. LaFollette gave me the link below for TI source code examples:

    None of the 5xx_6xx "UCS" files in that .ZIP contained the code snippet. Here are the files I looked at:

    • ./msp430ware_3_80_03_07/captivate/example_projects/CaptivateDesignCenterWorkspace/BOOSTXL-CAPKEYPAD/hostmcu_demo_src/MSP-EXP430F5529LP_KeypadHostDemo_QVGA/driverlib/MSP430F5xx_6xx/ucs.c
    • ./msp430ware_3_80_03_07/captivate/example_projects/CaptivateDesignCenterWorkspace/BOOSTXL-CAPKEYPAD/hostmcu_demo_src/MSP-EXP430F5529LP_KeypadHostDemo_USBNumPad/driverlib/MSP430F5xx_6xx/ucs.c
    • ./msp430ware_3_80_03_07/driverlib/driverlib/MSP430F5xx_6xx/ucs.c
    • ./msp430ware_3_80_03_07/driverlib/eclipse/plugins/com.ti.mcu.msp430.driverlib.product.ui_2.91.05.02/resources/empty/MSP430F5xx_6xx/driverlib/MSP430F5xx_6xx/ucs.c
    • ./msp430ware_3_80_03_07/driverlib/eclipse/plugins/com.ti.mcu.msp430.driverlib.product.ui_2.91.5.02/resources/empty/MSP430F5xx_6xx/driverlib/MSP430F5xx_6xx/ucs.c
    • ./msp430ware_3_80_03_07/examples/boards/MSP-EXP430F5529LP/MSP-EXP430F5529LP_Software_Examples/Firmware/Source/OutOfBox_EmulStorageKeyboard/driverlib/MSP430F5xx_6xx/ucs.c
    • ./msp430ware_3_80_03_07/examples/boards/MSP-EXP430F5529LP/MSP-EXP430F5529LP_Software_Examples/Firmware/Source/SimpleUsbBackchannel/driverlib/MSP430F5xx_6xx/ucs.c
    • ./msp430ware_3_80_03_07/grlib/driverlib/MSP430F5xx_6xx/ucs.c
    • ./msp430ware_3_80_03_07/iec60730/driverlib/MSP430F5xx_6xx/ucs.c
    • ./msp430ware_3_80_03_07/usblib430/MSP430_USB_Software/MSP430_USB_API/driverlib/MSP430F5xx_6xx/ucs.c

    Thanks for your reference; I see that it's quite different!

    Atlant

  • Caleb:

    It's interesting that you pointed me to a set of MSP430F665x routines and I was referring to a set of MSP430F5xx_6xx routines (which I suppose are older).

    Perhaps what's really needed is a "Key" that says "If you have a (say) MSP430F5359 chip, refer to the examples in the MSP430F665x directories"? That is, an index that maps all the chips to the most-appropriate example code?

  • Hi Atlant,

    The link you provided in the previous post took me to a UART example for the MSP430F5359 that contained the appropriate unlocking code. It looks like the examples Cameron pointed you to are for the MSP430F5529 which has a different setup when using XT1. I apologize for the misdirection.

    Atlant Schmidt said:
    Perhaps what's really needed is a "Key" that says "If you have a (say) MSP430F5359 chip, refer to the examples in the MSP430F665x directories"? That is, an index that maps all the chips to the most-appropriate example code?

    There are examples specific to each device so a lookup key is not required. Some of the code examples, like the ones I pointed you to, are incorrectly named. this is something we are working on fixing. However, you should still be able to access them by searching for MSP430F5359 examples. There are several different ways to get to these examples:

    1. Via TI Resource Explorerin browser:
      1. Software --> MSP430Ware --> Devices --> MSP430F5xx_6xx --> MSP430F5359 --> Peripheral Examples
    2. Via TI Resource Explorer in CCS:
      1. View --> TI Resource Explorer --> (Follow steps from 1a.)
    3. Via the MSP430F5359 Product Folder:
      1. Tools and Software --> Software Section --> MSP430F665x, MSP430F565x Code Examples

    All of these paths will take you to the correct examples for the MSP430F5359. You can also use a similar approach for any of the parts in the MSP430 family. 

    Best regards, 
    Caleb Overbay

  • Caleb:

    > However, you should still be able to access them by searching for MSP430F5359 examples. There are several different ways to get to these examples:

    Thanks! I've bookmarked this thread!

    Atlant

**Attention** This is a public forum