Part Number: MSP430F5310
My customer want to use PU.0/1, they use below code from MSPWARE , just added P4.0 to observation.
used this code, we can observe the right behavior of P4.0 with a oscilloscope, but can't see nothing from
PU.0/1. please suggest if something need to pay attention to when using the PU.0/1 function. thanks.
//------------------------------------------------------------------------------------------------------------------------------
P4.0, it is normal
Test PU.1 on MSP430F5310
Can't see anything using the oscilloscope
//-------------------------------------------------------------------------------------------------------------------------------
#include <msp430.h> // To include latest F530x and F5310 header file v1.1, refer
// to the "ReadMe - Header" file in the code ex zip file
int main(void)
{
volatile unsigned int i;
WDTCTL = WDTPW|WDTHOLD; // Stop WDT
// Configure PU.0 as output pins
LDOKEYPID = 0x9628; // Enable access to config registers
PUCTL |= PUOPE | PUOUT1; // PortU output enable
P4DIR |= 0x10; // Set P1.0 to output - SET BREAKPOINT HERE
// PU.0 = low and PU.1 = high
LDOKEYPID = 0x0; // Disbale access to config registers
while(1) // continuous loop
{
for(i=50000;i>0;i--); // Delay
LDOKEYPID = 0x9628; // Enable access to config registers
PUCTL ^= (PUOUT0 | PUOUT1); // XOR PU.0/1
LDOKEYPID = 0x0; // Disbale access to config registers
P4OUT ^= 0x10; // Toggle P1.0
}
}


