Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zero value buffer occasionally appears in I2S reading #26

Open
tachen-cs opened this issue Jul 16, 2020 · 0 comments
Open

zero value buffer occasionally appears in I2S reading #26

tachen-cs opened this issue Jul 16, 2020 · 0 comments

Comments

@tachen-cs
Copy link

Hi,

When I modify the arduinosound library for my own operation, I found a wired issue.

I read the AmplitudeAnalyzer::update(const void* buffer, size_t size) function play the key role for further operation with I2S reading data. And the easiest way is to modify the rms functions: arm_rms_q31((q31_t*)buffer, size / 4, (q31_t*)&analysis)

But when I simply change the above sentence to

q31_t* tmp = (q31_t*)buffer;
_analysis = *tmp;

There appears zero value buffer occasionally (sometimes correct, but sometimes only shows zeros through serial print. And it will turn to zero and then turn to correct values).

I am not sure what is the problem cause I didn't change other logic in ArudioSound. Is there other magic in the rms functions?

@tachen-cs tachen-cs changed the title in I2S reading zero value buffer occasionally appears in I2S reading Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant