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

Softdevice.run_with_callback never calls the callback #238

Open
ceigel opened this issue Mar 3, 2024 · 1 comment
Open

Softdevice.run_with_callback never calls the callback #238

ceigel opened this issue Mar 3, 2024 · 1 comment

Comments

@ceigel
Copy link

ceigel commented Mar 3, 2024

I've been tryingg to get SocEvents by calling run_with_callback. However, not event arrives. I've been able to debug, and in events#run_soc the error seems to be NotFound (5). I'm testing this with nrf52840 and S140.

@alexmoon
Copy link
Contributor

alexmoon commented Mar 4, 2024

NotFound just means there are no SOC events available at that point in time. You do need to configure the softdevice to generate the events you're interested in. For example, to get USB power events you need to call:

            use nrf_softdevice::raw;
            raw::sd_power_usbremoved_enable(1);
            raw::sd_power_usbdetected_enable(1);
            raw::sd_power_usbpwrrdy_enable(1);

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

2 participants