Other Parts Discussed in Thread: SYSBIOS
Tool/software: TI-RTOS
Hi,
I am using PROCESSOR-SDK-RTOS-AM57X - pdk_am57xx_1_0_7.
Here, over McSPI bus 4, I have two different devices at CS0 and CS1 respectively.
I am not able to configure and use the devices at the same time. Right now I am opening individual channel, doing the transaction and closing it.
Since it is McSPI, is it possible to configure and open the Channels and leave them open for further use?
Also, other strange observation is when I am having transaction over CS0, CS1 also seems to be going down and vice-versa.
Here is the snippet of the configuration :
SPI_v1_HWAttrs spi_cfg;
SPI_Params spiParams;
if (spi_bus_handle_st[bus_no][chip_select].spi_handle != NULL)
{
return;
}
SPI_socGetInitCfg(bus_no, &spi_cfg);
spi_cfg.chNum = chip_select; /* CS0 & CS1 respectively */
spi_cfg.chMode = MCSPI_SINGLE_CH;
spi_cfg.enableIntr = true;
spi_cfg.initDelay = MCSPI_INITDLY_0;
spi_cfg.chnCfg[spi_cfg.chNum].dataLineCommMode = MCSPI_DATA_LINE_COMM_MODE_1;
spi_cfg.chnCfg[spi_cfg.chNum].tcs = MCSPI_CH0CONF_TCS0_ZEROCYCLEDLY;
spi_cfg.chnCfg[spi_cfg.chNum].csPolarity = MCSPI_CS_POL_LOW;
spi_cfg.chnCfg[spi_cfg.chNum].trMode = MCSPI_TX_RX_MODE;
spi_cfg.rxTrigLvl = MCSPI_RX_TX_FIFO_SIZE;
spi_cfg.txTrigLvl = MCSPI_RX_TX_FIFO_SIZE;
spi_cfg.edmaHandle = NULL;
spi_cfg.dmaMode = false;
SPI_socSetInitCfg(bus_no, &spi_cfg);
spiParams = spi_bus_params_st[bus_no].spi_user_params[chip_select];
spi_bus_handle_st[bus_no][chip_select].spi_handle = SPI_open(bus_no, &spiParams);
Thanks & Regards,
Raksha