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.

MSP430FR5969: MSP430fr5969 being SPI Slave?

Part Number: MSP430FR5969

i am using msp430fr5969. SO in that one i just wants to know that, is it possible that ms430fr5969 controller is working as a spi slave ?

if yes then how the working is, and how should i connect my hardware like pin configuration?

thanks 

Anil D. 

  • Hi Anil,

    Yes it is possible for the MSP430FR5969 to be used as a SPI slave. You should start by reading the Enhanced Universal Serial Communication Interface (eUSIC) - SPI section of the User's Guide to gain an understanding of how SPI communication works on MSP430 devices. 

    Next, please look into the SPI examples that can be found in MSP430Ware, TI Resource Explorer, and a direct download here

    Finally, when debugging your communication please look into the SPI section of Solutions to Common eUSCI and USCI Serial Communication Issues on MSP430 MCUs.

    Best regards, 
    Caleb Overbay

  • Hello caleb,

    I have all the documentary, but i am not understanding the buffer initialization and how can i get the data and how can i select the slave. so you just tell how can i do this? How MSP is working as a slave?

    and one more question is, is SPI communication having the concept of baud rate?
  • Hi Anil,

    I can't explain how SPI communication works because it would take far too long and this is why we have the documentation I provided. Again you should start by reading the SPI section of the User's Guide I referenced previously, along with the SPI communication examples.

    But before doing any of that, I would do a quick google search and learn how the SPI protocol works. Here are a few useful links:
    learn.sparkfun.com/.../serial-peripheral-interface-spi
    www.circuitbasics.com/.../
    www.allaboutcircuits.com/.../

    Best regards,
    Caleb Overbay
  • I agree with Caleb, it would take too ling to explain SPI here.

    But the master sets the speed with the clock signal (CLK or SCK) and data can be sent both ways at the master's clock speed at the same time if the slave supports it. 1 Mbit per second is on the slow end, and 10 Mbit persecond is normal, and some devices can do 50 or 66 Mbits per second. It is much faster than a UART or I2C because of the dedicated clock and one way shorter data lines.
  • Dear Caleb and Kipton,

    The links which you shared was so explanatory, And its clears my all doubt regarding SPI communicatin . But still my main doubt is not resolved.

    See what happen, when msp430fr5969 is working as a master then i am using USCI_A0_VECTOR for SPI/UART communication. In this ISR itself UCA0RXBUF and UCA0TXBUF are used as a buffer.

    But when i go for the msp430fr5969 acts as a slave that time which buffer i can use as a receive buffer and which one used as a transmit buffer.

    And one more is that how can i connect my MOSI, MISO, pins in hardware level.

    And Is there any Baud Rate concept is present in SPI communication?

  • Hi Anil,

    Anil Dhanawade said:
    But when i go for the msp430fr5969 acts as a slave that time which buffer i can use as a receive buffer and which one used as a transmit buffer.

    When the MSP430FR5969 acts as a SPI slave the same UCA0RXBUF and UCA0TXBUF are used as the receive and transmit buffers respectively.

    Anil Dhanawade said:
    And one more is that how can i connect my MOSI, MISO, pins in hardware level.

    I don't know what you mean by this. Are you asking which physical pins are the MOSI and MISO pins? You can find the pin signal descriptions in Table 4-2 of the MSP430FR59xx Mixed-Signal Microcontrollers datasheet.

    Anil Dhanawade said:
    And Is there any Baud Rate concept is present in SPI communication?

    No. The SPI master provides a clock signal to the slave via the CLK line. Again, the links I provided describe this in detail. 

    Finally, the example you will probably find the most helpful is this one and this one.

    Best regards, 
    Caleb Overbay

  • Hello caleb,

    I learn too much while going through refereed links. Thanks a lot. I got the things of MSP430fr5969 slave initialization and how to do it.

    Thanks
    Anil D.
  • Super.

    It may not be clear when you start but MISO means this pin is a Master In Slave Out So as a Master it is an output pin, but as a slave it is an Input pin. Similar to the MOSI it is Master Out Slave In. FYI the name can help you remember. Some slave devices are labeled SO and SI so it makes it easier to know which wire hooks up where.
  • Hello Kipton,

    Yes, Now from hardware also i am cleared. Let me clear my assumptions.
    MISO pin for MSP430FR5969 ( Act as a slave) , This pin act as a input pin for me. and MOSI pin for MSP430 act as a Output pin.
    And What about Buffers(TX And RX). IS this acts as same or it would be changed> and ISR interrupts are same or any change into that?

    Thanks
    Anil D.
  • Hi Anil,

    Anil Dhanawade said:
    MISO pin for MSP430FR5969 ( Act as a slave) , This pin act as a input pin for me. and MOSI pin for MSP430 act as a Output pin.

    Can you elaborate on what you mean by "me". The MISO pin stands for Master In Slave Out (MISO). So if the MSP430FR5969 is the slave, then the MISO pin is an output for the MSP430FR5969 and an input to the master device.

    Anil Dhanawade said:
    And What about Buffers(TX And RX). IS this acts as same or it would be changed> and ISR interrupts are same or any change into that?

    I don't understand what you're trying to ask here. Can you provide more detail please?

    Best regards, 
    Caleb Overbay

  • Hello Caleb,

    First Point:
    for "me" means MSP430FR5969(Slave).

    Second point:
    UCA0RXBUF and UCA0TXBUF this 2 buffers are working same for MSP430 is master or slave.
    But now i am clear about this., There is no any change in the buffers. I thought that is there any swapping will be happening in the buffers. but its not like that.

    Thanks Caleb.

    Warm Regards
    Anil D.
  • I am guessing English is not your first language, so this stuff is a lot harder for you than if English was your first language. I have this problem all the time with my work colleagues in other countries. I can not imagine trying to understand technical instructions in another language. I have enough problems understanding technical instructions in my own language.

    MISO Master <<<<<<<<<<< Slave This wire is a input for the master and an output for the slave
    MOSI Master >>>>>>>>>>> Slave This wire is a output for the master and an input for the slave
    SCK Master >>>>>>>>>>> Slave This wire is a output for the master and an input for the slave

    >>> Direction of data

    RX buffer is the receive buffer in all cases. It is the data that comes in
    TX Buffer is the same in all cases, it is the data that goes out.


    So I believe you are saying, you are a MSP430FR5969 and acting as a slave.

    So the MOSI pin would be an Input pin (slave in) because you are acting as a slave
    And the MISO pin would be a output pin (slave out) because you are acting as a slave.
    And the SCK pin would be an input pin because you are acting as a slave.

**Attention** This is a public forum