Hello,
I have a K27 based board, and i am attempting to use interrupt based SPI transfers. I have got chip select set for PCS0, and the controller is the master.
cmdData.isPcsContinuous = true;
cmdData.whichCtar = kDSPI_MasterCtar0;
cmdData.whichPcs = MASTER_PCS;
cmdData.isEndOfQueue = false;
cmdData.clearTransferCount = false;
DSPI_ClearStatusFlags(SPI, kDSPI_AllStatusFlag);
DSPI_EnableInterrupts(SPI, kDSPI_RxFifoDrainRequestInterruptEnable|kDSPI_TxFifoFillRequestInterruptEnable);
DSPI_StartTransfer(SPI);
Chip select is not being pulled down when i attempt to use interrupt based transfers. In blocking mode, transactions are good - chip select is pulled down, Serial In and Serial Out can see data, and slave responds as expected. However when i attempt interrupt mode, Chip Select does assert at all - it just stays high. I followed the K28 example - would appreciate any pointers on what i am missing.
Thanks
Solved! Go to Solution.
Hello Santosh
Your problem could be caused by a wrong configuration of the module.
PCSIS field in MCR register determinates the inactive state of chip select signal.
In SDK example the follow instruction:
masterConfig.pcsActiveHighOrLow = kDSPI_PcsActiveLow
Ensures PCSIS equals 1 in PCS0 bit field in order to pull down chip select signal when the transmission starts.
Next pictures were taking when PCSIS[PCS0] value was zero and one respectively:
Is your K27 presenting a similar behavior of the first picture?
Let me know your results.
Regards.
Hello Santosh
Your problem could be caused by a wrong configuration of the module.
PCSIS field in MCR register determinates the inactive state of chip select signal.
In SDK example the follow instruction:
masterConfig.pcsActiveHighOrLow = kDSPI_PcsActiveLow
Ensures PCSIS equals 1 in PCS0 bit field in order to pull down chip select signal when the transmission starts.
Next pictures were taking when PCSIS[PCS0] value was zero and one respectively:
Is your K27 presenting a similar behavior of the first picture?
Let me know your results.
Regards.