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.

MSP-EXP430FR2433: PMM Register Access Denied

Part Number: MSP-EXP430FR2433

I have been using this MSP-EXP430FR2433 kit to develop many programs, which did not involve the PMM, and they all work. Now when I'm trying to configure the PMM to enable the internal voltage reference, the code cannot access the register. The intent of the program, but not shown in its entirety, is to access the the built-in temperature sensor. This little program, shown below, will not work.

After the first password write, the INTREFEN bit is not set, and the second password attempt causes a reset. I've recreated the same program in a new project with no success, and I have removed power from the kit and then powered it up without success.

Has anybody else encountered this problem? Can anybody shed some light on this?

I'm using CCS  Version: 10.1.1.00004 on Windows 10.

#include <msp430.h>
int main(void)
{
    WDTCTL = WDTPW | WDTHOLD;

    PMMCTL0_H  |= PMMPW_H;  
    PMMCTL2      |= INTREFEN;                  // Bit not set

    PMMCTL0      |= PMMPW;                      // Causes a reset
    PMMCTL2      |= INTREFEN;
    
    return 0;
{

  • I think a found a bug in the msp430.h file because when I create and use a pointer variable for setting the password, my code can access the PMM registers. Here is my code example that works.

    #include <msp430.h>
    int main(void)
    {
        WDTCTL = WDTPW | WDTHOLD;
    
        volatile char * aPtr = (char *) 0x121;  // pointer variable to PMMCTL_H
        *aPtr = 0xA5;                           // Writing 8 bit password to PMMCTL_H
        
        PMMCTL2    |= INTREFEN;                 // Enable internal v. reference can now be set
    
        return 0;
    {
    

    Next question: how do I report a bug?

  •     PMMCTL0_H  |= PMMPW_H;

    This writes (0xA5|0x96)=0xB7 to the password byte, which disables write access [Ref UG (SLAU445I) Sec 2.3]. Try:

    >    PMMCTL0_H  = PMMPW_H;

    --------------

    The behavior in your second post looks correct. Why do you believe it is incorrect?

  • Bruce:

    Thank you for pointing out my error. Instead of using a bitwise assignment operation, I used a bitwise OR assignment. Perhaps it was my eyesight, haste, or habits which made me overlook that obvious mistake.

    -Thomas

**Attention** This is a public forum