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.

TRF7970A: TRF7970A SPI Communication Problem

Part Number: TRF7970A
Other Parts Discussed in Thread: MSP430FR4133,

Hi eveyone.

We designed own circuit for am project with TRF7970A chip. MCU is MSP430FR4133 and powered 3V3 DC

In own design we took TRF7970A datasheet as reference an performed wire connections according to its datasheet.

But, we have a problem with SPI communication between MCU and TRF7970A chip. Sequence is below;

1. Power Up TRF (EN pin H)

2. Send SPI read command. Read ISO Control Register (for example)

3. Show SPI received data with UART

Default value of ISO Control Register is 0x02 right? But, I am receiving 0x00 sometimes, and sometimes 0xC1 etc and sometimes 0x00.

CPOL=0 and CPHA =1, SPI Clock MCLK/4 (2 MHZ), and using SS pin.

What is the wrong thing?

  • Hi Mesut,

    You may in luck, because we actually have an example code for that exact MCU! Check out this code and see if it gets you running quickly: http://www.ti.com/lit/zip/sloa233

    The SPI settings are:

    void
    SPI_usciSet(void)									//Uses USCI_B0
    {
    	UCB0CTLW0 |= UCSWRST;							// Enable SW reset
    	UCB0CTLW0 |= UCMSB + UCMST + UCSYNC;			// 3-pin, 8-bit SPI master
    #if (TRF79xxA_VERSION == 60)
    	UCB0CTLW0 |= UCCKPH;
    #endif
    	UCB0CTLW0 |= UCSSEL__SMCLK;						// SMCLK
    
    	UCB0BR0 = 0x04;
    	UCB0BR1 = 0;
    
    	P5SEL0 |= (BIT1 | BIT2 | BIT3);					// P5.1,5.2,5.3 UCBOCLK, UCB0SIMO, UCB0SOMI Selected
    
    	SLAVE_SELECT_PORT_SET;							// P8.2 - Slave Select
    	SLAVE_SELECT_HIGH;								// Slave Select - inactive ( high)
    
    	UCB0CTLW0 &= ~UCSWRST;							// **Initialize USCI state machine**
    
    	// Disable the GPIO power-on default high-impedance mode
    	// to activate previously configured port settings
    	PM5CTL0 &= ~LOCKLPM5;
    }

    You can find all the SPI code in the hardware folder within spi.c.

  • Thank you for help Sir.

    Actually, I progressed on TRF7970A chip fairly. Current problem is different from this.
    Previous problem is related to SPI speed and some of configuration for register. (at least I assume that)