Skip to content

Assertion failed when pairing #4

@agaeb

Description

@agaeb

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions