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.

TMS570LS3137 mibSpi overrun flags

Other Parts Discussed in Thread: HALCOGEN

Hello,

I am using the HALCoGen 3.06 drivers for mibSpi.  I'm using mibSpi1 with a physical wrap from SIMO to SOMI.  I have HALCoGen set up using buffer mode 4, trigger source disabled, trigger event always, and oneshot.  After initialization, the receive buffer words have RXEMPTY set.  I use mibspiSetData() to initialize the transmit buffers, and mibspiTransfer() once to initiate the transfer.  The data is transferred correctly with all status bits of each receive buffer set to 0.  I then use mibspiGetData() to read the receive buffers.  I expected the RXEMPTY bits to be set in all receive buffers as if the data was read from SPIBUF in compatibility mode, but they are left at 0.  When I run mibspiTransfer() again, the RXOVR flag is set in all receive buffers.  I assume this is because the RXEMPTY flags were not set when the last transfer started. 

Is this a correct interpretation?  Is there a way automatically clear the RXEMPTY flags in the receive buffers when the data is read out?

Thanks, Charlie Johnston

  • Hi Charlie,

    We are looking into the query and will get back to you shortly

    Regards,

    Praveen

  • Hi Charlie,

    We tried the same scenario at our end with your configuration. It seems to work fine. The RXEMPTY gets set in the receive buffer once the mibspiGetData gets executed. To make sure, there is no problem with the physical wrap, can you try the same scenario with the Internal loopback(code given below)? Call this function after mibspiInit(); which will create a internal loopback.

    mibspiEnableInternalLoopback(mibspiREG1);

    void mibspiEnableInternalLoopback(mibspiBASE_t *mibspi )

    {
    /* enabling internal loopback */
    mibspi->GCR1 |= 1U << 16U;
    }

    If you still have problems with the internal loopback, please attach your source code, we will try to investigate more on that.

    Regards,

    Praveen 

  • Hi Praveen,

    I was incorrect with the HALCoGen version; I was using 3.04.  The problem was caused by mibspi1ParityCheck() in sys_selftest.c; it was not disabling the parity test mode correctly.  This is fixed in version 3.06.

    Thank you for your time,

    Charlie