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.

IWR6843AOP: SPI instance cannot open.

Part Number: IWR6843AOP

Hi,

I wrote the following code, but SPIA cannot be opened.

/* Setup the SPI Parameters */
    SPI_Params_init(&spiParams);
    spiParams.mode                                              = SPI_MASTER;
    spiParams.u.masterParams.bitRate                            = 40000000;
    spiParams.u.masterParams.numSlaves                          = 1;
    spiParams.u.masterParams.slaveProf[0].chipSelect            = 0;
    spiParams.u.masterParams.slaveProf[0].ramBufLen             = MIBSPI_RAM_MAX_ELEM;
    spiParams.u.masterParams.slaveProf[0].dmaCfg.txDmaChanNum   = 1U;
    spiParams.u.masterParams.slaveProf[0].dmaCfg.rxDmaChanNum   = 0U;

/* Open the SPI Instance */
    gMmwMssMCB.spiHandle = SPI_open(0, &spiParams);
    if (gMmwMssMCB.spiHandle == NULL)
    {
        System_printf("Error: MMWDemoMSS Unable to open the SPI Instance\n");
        //return;
    }

How should I modify it?

Regards,

Haotian

  • Hi Haotian, 

    I have a couple suggestions for you.

    • Take a look at the SPI driver as a reference.  This is found in the mmWave SDK: <INSTALL_LOCATION>\mmwave_sdk_03_05_00_04\packages\ti\drivers\spi\src\SPI.c
    • Try running the SPI driver test.  This is also found in the mmWave SDK: <INSTALL_LOCATION>\mmwave_sdk_03_05_00_04\packages\ti\drivers\spi\test\xwr68xx
    • Check and verify your hardware setup - software pinmux, mux switches on the board, where you have SPI wired to the board, etc
    • You can also CCS debug to figure out what error you are getting (if you have a MMWAVEICBOOST, the necessary hardware for CCS debugging a TI mmWave EVM)

    Regards,

    Brennan