Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    BHI 160无法产生Host Interrupt信号

    BHI 160无法产生Host Interrupt信号

    zhouy
    Member

    当使用ACTIVITY_RECOGNITION功能时,如果不读取FIFO,Host Interrupt信号一直不会产生,需要一直读取FIFO,INT引脚才会发出中断信号。但是这样就无法通过INT引脚唤醒MCU,另外,ORIENTATION功能也是这种情况,无法在读FIFO之前发出Host Interrupt信号。

    以下是配置代码:

    if (bhy_install_sensor_callback(VS_TYPE_ACTIVITY_RECOGNITION,  VS_WAKEUP,  sensors_callback_basic))
    {
            return -GERRNO_INTER_M_ERR;
    }

    if (bhy_enable_virtual_sensor(VS_TYPE_ACTIVITY_RECOGNITION,  VS_WAKEUP,  1,  0,  VS_FLUSH_NONE,  0,  0))
    {
            return -GERRNO_INTER_M_ERR;
    }

    8 REPLIES 8

    BSTRobin
    Community Moderator
    Community Moderator

    Hello zhouy,

    中断信号的实际波形,方便用逻辑分析仪抓一下吗?

    另外,你的MCU端配置的中断触发方式是什么样的?

    您好!

    固件为Bosch_PCB_7183_di03_BMI160_BMM150-7183_di03.2.1.11696_170103.h

    MCU外部中断采用下降沿触发。

    下图为上电后INT的波形,调用bhy_enable_virtual_sensor函数后INT引脚电平一直没有变化,维持在高电平。

    int.png

    您好!

             我又测试了读FIFO和不读FIFO两种情况下INT引脚波形的对比图,不读FIFO时,INT引脚一直保持高电平;每10ms读一次FIFO时,INT大部分时间为低电平,当检测到运动后,会出现一个短暂的高电平。

    int1.png

    BSTRobin
    Community Moderator
    Community Moderator

    Hello zhouy,

    加载完固件后,中断引脚默认是低电平。当检测到VS_TYPE_ACTIVITY_RECOGNITION等事件时,中断信号会拉高,所以host MCU端的中断触发方式要设置为上升沿。当host MCU接收到中断信号时,需要读取FIFO数据以清空FIFO,这样中断信号才会被拉低。

    BHI160 host interrupt behavior.png

    BHI160 host interrupt behavior-2.png

    BHI160 waveform.png

     

     

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist