Accelerometer ============= Bosch **BMA400** on I2C(0) (``scl=12``, ``sda=21``, 400 kHz, address ``0x14`` - SDO to GND). It is powered from the always-on 3.3 V rail, so it keeps running in deep sleep and its **INT1** line (GPIO4) ends the sleep on motion. The GPS Pro build uses the chip's **wakeup interrupt engine** rather than sampling: :meth:`~gpspro.firmware_core.BMA400.configure_wakeup` puts the part in low-power mode with a one-time reference capture, all three axes enabled, one sample, threshold ``934`` (default 8 LSB at +-4 g, about 250 mg) and INT1 **active HIGH, latched**. Because the interrupt is latched until ``INT_STAT0`` is read, the state of GPIO4 at the next wake answers "was there *any* motion since the last cycle", which a three-sample delta check could miss during smooth driving. :meth:`~gpspro.firmware_core.fw._cycle` reads the pin, then calls :meth:`~gpspro.firmware_core.BMA400.clear_wakeup` to release the latch. Deep-sleep wakeup on INT1 (``ext1``, ``WAKEUP_ANY_HIGH``, pin ``PULL_DOWN``) is armed **only while still**; while moving the device rides the short ``930`` timer and re-arming the latch would re-wake it immediately. The reference baseline is nevertheless refreshed every cycle so a vehicle that stops is seen as still again. :meth:`~gpspro.firmware_core.BMA400.is_moving` (three readings 200 ms apart) and :meth:`~gpspro.firmware_core.BMA400.debug` are kept for bench diagnostics. .. note:: The board's accelerometer footprint is labelled ``SC7A20/BMA400`` - the Silan SC7A20 is a pin-compatible alternative. The firmware checks the BMA400 chip id (``0x90``) and reports ``BMA400: not found`` otherwise, in which case the reed alarm alone decides ``raw_motion``. .. autoclass:: gpspro.firmware_core.BMA400 :members: :undoc-members: :private-members: _read_accel