1
votes

I'm making a quadcopter with SparkFun ESP32 Thing module and using MPU9255 Waveshare IMU.

It looks like when I'm reading PWM signals from RC receiver with interrupts (6 interrupts for 6 chanels) I2C fails after some time. I am using interrupt over MPU9250 either (but not the DMP module, just sync for accel and gyro data). I am not sure if the connection fails, MPU9250 or ESP32. It looks like this: After 10-50sec, MPU9250 fails, and MPUs interrupt works at 8kHz (instead of 1,6kHz), and values wont change. No idea what is happening ;/ Anyone? Without interrupts, I2C works fine...

1
Could this be a baud rate issue? Have you tried with different rates? - Rakshith G B
You mean I2C speed? Ill try slower rates (its now 400kHz, maximum of mpu). But even if there is a problem with rate I would like to avoid changing it (due to slower response)... - Kamil Słotwiński
Still the same issue? - Rakshith G B
It seems stable now (200kHz rate). Not sure if I can go higher? - Kamil Słotwiński
Try to find a right rate for your application, usually solves the problem. - Rakshith G B

1 Answers

0
votes

Your ISRs must save and restore ALL registers and flags that are used. If you are calling any external functions from your ISRs, there could be reentrancy issues. Without a look at the code, that's the best I can offer.