I2S.h Transmission on core0, ADCInput on Core1 not working as expected #2749
Unanswered
Geekachuqt
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm facing an issue where sampling the ADCs and transmissing to I2S on different cores is not working as expected.
I have set up a program which uses
while(I2S.availableForWrite(){}
to write to an I2S codec. If I includeADCInput.read()
calls inside this loop, the program works as expected, and pushes audio through the ADC to the I2S codec.However, if I instead add a boolean flag to core0, which triggers a case on core1 to remove the flag and execute
ADCInput.read(),
the audio gets severely distorted, as if the two cores not executing in sync anymore.The main reason this confuses me is that by adding
Serial.println(millis())
at the start of each of the two loops, I can see that they are executing in tandem, but the result isn't as I'd expect.Is there something more that needs to be done in order to offload processing in this manner from processor one to processor two?
Beta Was this translation helpful? Give feedback.
All reactions