Hi everybody,
I am having difficult in interruption use when I mix two examples of CSL (CSL_I2S_INTCExample_Out and CSL_MMCSD_SdCardFSExample_Out).
My final application will acquire sound by codec and record its values on a SD card. To improve performance of ATA_write function the buffer that stores codec values is big, so, during a record on SD some new samples of sound could be lost. To ensure that no sample is lost I will fill the buffer using interrupt.
I did the follow:
- Create a file called i2s_Int.c (attached) using the file supply at example CSL_I2S_INTCExample_Out
- Declared the prototype extern Int16 i2s_Int() on the file where is my main function.
- Before the function ATA_write I called i2s_Int() according follow.
IRQ_globalDisable();
i2s_Int();
/* Write data to the file */
ata_error = ATA_write(pAtaFile, gMmcWriteBuf, CSL_MMCSD_ATA_BUF_SIZE);
What happen is that the interrupt void i2s_rxIsr() is calling correctly but after about 20 seconds the console returns:
ATA_write Failed
MMCSD-ATAFS DMA MODE TEST FAILED!!
MMCSD-ATAFS TESTS FAILED!!
After more 20 seconds the console returns:
ATA_write Failed
MMCSD-ATAFS DMA MODE TEST FAILED!!
MMCSD-ATAFS TESTS FAILED!!
When I put breakpoints on i2s_rxIsr (line 29) and on csl_mmcsd (line 4591) the program stops only on the first. When I leave only the second breakpoint active the program stops on line 4591 where MMCST0 is always zero, so, the program still there until the timeout generate the error.
Please, could anybody help me understand what I am doing wrong?
I am using the new CSL (2.10) with C5515 ezDsp and CCS 4.1.3.
Regards,
Andrea