Banner_AURIX_Security-Solution Banner_AURIX_Security-Solution Banner_AURIX_Security-Solution Banner_AURIX_Security-Solution


infineon4engineers Facebook

infineon@google+ Google+

infineon@linkedin linkedin

infineon4engi@twitter twitter

infineon@youtube youtube

+ Reply to Thread
Results 1 to 4 of 4

Thread: SPI In Tc29x AURIX

  1. #1
    Beginner Beginner gurugiri is on a distinguished road
    Join Date
    Apr 2016
    Posts
    5
    Points
    68.75

    SPI In Tc29x AURIX

    Hello,

    I am facing problem with FIFO operation In SPI
    How exactly the data are fetched and transmitted in SPI FIFO
    I am using SIngle Move Mode and Short Data

    ((Ifx_QSPI*)spiModule)->GLOBALCON.B.LB = 1; // LOOP BACK mode requested

    ((Ifx_QSPI*)spiModule)->GLOBALCON.B.EN = 1; // RUN requested

    ((Ifx_QSPI*)spiModule)->GLOBALCON1.B.RXFM = 0x01;//
    ((Ifx_QSPI*)spiModule)->GLOBALCON1.B.TXFM = 0x01;//

    ((Ifx_QSPI*)spiModule)->GLOBALCON1.B.RXFIFOINT = 0x0;
    ((Ifx_QSPI*)spiModule)->GLOBALCON1.B.TXFIFOINT = 0x0;



    function :
    ifxSpiModule->BACONENTRY.U = (spiChannel << 28/*CS*/) |
    (spiShiftMode << 21/*MSB*/) |
    (0 << 0/*LAST*/) |
    (31 << 23/*DL*/ | 7 << 16);


    ifxSpiModule->DATAENTRY[0].U = buf[0];

    ifxSpiModule->DATAENTRY[1].U = buf[1]; // write to transmitter buffer

    ifxSpiModule->DATAENTRY[2].U = buf[2];

    ifxSpiModule->DATAENTRY[2].U = buf[3];

    (ifxSpiModule->BACONENTRY.U)|= 1 << 0;

    ifxSpiModule->DATAENTRY[4].U = 0x11111224;

    And when I read

    temp = ifxSpiModule->RXEXIT.U; // read receiver buffer

    buf0 = temp;

    temp = ifxSpiModule->RXEXIT.U; // read receiver buffer

    buf1 = temp;

    temp = ifxSpiModule->RXEXIT.U; // read receiver buffer

    buf2 = temp;

    temp = ifxSpiModule->RXEXIT.U; // read receiver buffer

    buf3 = temp;

    when I read the in while (1) loop then buf0, buf1,buf2, buf3 value keeps changing
    Can anyone explain me FIFO operation and its behaviour

  2. #2
    New Member New Member Dee313 is on a distinguished road
    Join Date
    Feb 2016
    Posts
    2
    Points
    30
    What does the value change to?

    You should read ((Ifx_QSPI*)spiModule)->STATUS.B.RXFIFOLEVEL to read how much data is available, and then read RXEXIT that many times.

  3. #3
    Beginner Beginner gurugiri is on a distinguished road
    Join Date
    Apr 2016
    Posts
    5
    Points
    68.75
    Thanks..I will check with this

  4. #4
    Intermediate Intermediate KDN is on a distinguished road
    Join Date
    Oct 2017
    Posts
    39
    Points
    577.5
    Hi,

    can you please post code for SPI clock and calculation.

+ Reply to Thread
Disclaimer

All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.


Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.


Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.