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.

TDA4VM: SPI configuration issue TDA4VM connected to TJA1145 CAN transceiver through MCU SPI1

Part Number: TDA4VM

Hi,

I’m working on configuring TJA1145 CAN transceiver connected to TDA4 SOC through MCU SPI1 from Autosar running on MCU with TI MCAL SPI driver and facing issues with SPI communication. There doesn’t seem to be any response to requests for setting operation mode or reading status flags.

 

Can you let me know what is the configuration missing?

 

Settings done are given below

  1. Pinmux configuration – generated using TI pin mux tool..details in the end
  2. MCU SPI clock setting – Clock source - MCU_CLKSRC_1 (same source used for CAN), MCU SPI clock reference point - 4Mhz
  3. SPI general configuration– Synchronous communication only, 4 channels, 4 jobs, 3 sequences, No interruptible sequences,  1 External device config, 1 HW unit
  4. External device config – Baud rate - 500, CS polarity - LOW, Data shift edge - Trailing, CS - enabled, Ext clock divider - 0, HW unit - CSIB1, Shift clock idle level - LOW, Data line 0 - Reception, Data line 1 - Transmission, Start bit - enabled
  5. HW unit config – SPI_UNIT_MCU_SPI1

 

Pin mux config generated using TI Pin mux tool below. MCU as master.

static pinmuxPerCfg_t gMcu_spi1PinCfg[] =
{
    /* MyMCU_SPI1 -> MCU_SPI1_CLK -> F26 */
    {
        PIN_WKUP_GPIO0_0, PIN_MODE(0) | \
        ((PIN_PULL_DISABLE) & (~PIN_PULL_DIRECTION & ~PIN_INPUT_ENABLE))
    },

    /* MyMCU_SPI1 -> MCU_SPI1_CS0 -> F27 */
    {
        PIN_WKUP_GPIO0_3, PIN_MODE(0) | \
        ((PIN_PULL_DISABLE) & (~PIN_PULL_DIRECTION & ~PIN_INPUT_ENABLE))
    },

    /* MyMCU_SPI1 -> MCU_SPI1_D0 -> F25 */
    {
        PIN_WKUP_GPIO0_1, PIN_MODE(0) | \
        ((PIN_PULL_DISABLE) & (~PIN_PULL_DIRECTION & ~PIN_INPUT_ENABLE))
    },

    /* MyMCU_SPI1 -> MCU_SPI1_D1 -> F28 */
    {
        PIN_WKUP_GPIO0_2, PIN_MODE(0) | \
        ((PIN_PULL_DISABLE | PIN_INPUT_ENABLE) & (~PIN_PULL_DIRECTION))
    },

    {PINMUX_END}
};

static pinmuxModuleCfg_t gMcu_spiPinCfg[] =
{
    {1, TRUE, gMcu_spi1PinCfg},
    {PINMUX_END}
};

static pinmuxBoardCfg_t gWkupPinmuxData[] =
{
        {0, gMcu_mcanPinCfg},
        {1, gWkup_gpioPinCfg},
        {2, gMcu_spiPinCfg},
        {PINMUX_END}
};