I am using the MCUXpresso SDK 2.3 with the K64F. I am trying to setup the SPI in slave mode using DMA.
I am having a problems where the callback is not running after the master finish sending data.
The callback I am referring to is the "dspi_slave_edma_transfer_callback_t".
When the master finishes sending data the "Chip Select" (CS) signal goes high, but the callback never runs. The callback should run after the master release the chip select line because the transfer is complete. Isn't that correct?
Does the callback only run after the DMA buffer is full? The DMA buffer may never be full because the master can send variable data. I want to read the after the master has release the chip select line. How do I get the callback to run after the master has released the chip select line?
Is it possible to make the CS also trigger an interrupt without affect the SPI driver? So when ever the rising edge occurs I know the master has finished the transfer
After reading the user guide I am thinking that I could configure the CS pin in interrupt mode and as an input. When the PORTA interrupt handler runs I can then check the state of the CS pin by reading the register?
Is this correct?
I configured the CS pin at the register level not using the driver to trigger an interrupt. This allowed me to check when the CS pin went high by the master and thus I know when the master has finished sending data event if the DMA complete had not finished.