Hi NXP Support,
I am currently running the evkmimxrt1060_sai_peripheral example project with version 2.8.6 of the SDK for the evkmimxrt1060.
The project runs, however I notice that I am often getting overflow errors in the TX and RX FIFO buffers.
The default code for the example handles FIFO over flow errors by running the SAI_UserTxIRQHandler() and SAI_UserRxIRQHandler() functions.
By default these functions simply clear the error flag, and restart the peripheral.
I modified the code so that every time either of these functions run a variable is incremented. Running the project with this modification I see FIFO overflow errors regularly.
I have seen as many as 9 FIFO overflow errors in one short recording.
Do you know why these errors are occurring? And how they can be prevented?
My Modified functions are below.
void SAI_UserTxIRQHandler(void)
{
/* Clear the FEF flag */
overflowCount++;
SAI_TxClearStatusFlags(DEMO_SAI_PERIPHERAL, kSAI_FIFOErrorFlag);
SAI_TxSoftwareReset(DEMO_SAI_PERIPHERAL, kSAI_ResetTypeFIFO);
/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
exception return operation might vector to incorrect interrupt */
#if defined __CORTEX_M && (__CORTEX_M == 4U)
__DSB();
#endif
}
void SAI_UserRxIRQHandler(void)
{
overflowCount++;
SAI_RxClearStatusFlags(DEMO_SAI_PERIPHERAL, kSAI_FIFOErrorFlag);
SAI_RxSoftwareReset(DEMO_SAI_PERIPHERAL, kSAI_ResetTypeFIFO);
/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F Store immediate overlapping
exception return operation might vector to incorrect interrupt */
#if defined __CORTEX_M && (__CORTEX_M == 4U)
__DSB();
#endif
}
Hi peterbouvy,
Do you run the evkmimxrt1060_sai_peripheral example directly? Whether you still have the FIFO overflow errors?
I run the SDK project directly, just add the overflowCount++; in the RX and Tx handler, and debug it, I didn't get the overflowcounter data increase.
When you run your code, which the following item you have select?
1. Record and playback at same time
2. Playback sine wave
3. Record to SDcard, after record playback it
I have tested 1-3, no FIFO overflow issues during my debug time.
So, please give me more details to reproduce the issues.
Best Regards,
Kerry
Hi Kerry,
Yes I run the example from the SDK directly, with the only modification being the counting of the overflow errors (in the manner you describe).
I do not see overflow errors every time, only occasionally.
Errors occur most frequently when running option 3. (Record then Playback).
Thanks,
Peter