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.

MMWAVEICBOOST: IWR6843ISK-ODS SPI

Part Number: MMWAVEICBOOST
Other Parts Discussed in Thread: IWR6843ISK-ODS

Hi,

I am trying to enable SPI_1 on the IWR6843ISK-ODS MMWAVEICBOOST. I am starting with the sdk demo code. I changed the pinmux settings to avoid conflict with UART-3:

#if SPI_ENABLE
/* Setup the PINMUX to bring out the SPI-1 */
Pinmux_Set_FuncSel(SOC_XWR68XX_PINF13_PADAH,SOC_XWR68XX_PINF13_PADAH_SPIB_MOSI);
Pinmux_Set_FuncSel(SOC_XWR68XX_PING14_PADAI,SOC_XWR68XX_PING14_PADAI_SPIB_MISO);
Pinmux_Set_FuncSel(SOC_XWR68XX_PINF14_PADAJ,SOC_XWR68XX_PINF14_PADAJ_SPIB_CLK);
Pinmux_Set_FuncSel(SOC_XWR68XX_PINH14_PADAK,SOC_XWR68XX_PINH14_PADAK_SPIB_CSN);

#else
/* Setup the PINMUX to bring out the UART-3 */
Pinmux_Set_OverrideCtrl(SOC_XWR68XX_PINF14_PADAJ, PINMUX_OUTEN_RETAIN_HW_CTRL, PINMUX_INPEN_RETAIN_HW_CTRL);
Pinmux_Set_FuncSel(SOC_XWR68XX_PINF14_PADAJ, SOC_XWR68XX_PINF14_PADAJ_MSS_UARTB_TX);
#endif

I initialized DMA:

/* Init SYSDMA params */
DMA_Params_init(&dmaParams);

/* Open DMA driver instance 0 for SPI */
dmaHandle = DMA_open(0, &dmaParams, &errCode);

if (dmaHandle == NULL)
{
System_printf("Open DMA driver failed with error=%d\n", errCode);
return(0);
}

And I tried to initialize SPI:

#if SPI_ENABLE
/* Initialize the SPI */
SPI_init();

/* Setup the default SPI Parameters */
SPI_Params_init(&params);
params.mode = SPI_MASTER;
params.u.masterParams.bitRate = SPI_BITRATE;
params.u.masterParams.numSlaves = 0;
params.frameFormat = SPI_POL0_PHA0;
params.u.masterParams.slaveProf[0].chipSelect = 1;
params.u.masterParams.slaveProf[0].ramBufLen = MIBSPI_RAM_MAX_ELEM/2; //MIBSPI_RAM_MAX_ELEM;
params.u.slaveParams.dmaCfg.txDmaChanNum = 1U;
params.u.slaveParams.dmaCfg.rxDmaChanNum = 0U;
params.pinMode = SPI_PINMODE_4PIN_CS;
params.shiftFormat = SPI_MSB_FIRST;
params.dmaEnable = 1;
params.dmaHandle = dmaHandle;
spiHandle = SPI_open(1, &params);
if (spiHandle == NULL)
{
System_printf("Error: Unable to open the SPI Instance\n");
return(0);
}
#else

SPI_open() is failing. When I step through it with the debugger, it throws an exception on this line in mibspi_dma:

/* Validate hardware configuration */
DebugP_assert(ptrHwCfg != NULL);

Thanks for your help!

-Dave