evkmimxrt1060_sai_peripheral example project FIFO overflow errors

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

evkmimxrt1060_sai_peripheral example project FIFO overflow errors

1,641 Views
peterbouvy
Contributor I

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
}

0 Kudos
Reply
7 Replies

1,627 Views
kerryzhou
NXP TechSupport
NXP TechSupport

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

 

 

 

 

0 Kudos
Reply

1,609 Views
peterbouvy
Contributor I

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

0 Kudos
Reply

1,603 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi peterbouvy,

   I will do more testing, and printf the error counter.

    Any updated information, will let you know.

 

Best Regards,

Kerry

0 Kudos
Reply

1,518 Views
eye_cue
Contributor I

Hi,

I( am looking at the same example and getting the same issue. With the RX FIFO only i think but many more times (up to 1000). Did you get any further with this?

Thanks!

0 Kudos
Reply

1,483 Views
avbot
Contributor III

I have the same issue. Hope NXP can comment.

Datasheet mentions bus clock needs to be fast enough to service the FIFO's - but its set to 75M (max) on my HW so not the issue.

0 Kudos
Reply

1,464 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi avbot,

  Do you also use the SDK direclty code? Which SDK version?

  Also no modification and it enter the error overflow?

 

Best Regards,

Kerry

0 Kudos
Reply

1,456 Views
avbot
Contributor III

Our code is from the reference examples. SDK 2.9.1

0 Kudos
Reply