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.

AM2634: MCAL SPI Driver (MCAL Version 08.06.02)

Part Number: AM2634

Hello TI

We try to integrate MCAL SPI Driver (Version 08.06.02) into our basic SW project.

We did some experiment with the driver and we saw that the SPI is always in LOOPBACK Mode. We cannot change the mode.

Here is the configuration of the SPI driver:

SPI RECEPTION = Data[0] // SPI_PIN_D0 this is for Data Reception

SPI TRANSMISSION = Data[1] // SPI_PIN_D1 this is for Data Transmission

Here is an example:

we send data 0xAA

   

This is the result 

The Data's are correct send; but we always receive the same data's at the same time. The send and receive pins are not same and are not connected together. 

Why is there a loopback on the SPI driver?  We shouldn't have MISO_DO; because we don't have slave on the other side.

Here is also a related code part :

If we comment this code part, it has no influence.

I think it is a small bug in the driver; but we need a fast fix for our development. 

I would be appreciated, if this issue could be handled as soon as possible.

Thank you 

best regards.

  • Hi,

    I'm looking into this issue and will get back by Tuesday EOD as I need some time to check with the SPI owner on this.

    Thanks

  • Hi,

    Which SPI instance are you using? Can you please share the entire SPI configuration? If I understood correctly, you have not connected any slave but still see data in D0?

    Thanks And Regards,

    Sunil Kumar M S

  • Hi Sunil,

    The enitre SPI cfg is attached:

    Spi_Cfg.c
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    /*
    *
    * Copyright (c) 2022 Texas Instruments Incorporated
    *
    * All rights reserved not granted herein.
    *
    * Limited License.
    *
    * Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive
    * license under copyrights and patents it now or hereafter owns or controls to make,
    * have made, use, import, offer to sell and sell ("Utilize") this software subject to the
    * terms herein. With respect to the foregoing patent license, such license is granted
    * solely to the extent that any such patent is necessary to Utilize the software alone.
    * The patent license shall not apply to any combinations which include this software,
    * other than combinations with devices manufactured by or for TI ("TI Devices").
    * No hardware patent is licensed hereunder.
    *
    * Redistributions must preserve existing copyright notices and reproduce this license
    * (including the above copyright notice and the disclaimer and (if applicable) source
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Yes , I don't connect it to any slaves and I see still Datas in D0.

    When I make changes on reception-, transmissioLineEnable, then nothing is changed on the control register of SPI. Any changes on those Lines, have no influence.

    The used SPI instance is SPI1.

    Best regards.

      

  • Hi,

    Can you please clarify below? Configuration looks fine.

    1. Are you using AM263x-CC evaluation board or custom board?
    2. Please share the dump of MCSPI1 registers? Base address of SPI1 is 0x52201000

    Please find the configuration attached in which I have configured SPI1 without loopback and could not see any data on D0

    /cfs-file/__key/communityserver-discussions-components-files/908/4657.Spi_5F00_PBcfg.c

    Thanks And Regards,

    Sunil Kumar M S