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.

TM4C129DNCPDT: communicate with multiple slave boards

Part Number: TM4C129DNCPDT

Hi Team,

The customer wants to use TM4C129DNCPDT to control 40 TMC5160 by SPI, and he wants to know how to improve SPI drive ability.

Could you help check this case?

Thanks & Regards,

Ben

  • Hi,

      I think 40 external devices may be too much loading on the SPI pins. By default, SPI pins are configured with 2mA drive strength. You can modify the TivaWare library to increase the drive strength such as 8mA or 12mA. You will need to determine with a higher strength such as 12mA, can it provide adequate rise/fall time as well the SPI frequency required by the slave devices. 

      Normally, you would call GPIOPinTypeSSI to configure the GPIO pins for SSI function. As you can see for SSI function, 2mA is used as the drive strength by default. You can change the drive strength to higher value such as 12mA or 8mA and then rebuild the peripheral driver library. Or you can copy this file to your working project and recompile with your updated code. 

    //
    //! Configures pin(s) for use by the SSI peripheral.
    //!
    //! \param ui32Port is the base address of the GPIO port.
    //! \param ui8Pins is the bit-packed representation of the pin(s).
    //!
    //! The SSI pins must be properly configured for the SSI peripheral to function
    //! correctly. This function provides a typical configuration for those
    //! pin(s); other configurations may work as well depending upon the board
    //! setup (for example, using the on-chip pull-ups).
    //!
    //! The pin(s) are specified using a bit-packed byte, where each bit that is
    //! set identifies the pin to be accessed, and where bit 0 of the byte
    //! represents GPIO port pin 0, bit 1 represents GPIO port pin 1, and so on.
    //!
    //! \note This function cannot be used to turn any pin into a SSI pin; it only
    //! configures a SSI pin for proper operation. Note that a GPIOPinConfigure()
    //! function call is also required to properly configure a pin for the SSI
    //! function.
    //!
    //! \note A subset of GPIO pins on Tiva devices, notably those used by the
    //! JTAG/SWD interface and any pin capable of acting as an NMI input, are
    //! locked against inadvertent reconfiguration. These pins must be unlocked
    //! using direct register writes to the relevant GPIO_O_LOCK and GPIO_O_CR
    //! registers before this function can be called. Please see the ``gpio_jtag''
    //! example application for the mechanism required and consult your part
    //! datasheet for information on affected pins.
    //!
    //! \return None.
    //
    //*****************************************************************************
    void
    GPIOPinTypeSSI(uint32_t ui32Port, uint8_t ui8Pins)
    {
    //
    // Check the arguments.
    //
    ASSERT(_GPIOBaseValid(ui32Port));

    //
    // Make the pin(s) be peripheral controlled.
    //
    GPIODirModeSet(ui32Port, ui8Pins, GPIO_DIR_MODE_HW);

    //
    // Set the pad(s) for standard push-pull operation.
    //
    GPIOPadConfigSet(ui32Port, ui8Pins, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD);
    }