06-14-2022 02:42 PM
Hello,
I am trying to map my Activity change interrupt to a physical interrupt to trigger the host MCU. (nrf52805)
I can succesfully read the interrupt with bma400_get_interrupt_status.
My code for setting pin as output for the interrupt is as below:
06-15-2022 04:19 AM
Hi baukespoelstra,
You could add this line of code and check if INT1 pin output interrupt signal.
accel_settin[0].param.act_ch.int_chan = BMA400_INT_CHANNEL_1;
06-15-2022 09:58 AM
Hi,
This was already in the code i attached.
accel_settin[0].type = BMA400_ACTIVITY_CHANGE_INT; accel_settin[1].type = BMA400_ACCEL; rslt = bma400_get_sensor_conf(accel_settin, 2, &bma); bma400_check_rslt("bma400_get_sensor_conf", rslt); accel_settin[0].param.act_ch.int_chan = BMA400_INT_CHANNEL_1; accel_settin[0].param.act_ch.axes_sel = BMA400_AXIS_XYZ_EN; accel_settin[0].param.act_ch.act_ch_ntps = BMA400_ACT_CH_SAMPLE_CNT_64; accel_settin[0].param.act_ch.data_source = BMA400_DATA_SRC_ACC_FILT1; accel_settin[0].param.act_ch.act_ch_thres = 10; accel_settin[1].param.accel.odr = BMA400_ODR_100HZ; accel_settin[1].param.accel.range = BMA400_RANGE_2G; accel_settin[1].param.accel.data_src=BMA400_DATA_SRC_ACCEL_FILT_1; /* Set the desired configurations to the sensor */ rslt = bma400_set_sensor_conf(accel_settin, 2, &bma); bma400_check_rslt("bma400_set_sensor_conf", rslt);
06-15-2022 10:48 AM
Update:
It turns out the INT pins are swapped on the MIKROE-3149 BMA400 evkit.
If I set INT1, I can measure at INT2. Checked with the datasheet, the pins are changed.
06-16-2022 07:28 AM
Hi baukespoelstra,
You could refer the example code in your other topic: https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/Inactivity-detection-with-BMA400/td-p/58...