cancel
Showing results for 
Search instead for 
Did you mean: 

iis3dwb唤醒中断无法实现

THSW
Associate II
初始化寄存器的参数配置
SPI_write_reg(FIFO_CTRL4, 0x00);//fifo——mode
// SPI_write_reg(INTERRUPTS_EN, 0x00);//inter
SPI_write_reg(CTRL3_C, 0x05); //high_act no_reset
SPI_write_reg(CTRL1_XL, 0xA4); //full_scale
SPI_write_reg(CTRL3_C, 0x04); //high_act no_reset
SPI_write_reg(CTRL4_C, 0x08|0x04); //drdy_1
SPI_write_reg(CTRL5_C, 0x20); //xunhuan20
SPI_write_reg(CTRL7_C, 0x02);
SPI_write_reg(FIFO_CTRL2, 0x00); //81
SPI_write_reg(FIFO_CTRL3, 0x0a); // fifo_rate
SPI_write_reg(FIFO_CTRL4, 0x06);  //
SPI_write_reg(WAKE_UP_DUR, 0x08);//0 du du thsw  sdu sdu sdu sdu
SPI_write_reg(WAKE_UP_THS, 0x02);//(lsb*32/256)0 wu 00 0000
SPI_write_reg(SLOPE_EN, 0x20);//suocun
SPI_write_reg(INTERRUPTS_EN, 0x80);//inter
// SPI_write_reg(MD1_CFG, 0x20);//
SPI_write_reg(MD2_CFG, 0x80);//
高电平激活,根据文档例程设置,但是无法实现唤醒中断
4 REPLIES 4
Federica Bossi
ST Employee

Hi @THSW ,

Welcome to ST Community!

Have a look at our driver example on Github, I think it could help you.

If this solves your problem, please mark my answer as "Best Answer" by clicking on the "Accept as Solution" button, this can be helpful for Community users to find this solution faster :)

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
THSW
Associate II

我曾尝试过,fifo中断(int1 int2)可以,但是唤醒(int1 int2)仍然不行,还是说fifo(int1)和唤醒中断(int2)一起用有冲突

please help,thanks

 

我配置过WAKE_UP_DUR,WAKE_UP_DUR,SLOPE_EN,INTERRUPTS_EN,MD2_CFG,但是我从这些寄存器中读出来的值都是0,这是传感器的问题吗,其他的寄存器的值都是正常的