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: mcspi3 multiple channels crashed problem.

Part Number: TDA4VM

Hi experts,

I trying using multiple channels in mcspi3, All things are good when using polling mode. But  when I using blocking mode and callback mode instead polling mode, only the first opened channel will transfer successfully. When I operate other channels, the transfer function will crash. I trace where it crash, I found it's in SPI_v1.c's line 772 McSPICSAssert(hwAttrs->baseAddr, chNum);

But if I just using one channel that first opened, it work normally.

This code shows where it crash.

        if(SPI_MASTER == chObj->spiParams.mode)
        {
            McSPIIntEnable(hwAttrs->baseAddr, intStatus);

            if (hwAttrs->chMode == MCSPI_SINGLE_CH)
            {
                /* Assert un-used chip select (Force SPIEN) */
                McSPICSAssert(hwAttrs->baseAddr, chNum);  //Crash here
            }
        }
        else
        {
            McSPIIntEnable(hwAttrs->baseAddr, (uint32_t)(MCSPI_INT_RX_FULL(chNum)));
        }
So is there any bugs in SPI_v1 driver?

Regards.

  • Hi Wall-E,

    Are you still facing the issue? 

    This seems to be a bug in the driver.

    While we are looking into it, can you please check what's the value of hwAttrs and hwAttrs->baseAddr variables at that statement? 

    If possible, can you please share the sample example?

    Regards,

    Brijesh