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.

MSP430g2955 SPI issue

Other Parts Discussed in Thread: MSP430G2744, MSP430G2955

Hi

Our customer use the MSP430G2955 UCB0 to control SPI flash, But clock pluse does not generation. please refer to following , I had tried MSP430g2744 same codition it's correct. Please helping me to solve this issue.

4135.timming.rtf

  • Can you share the code that configures the UCB0?

  • Hi Brain,

    Please refer to the following :

        WDTCTL = WDT_ADLY_250;                     // WDT 250ms, ACLK, interval timer

        if (CALBC1_8MHZ==0xFF)     // If calibration constant erased
      {         
        while(1);                               // do not load, trap CPU!! 
      }
        DCOCTL = 0;                               // Select lowest DCOx and MODx settings
        BCSCTL1 = CALBC1_8MHZ;
        DCOCTL = CALDCO_8MHZ;                     // Load 8MHz constants
        BCSCTL3 = XCAP_3;                        // 12.5 pf

        FCTL2 = FWKEY + FSSEL0 + 24;               // MCLK/24 for Flash Timing Generator
     

      // Initialize SPI & UART configurations
       P3DIR |= SPI_CE;
       P3SEL |= BIT1 + BIT2 + BIT3;
       UCB0CTL0 |= UCCKPL + UCMSB + UCMST + UCSYNC;  // 3-pin, 8-bit SPI master
       UCB0CTL1 |= UCSSEL_2;                         // SMCLK
       //UCB0BR0 |= 0x02;                              // /2 , SMCLK = 1M
       UCB0BR0 |= 0x10;                              // /16 , SMCLK = 8M
       UCB0BR1 = 0;                                  
       UCB0CTL1 &= ~UCSWRST;                         // **Initialize USCI state machine**

        P3OUT &= ~SPI_CE;
        IFG2 &= ~UCB0RXIFG;
        UCB0TXBUF = WRITE_ENABLE;
        while (!(IFG2 & UCB0RXIFG));            // USCI_B0 TX buffer ready?
        P3OUT |= SPI_CE;

    Thanks

  • The display here seems to suggest that the SCK probe is connected to pin 10; my copy of SLAS800 indicates that UCB0CLK is on pin 12 (QFN) or pin 14 (TSSOP). Is it possible that you're probing the wrong pin?

    The SCE timing looks right, so the SPI unit is running; the SCK signal is just not getting to the pin you're looking at.

  • Hi Quote,

    I used CLK pin in 14 (TSSOP) ,please see the following pin setting :

    The same setted we change part name to MSP430G2744 ,rebuild project after the CLK can be work.  

    Thanks

  • Hi Quote,

    sorry add image file

    I used CLK pin in 14 (TSSOP) ,please see the following pin setting :

    The same setted we change parts name to MSP430G2744 ,rebuild project after the CLK can be work.  

    Thanks3482.pin_setting.rtf

    Thanks

**Attention** This is a public forum