Post Go back to editing

How to get a frame sync interrupt?

Thread Summary

The user needed to configure interrupts for multiple SPORTs sharing a common bit clock and frame sync on an ADSP-SC573. The solution involved routing the same PCG output that drives all SPORT FS inputs to the DAI MISC0 interrupt, instead of using a SPORT FS output. This approach allowed the high-priority DAI interrupt to be triggered by the frame sync edge, resolving the issue.
AI Generated Content
Category: Software
Product Number: ADSP-SC573
Software Version: CCES 2.9.2

I have several SPORTs which are sharing a common bit clock and frame sync. I need to do I/O at the sample rate in an interrupt handler. Given that I have three input streams and two output streams, and it takes two interrupts per stereo sample, that's 10 interrupts per sample. Given the staggering interrupt overhead on a SHARC, even at 16KHz, that takes pretty much all the CPU time. So my idea is to use a single interrupt triggered by the frame sync via the DAI, in which I do two reads from each Rx register and two writes to each Tx register. I can use the ADI library to configure the SPORTs, and I'm writing registers directly to route the clocks and audio, but I'm having trouble configuring the interrupt. I don't see a DAI service or driver in the library for this part, so what do I need to do to get an interrupt on a particular edge of the common frame sync? Are there lower-level functions that I can use?

What I've tried so far is to write registers to route one of the SPORT's frame sync to the DAI misc interrupt 0, to assign that to the high-priority DAI interrupt to the SEC, and use adi_int_InstallHandler() to register my handler to interrupt 40, which is the high-priority DAI interrupt on this part. The SEC0_SCTL40 register shows CTG, SEN, and IEN equal to 1, but the SEC0_SSTAT40 register is zero. The DAI0 registers look reasonable except that the DAI0_IRPT_H register is always EEEEEEEE, which smells like it might be unreadable. No interrupts are happening, so I must be missing something. I'd rather do this through library calls instead of poking registers.