Part Number: TMS320C6745
Using pdk 1_0_10.
The SPI driver has some huge limitation.
If used without DMA and in SPI_MODE_BLOCKING modality; the driver disable all the interrupts during the transaction.
/* Check if a transfer is in progress */
key = SPI_osalHardwareIntDisable();
if (object->transaction) {
SPI_osalHardwareIntRestore(key);
/* Transfer is in progress */
transaction->status=SPI_TRANSFER_CANCELED;
ret = (bool)false;
}
else {
/* Save the pointer to the transaction */
object->transaction = transaction;
/* Acquire the lock for this particular SPI handle */
SPI_osalPendLock(object->mutex, SemaphoreP_WAIT_FOREVER);
SPI_primeTransfer_v0(handle, transaction);
SPI_osalHardwareIntRestore(key);
If the transaction is long (for example reading 50K on an external SPI memory), other driver based on interrupt fails (for example an uart receiving a packet bigger than the fifo).
It get worse if i use other configurations (DMA or SPI_MODE_CALLBACK), in these cases the MCASP (implemented as in the sample of the pdk) totally stops the activity.
I think there is something related to interrupt configuration, but I can't see any releation beetween SPI in mode callback (or DMA) and mcASP... it simply it doesn't work
All the configuration of interrupt, events, edma are defaulted by the driver.
In the configuration there is:
ECM.eventGroupHwiNum[0] = 7;
ECM.eventGroupHwiNum[1] = 8;
ECM.eventGroupHwiNum[2] = 9;
ECM.eventGroupHwiNum[3] = 10;