Hi Nordic team,
We have a project that uses nRF5340 &NCS 2.7.0, and we encountered net core crashing issue each time when ble is connected by central device and 5340 app core tries to set tx power vy sending IPC HCI command to net core. We did not meet this issue on NCS version before 2.7.0.
So I did similar things to reproduce this issue on 5340DK and use hci_pwr_ctrl sample code in NCS2.7.0.
I can see nRF5340 Net core always crahes when I run the sample code on 5340DK.
Steps to reproduce:
1. Open the existing sample project C:\ncs\v2.7.0\zephyr\samples\bluetooth\hci_pwr_ctrl by nRF connect extention in VsCode
2. Add a build configuration, select SDK and toolchain v2.7.0, nrf5340DK and 'no sysbuild' as below and do a pristine build.
3. After the building is finished, flash the merged hex image into 5340DK.
4. On serial port terminal such as TeralTerm, open the UART port of DK App core, watch the uart logs.
5. Reset the DK board and scan the BLE name "Bynamic test beacon" by nRF connector App on Android phone and Click 'connect' button once it's discovered.
6. Rseult:
nRF connector App is stuck at connecting, never connected and uart logs also indicate that 5340DK has hanged, very possible in net core.
Here is the screenshot of nRF connector App
Here is the UART log printed out from 5340DK app core:
As you can see UART logs stopped at line 65, but the sample is expected to adjust the tx power continuously, right? so I suspect net core is crashed.
7. Go back to step 5-6, but this time attach net core's elf file to the running target by Ozone Debugger via Jlink,
I loaded hci_ipc efl file by command: File.Open("C:\ncs\v2.7.0\zephyr\samples\bluetooth\hci_pwr_ctrl\child-parent-build\hci_ipc\zephyr\zephyr.elf"), and selected net core like below:
I observed that nRF5340 net core was crashed when nRF connector App is connecting to "Bynamic test beacon" in step 6, this aligns with the UART log I saw on App core. And the callstack in net core shows that it is BusFault exception in softdevice_controller_s140
And here is the zip file of the code C:\ncs\nick\v2.7.0\zephyr\samples\bluetooth\hci_pwr_ctrl, I did not touch its source code, but in case you want to review it.
I just renamed child_image/hci_rpmsg.conf -> child_image/hci_ipc.conf under C:\ncs\v2.7.0\zephyr\samples\bluetooth\hci_pwr_ctrl as I said in another tickect simple gpio to control external FEM in NCS 2.7.0 & nrf5340
I did not change zephyr\samples\bluetooth\hci_ipc code either.
7827.hci_pwr_ctrl.zip
Please note I am not using sysbuild in NCS2.7.0, here is the build command I scratched from VSC:
west build --build-dir c:/ncs/v2.7.0/zephyr/samples/bluetooth/hci_pwr_ctrl/child-parent-build c:/ncs/v2.7.0/zephyr/samples/bluetooth/hci_pwr_ctrl --pristine --board nrf5340dk/nrf5340/cpuapp --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION=NONE
Can you look into this issue? And can you give me some guidance about how to debug the network core of 5340?
Thanks