有没有使用过LIS3DSH的大虾,我在配置完这个芯片后,检测不到中断输出,配置代码如下:
LIS3DSH_Write_Byte(CTRL_REG1, (u8)0x01);//enable SM1, SM1 interrupt routed to INT1
LIS3DSH_Write_Byte(CTRL_REG3, (u8)0x48);//Interrupt signal active HIGH, Interrupt locked, INT1 signal enabled
LIS3DSH_Write_Byte(CTRL_REG4, (u8)0x57);//X, Y, Z enabled, ODR = 50 Hz.
LIS3DSH_Write_Byte(CTRL_REG5, (u8)0x00);//filter bandwidth 800 Hz, +/-2g, Self-test Disabled
LIS3DSH_Write_Byte(TIM3_1, (u8)20);//Timer3 1000ms
LIS3DSH_Write_Byte(ST1_0, TI3);//SM1 state 1
LIS3DSH_Write_Byte(ST1_1, CONT);//SM1 state 2
能否帮忙找出问题所在?或是提供你们已验证过的程序也行,先谢谢了! |