Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kscan sideband crashes on initialisation with endpoint and Bluetooth macros on battery power #2674

Open
ReFil opened this issue Nov 25, 2024 · 0 comments

Comments

@ReFil
Copy link
Contributor

ReFil commented Nov 25, 2024

With a board on battery power, a power on event with a kscan sideband behaviour being triggered immediately upon power on e.g. a toggle switch can cause crashes if the sideband is configured with Bluetooth behaviours. CONFIG_KSCAN_SIDEBAND_INIT_PRIORITY=99 doesn't make a difference. The crashing doesn't occur if the sideband triggers &none behaviours. The crashing also doesn't occur if USB is present on power on

Example sideband configuration

macros {
    ZMK_MACRO(usb_conn,
        wait-ms = <1>;
        tap-ms = <1>;
        bindings = <&out OUT_USB>;
    )
    ZMK_MACRO(ble_zero,
        wait-ms = <1>;
        tap-ms = <1>;
        bindings = <&out OUT_BLE &bt BT_SEL 0>;
    )
    ZMK_MACRO(ble_one,
        wait-ms = <1>;
        tap-ms = <1>;
        bindings = <&out OUT_BLE &bt BT_SEL 1>;
    )
    #include "version.dtsi"
};

endpoint_sideband_behaviors {
    auto-enable;
    compatible = "zmk,kscan-sideband-behaviors";
    kscan = <&kscan_sp3t_toggle>;

    first_toggle_sideband: first_toggle_sideband {
        column = <0>;
        bindings = <&usb_conn>;
    };

    second_toggle_sideband: second_toggle_sideband {
        column = <1>;
        bindings = <&ble_zero>;
    };

    third_toggle_sideband: third_toggle_sideband {
        column = <2>;
        bindings = <&ble_one>;
    };
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant