esp32-MPU-driver icon indicating copy to clipboard operation
esp32-MPU-driver copied to clipboard

Example mpu_real interrupt isn't working

Open williamrobotma opened this issue 7 years ago • 4 comments

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.

williamrobotma avatar Jun 15 '18 19:06 williamrobotma

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. :)

natanaeljr avatar Jun 16 '18 23:06 natanaeljr

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

williamrobotma avatar Jun 18 '18 15:06 williamrobotma

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!

sunhaoqin avatar Jan 24 '19 02:01 sunhaoqin

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

danylook avatar Jun 06 '19 13:06 danylook