Hang in i2s element

felixcollins
Posts: 125
Joined: Fri May 24, 2019 2:02 am

Hang in i2s element

Postby felixcollins » Tue Apr 23, 2024 4:34 am

I have a custom board with adf pipeline: fat_fs -> mp3 -> i2s

ADF: 2.6
IDF: 4.4.6

It all works fine but after the pipeline has sat idle for some long time, like about an hour or so, I get the following error logged from the I2S driver.

Code: Select all

E (370583) I2S: dma error, interrupt status: 0x00005000
Then the next time I play a track, by relinking and setting the pipeline running, I get a hang calling

Code: Select all

audio_element_setinfo()
on the I2S element.

Does anyone have any idea what might cause this and how to work around it or fix it?

Thanks,
Felix

liaifat85
Posts: 200
Joined: Wed Dec 06, 2023 2:46 pm

Re: Hang in i2s element

Postby liaifat85 » Tue Apr 23, 2024 6:57 am

Perform checks on your custom board to ensure there are no hardware issues such as signal integrity problems, clock mismatches, or power supply fluctuations affecting the I2S peripheral.

felixcollins
Posts: 125
Joined: Fri May 24, 2019 2:02 am

Re: Hang in i2s element

Postby felixcollins » Tue Apr 23, 2024 11:01 pm

Hi @liaifat85, Thanks for the constructive suggestions.

The I2S peripheral is being used solely as an output. It supplies Data, BCLK and LRCLK to a Max98357 amplifier. Signals are routed less than 10mm from the Wroom module to the amp. I can't see how signal integrity would cause an error in the dma anyway.

Power stability could conceivably be an issue as I'm running at 3V. In this case I'd expect to see the problem when the music plays at volume or the wifi is on with the music as that is the maximum current draw scenario. This does not occur. I only see the error messag e in the log some hour or hours after being idle. It is very strange.

There seems to be an accompanying bug in the I2S driver whereby it hangs the next time it is used rather than recovering from the DMA error after it is reported. I very much doubt there will be a fix as it is hard to reproduce. I've made a horrible work around using the task watchdogs to reset my device when it occurs instead of hanging.

Regards,
Felix

Who is online

Users browsing this forum: No registered users and 15 guests