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

Example mpu_real interrupt isn't working #6

Open
williamrobotma opened this issue Jun 15, 2018 · 4 comments
Open

Example mpu_real interrupt isn't working #6

williamrobotma opened this issue Jun 15, 2018 · 4 comments

Comments

@williamrobotma
Copy link

I ran your example mpu_real, but it doesn't seem to be working;
particularly, it's getting stuck at the line
uint32_t notificationValue = ulTaskNotifyTake(pdTRUE, portMAX_DELAY);
I put some logs in and it looks like mpuISR isn't running.

I was wondering if there was a bug in the code or is it just something wrong on my end? I set GPIO 17 as the interrupt pin, if that helps and the interrupt pin on the MPU seems to output a square wave on an oscilloscope.

@natanaeljr
Copy link
Owner

natanaeljr commented Jun 16, 2018

I checked and tested the example code again, it still works. So I guess there might be something wrong with your GPIO 17 in ESP32. Maybe you could try another GPIO, just change the number here.

If that still does not work and you have changed something in the code, please post the changes here. :)

@williamrobotma
Copy link
Author

Changing the pins does not seem to work. Perhaps it's a configuration error.

@sunhaoqin
Copy link

The frequency is 250hz,i think its too high.because it will occur a interrupt every 4ms.but from line211 to line236 ,it takes about 10ms.this will cause notificationValue>1.maybe you can change the frequency lower than 20hz.it works!

@danylook
Copy link

danylook commented Jun 6, 2019

i had the same problem. i change the mpu and works like a charm

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

4 participants