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.

MSP430FR5922: MSP430 Clock System register lockout

Part Number: MSP430FR5922

CSCTL0 Clock System Control 0 is the password register to unlock the CS registers.

CSKEY password. Must always be written with A5h; a PUC is
generated if any other value is written. Always reads as 96h. After
the correct password is written, all CS registers are available for
writing.

If anything other than the correct passwrd is written the unit resets (PUC).  There is no mention of how to relock the CS registers.

What is the process to relock these registers?  (Does the lock timeout?)

Thank you

  • First, if you don't write the right password, the CS register will not unlock. So you don't need to consider about how to lock the cs registers.

    Second, after reset, all the registers are initialized. Then the register is locked.

    You can make a try by yourself as well. 

  • Is there a tech-doc that address this issue?

  • What is the process to relock these registers?  (Does the lock timeout?)

    Looking at the cs_01.c example for a MSP430FR5922 shows the following code:

      // Clock System Setup
      CSCTL0_H = CSKEY >> 8;                    // Unlock CS registers
      CSCTL1 = DCOFSEL_6;                       // Set DCO to 8MHz
      CSCTL2 = SELA__VLOCLK | SELS__DCOCLK | SELM__DCOCLK;  // Set SMCLK = MCLK = DCO
                                                // ACLK = VLOCLK
      CSCTL3 = DIVA__1 | DIVS__1 | DIVM__1;     // Set all dividers to 1
      CSCTL0_H = 0;                             // Lock CS registers

    Where the above example code writes a zero to the CSKEY field in CTL0 with the comment "Lock CS registers". This is at at odds with the SLAU367P MSP430FR58xx, MSP430FR59xx, and MSP430FR6xx Family User's Guide which says writing a value other than A5h to the CSKEY generates a Power-up Clear (PUC).

    Not sure if this is an error in the User's Guide or in the example code.

**Attention** This is a public forum