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

Bluetooth: controller: ASSERTION FAIL Radio is on during flash operation #22945

Closed
cvinayak opened this issue Feb 19, 2020 · 0 comments · Fixed by #22946
Closed

Bluetooth: controller: ASSERTION FAIL Radio is on during flash operation #22945

cvinayak opened this issue Feb 19, 2020 · 0 comments · Fixed by #22946
Assignees
Labels
area: Bluetooth bug The issue is a bug, or the PR is fixing a bug priority: high High impact/importance bug
Milestone

Comments

@cvinayak
Copy link
Contributor

Describe the bug
Flash operations on nrf52840_pca10056 tests/bluetooth/shell raises ASSERTION FAIL.

To Reproduce
Steps to reproduce the behavior:

  1. mkdir build; cd build
  2. cmake -DBOARD=nrf52840_pca10056 ../tests/bluetooth/shell
  3. make
  4. See error

Expected behavior
There shall be no assertion and flash operations succeed.

Impact
showstopper

Screenshots or console output

uart:~$ bt init
Bluetooth initialized
uart:~$ bt[00:00:03.854,278] <inf> fs_nvs: 8 Sectors of 4096 bytes
[00:00:03.854,309] <inf> fs_nvs: alloc wra: 1, fc0
[00:00:03.854,309] <inf> fs_nvs: data wra: 1, 34
[00:00:03.857,086] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
[00:00:03.857,086] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
[00:00:03.857,086] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 2.2 Build 0
[00:00:03.857,666] <inf> bt_hci_core: No ID address. App must call settings_load()
[00:00:03.868,041] <inf> bt_hci_core: Identity: ea:c8:5c:41:6e:de (random)
[00:00:03.868] <inf> bt_hci_core: LMP: version 5.1 (0x0a) subver 0xffff
...
...
uart:~$ bt connect 62:aa:1d:d4:2a:de (random)
Connection pending
Connected: 62:aa:1d:d4:2a:de (random)
Remote LMP version 5.1 (0x0a) subversion 0xffff manufacturer 0x05f1
LE Features: 0x000000000001417f 
[00:00:22.419,464] <inf> bt_hci_core: PHY updated (0x0): status: 0x00, tx: 2, rx: 2
[00:00:22.429,077] <inf> bt_hci_core: Data Length (0x0): max. tx: 27 (328us), max. rx: 27 (164us)
[00:00:22.436,584] <inf> bt_hci_core: Data Length (0x0): max. tx: 27 (328us), max. rx: 27 (328us)
LE conn  param req: int (0x0018, 0x0028) lat 0 to 42
LE conn param updated: int 0x0028 lat 0 to 42
...
...
uart:~$ bt conn-update 6 6 0 64
conn update initiated.
LE conn param updated: int 0x0006 lat 0 to 100
uart:~$ 
...
...
uart:~$ flash test 0xf8000 0x1000 100
Erase OK.
Write OK.
...
...
Erase OK.
Write OK.
ASSERTION FAIL [ll_radio_state_is_idle()] @ ZEPHYR_BASE/drivers/flash/soc_flash_nrf.c:287
        Radio is on during flash operation.

ASSERTION FAIL [!arch_is_in_isr()] @ ../../kernel/include/ksched.h:262

ASSERTION FAIL [!arch_is_in_isr()] @ ../../kernel/include/ksched.h:262

Environment (please complete the following information):

  • OS: Linux
  • Toolchain: Zephyr SDK 0.11.1
  • Commit SHA or Version used: a9bfd28

Additional context
Add any other context about the problem here. None.

@cvinayak cvinayak added bug The issue is a bug, or the PR is fixing a bug priority: high High impact/importance bug area: Bluetooth labels Feb 19, 2020
@cvinayak cvinayak added this to the v2.2.0 milestone Feb 19, 2020
@cvinayak cvinayak self-assigned this Feb 19, 2020
cvinayak added a commit to cvinayak/zephyr that referenced this issue Feb 19, 2020
Fix a race condition in radio abort requested by flash
driver. It is possible that during abort function execution,
PPI setup to start radio fires. Hence, check explicitly in
cleanup function for radio being in use and disable it.

Fixes zephyrproject-rtos#22945.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
aescolar pushed a commit that referenced this issue Feb 21, 2020
Fix a race condition in radio abort requested by flash
driver. It is possible that during abort function execution,
PPI setup to start radio fires. Hence, check explicitly in
cleanup function for radio being in use and disable it.

Fixes #22945.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth bug The issue is a bug, or the PR is fixing a bug priority: high High impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants