MPU6050数据异常,dmp初始化失败

img

使用的是正点原子官方例程,当不使用dmp直接读取数据并显示时如照片所示,当使用dmp_init函数时整个单片机会死机,无法复位.
dmp_get _data函数返回值本该是0我是1,跳转到定义发现是dmp_read_fifo出现问题

int main(void)
{
delay_init();
LED_Init();
uart_init(115200);
OLED_Init();
MPU_Init();
OLED_ColorTurn(0);
OLED_DisplayTurn(0);
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
// mpu_dmp_init();
// a=mpu_dmp_init();
while(1)
{

        temp=MPU_Get_Temperature();    //µÃµ½Î¶ÈÖµ
        MPU_Get_Accelerometer(&aacx,&aacy,&aacz);    
        MPU_Get_Gyroscope(&gyrox,&gyroy,&gyroz);    
        OLED_ShowString(30,7,"MPU6050 Test",8,1);
        OLED_ShowString(5,14,"X:      X:     ",16,1);
        OLED_ShowString(5,32,"Y:      Y:     ",16,1);
        OLED_ShowString(5,50,"Z:      Z:     ",16,1);
        OLED_ShowNum(20,14,aacx,5,16,1);
        OLED_ShowNum(20,32,aacy,5,16,1);
        OLED_ShowNum(20,50,aacz,5,16,1);
        OLED_ShowNum(80,14,gyrox,5,16,1);
        OLED_ShowNum(80,32,gyroy,5,16,1);
        OLED_ShowNum(80,50,gyroz,5,16,1);
        OLED_Refresh();
        delay_ms(500);
    
}

}
我的主函数如上

模块需水平放置
https://m.elecfans.com/article/1753148.html
https://blog.csdn.net/qq_49542794/article/details/122883795
https://blog.csdn.net/weixin_42108484/article/details/123235309