I could use some help in telling my hardware guy what to do here.
From github/mangOH/demos/shakeNWake: "A simple demonstration app that uses the bmi160 accelerometer on the mangOH Red to wakeup the WP module from ultra-low power mode. In order to use this application, a resistor mod is required to the mangOH Red so that the bmi160 interrupt lines are connected to the “wakeable” WP GPIOs. " And found in source code for the same: "
if (le_bootReason_WasTimer())
{
LE_INFO(“Boot reason was timer”);
}
else if (le_bootReason_WasGpio(36))
{
LE_INFO(“Boot reason was GPIO 36”);
}
As a software guy, I can guess that there’s a pin on a chip called bmi160, and it needs to be tied through a resistor to something the software knows as GPIO(36).
Has anyone implemented this? Are there clues to deciphering this that I can pass along to my hardware guy?
If you see the schematics for the Red, the accelerometer interrupt has resistors R732 and R733 which are DNI (Do no install). So all you have to do is lookup the placement of those two resistors in the placement diagram and mod a 0 ohm resistor there.
Thanks @ktanikel for your super prompt and clear explanation!
One final question: Is it necessary or even advised to try to lift R736 (or R738, it’s hard to read) that connects bmi160 pin 9 to the GPIO expander input SENSOR_INT_2, thus bypassing the GPIO expander?
And if I should lift that resistor, is it advisable to tie that input to the sx1509 high or low, or just let it float?
I don’t know if I’m the right person to answer that question since like you I’m also a software guy. However, I don’t think it’s necessary or required to lift any resistors. We got the shakeNWake application to work simply by adding those two 0 ohm resistors.
Edit: Also, we noticed that in some of the more recent mangOH Reds that we ordered had those resistors already in place so we didn’t have to make any hardware modifications at all.
You are right. I believe it is not necessary to remove R736/R737 as the GPIO EXP I/O pins are input by default.
However it is good practice to remove those when you add the DNI ones (R733/R732).