plusk01 / airdamon_f3

Be the Matt Damon of the skies
2 stars 1 forks source link

MPU6500 SPI DMA/ISR - if CLK is too slow, gyro data is corrupted #4

Open plusk01 opened 6 years ago

plusk01 commented 6 years ago

When I had the SPI CLK set to 18MHz, the gyro y, z data (so the last 4 bytes of the buff_rx_) seem to be corrupted, likely due to a race condition of being interrupted before we had a chance to read all the data...or something.

I changed the SPI CLK to 36MHz and it works fine, but that seems to indicate a lack of robustness in the EXTI ISR code in the MPU6500 object.