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

Assertion failed when pairing #4

Open
agaeb opened this issue Dec 21, 2023 · 0 comments
Open

Assertion failed when pairing #4

agaeb opened this issue Dec 21, 2023 · 0 comments

Comments

@agaeb
Copy link

agaeb commented Dec 21, 2023

When trying to pair a device, I got
assertion "false" failed: file ".../pico/pico-sdk/src/rp2_common/pico_flash/flash.c", line 183, function: default_enter_ss
and the pico halted.
This seems to be related to the Bluetooth stack trying to write to flash from the second core, without having been given the guarantee that it is safe to do so, see https://www.raspberrypi.com/documentation/pico-sdk/high_level.html#pico_flash.
To give this guarantee (assuming the first core isn't actually writing to flash),
flash_safe_execute_core_init();
must be called somewhere early in the main function, which is declared in
#include "pico/flash.h".
With this addition, I was able to pair the device alright.
Another possibility would be to set PICO_FLASH_ASSUME_CORE0_SAFE=1, but I did not try that.

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