最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

stm32 - MPU 6500 WAKE-ON-MOTION INTERRUPT not working - Stack Overflow

programmeradmin0浏览0评论

Alright so I'm trying to make the MPU 6500 work with interrupt on motion. My issue is that it worked yesterday and today it stopped working. And I'm proper lost as to why. Currently it constantly triggers my interrupt, even if I set the threshold to the highest value (0xFF).

I've setup motion control according to the register map / product specification as supplied by the company that build the sensor.

My relevant code:

#define MPU6500_ADDR 0x68

void MPU6500_Init() {
    // Make Sure Accel is running:
    I2C1_WriteByte(MPU6500_ADDR, 0x6B, 0x20);
    I2C1_WriteByte(MPU6500_ADDR, 0x6C, 0x07);
    I2C1_WriteByte(MPU6500_ADDR, 0x1D, 0x01);

    I2C1_WriteByte(MPU6500_ADDR, 0x38, 0x40); // Enable Motion Interrupt:

    I2C1_WriteByte(MPU6500_ADDR, 0x69, 0xC0); // Enable Accel Hardware Intelligence:

    // Set Motion Threshold: 0-255 mg(0 1020)
    I2C1_WriteByte(MPU6500_ADDR, 0x1F, 0x20);
    
    // Set wake-up frequency = 0.24Hz ~ 500Hz first 4 bits
    I2C1_WriteByte(MPU6500_ADDR, 0x1E, 0x03);
    // Enable Cycle Mode (Accel Low Power Mode):
    I2C1_WriteByte(MPU6500_ADDR, 0x6B, 0x20);
}

Does anyone have experience with this specific sensor and or can point me into the right direction, becasue I'm lost?

发布评论

评论列表(0)

  1. 暂无评论