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.

Number of SPI Ports 'F5438 4 or 8?

Other Parts Discussed in Thread: MSP430F5438

How many total SPI ports can I configure and use on the MSP430F5438(A)? I know there are 4 controllers but each has an A and B option. Does this mean 4 or 8? Ideally, I'd like to use a total of 6 one for each of the different devices I have for optimum flexibility.

thanks

  • Hi mike,

    each USCI has 2 serial channels (1 "A" Channel, 1 "B" Channel) which can be run at the same time or independently. Each channel is mutually exclusive of the other.

    Care needs to be taken that the required configuration is available on the pinout of the MSP430. This can be determined by looking at the pin description in the device datasheet. Multiplexing of the MSP430 pins can prevent some configurations from being used.

    For devices with 4 USCI modules, then eight channels are available: four "A" Channels and four "B" Channels. These are all independent and can be run simultaneously as long as the pinout for that device permits access to all necessary configurations.

    Rgds
    aBUGSworstnightmare

  • On the 5438, up to 8 SPI channels can be used simultaneously (and each channel can be either slave to an external master or master for any number of slave, only limited by the number of I/O ports for chip-selecting them (either directly or through scaled multiplexing/latching of additional I/O lines).

    Since on 54series, the A and B modules of each USCI have their own interrupt vector, the 8 channels are almost completely independent and the software is linearly scalable. Duplicate the code, assign a different interrupt vector and a different register start addres/different register names. My SPi code works with pointer arrays with the register names and you just say 'send this to SPI #x' after pulling down the proper CS line. (I only implemented SPI master so far, as SPI slave in't fun and I didn't need it)

    There is, however, a physical limitation: If one module of an USCI is used for SPI slave (or master in 4 wire multi-master mode), then the other module cannot be used for SPI. This is because each USCI has only 6 port pins assigned for both modules and SPI requires at least 3 (single master mode)  hardware-controlled lines (the CS line is a generic GPIO and can be from any port pin, it is not controlled by the hardware at all). The modules other half can only be used for I2C or USART if one SPI is used for 4 wire multimaster or slave mode.

    It' spossible that other MSP devices (or those with a port mapping controller) can overcome this limitation.

**Attention** This is a public forum