Replies: 1 comment
-
So this is a violation of fundamental constraints due to an inaccurate understanding of how the ISRs work. You can't do anything that depends on other interrupts or non-deterministic timing (such as any "normal" I/O based things like printing) inside another higher priority interrupt (such as the audio one), so printing from the audio loop won't work, it'll hang the ISR, print nothing, and nothing else will happen either. That's probably your issue here. What you can do is set a flag inside the audio loop, and then check that flag in the main() while() loop, and if the flag is set, unset it and print that it was triggered. BIDI doesn't require data on DIN, but it does require BCK and LRCK, as noted. It makes no use of SCK so that's useless and probably counterproductive to run together. If no data on DIN, simply ground the pin so you read zeroes. Make sure you've pulled the latest code as someone recently updated it to fix a bug there. BIDI slave is confirmed working by others now, so if you're having trouble with it, check your code first. |
Beta Was this translation helpful? Give feedback.
-
Hi!
I have a Pico connected to an ADAU1701 DSP processor and I'm trying to get the I2S output working from the RP2040 to my DSP chip in with the Pico as a slave. I have started my process by trying the i2s_bidi_slave program. Should the bidi slave work without the DIN pin as just an output? I have replaced the process_audio function with the following to test the output only as I have no DIN pin connected:
I fill the sine_wave_table as follows:
I am not getting output with this configuration. Am I understanding the functionality of the bidi_slave program wrong? Is it waiting for data from the DIN pin before sending out anything or should it work just fine without it? I have tried with SCK enabled and disabled but neither is working. Since I am not getting the print "process audio triggered.", I guess there is something wrong in the code?
Best regards,
Miro
Beta Was this translation helpful? Give feedback.
All reactions