Serial port interrupt fires too early after porting VDSP project to CCES

Hi all,

I ported a project from VDSP to CCES.

The only things that were modified were

- custom LDF with multiple heaps

- installing IRQ handlers

I use SPORT1 for receiving 8 channels in TMD8 mode.

The internally generated FS signal is routed to MISC_A. Before starting SPORTs and enabling IRQs, I wait for a falling FS edge.

Further, I use two ping pong buffers with a variable indicating which one is to be processed (the familiar int_cntr variable).

It is set to 1 initially.

Now, when the first IRQ is triggered, the first ping pong buffer (idx 0) should have been filled with the first N samples.

int_cntr is switched to 0, then and processing starts.

With VDSP, this works flawlessly.

In my CCES project, however, there are no input samples received when the first IRQ has been triggered.

Only on the second IRQ, the first input buffer has been filled.

When I set int_cntr to 0, initially, it works but that can't be right.

Do I miss anything?

The code is

#if CCES

  adi_int_InstallHandler(ADI_CID_SPI1, isr_SPORT, 0, true);

#else

  interrupt(SIG_SP1, isr_SPORT)

#endif

Best regards,

Rainer