BLE programs are unable to work with ECC keys when built in non secure mode (nrf9160dk/nrf9160/ns)

Here are results of running the bluetooth sample central uart, first when built with target nrf9160dk/nrf9160, and second with build target nrf9160dk/nrf9160/ns.

*** Booting nRF Connect SDK v3.3.0-ba167d9f3db4 ***
*** Using Zephyr OS v4.3.99-fd9204a02d52 ***
[00:00:00.262,268] <inf> fs_nvs: 8 Sectors of 4096 bytes
[00:00:00.262,268] <inf> fs_nvs: alloc wra: 0, fd0
[00:00:00.262,298] <inf> fs_nvs: data wra: 0, 1c
[00:00:00.972,595] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
[00:00:00.972,625] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
[00:00:00.972,656] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 155.44175 Build 2923568579
[00:00:00.974,060] <inf> bt_hci_core: No ID address. App must call settings_load()
[00:00:00.974,090] <inf> central_uart: Bluetooth initialized
[00:00:00.975,646] <inf> bt_hci_core: HCI transport: H:4
[00:00:00.975,769] <inf> bt_hci_core: Identity: F1:B2:BA:28:C5:6D (random)
[00:00:00.975,799] <inf> bt_hci_core: HCI: version 6.2 (0x10) revision 0x1020, manufacturer 0x0059
[00:00:00.975,830] <inf> bt_hci_core: LMP: version 6.2 (0x10) subver 0x1020
[00:00:00.976,745] <err> central_uart: uart_init failed (err -88)
[00:00:00.260,406] <inf> spi_nor: mx25r6435f@1: 8 MiBy flash


*** Booting nRF Connect SDK v3.3.0-ba167d9f3db4 ***
*** Using Zephyr OS v4.3.99-fd9204a02d52 ***
[00:00:00.268,829] <inf> fs_nvs: 2 Sectors of 4096 bytes
[00:00:00.268,829] <inf> fs_nvs: alloc wra: 0, fd0
[00:00:00.268,859] <inf> fs_nvs: data wra: 0, 1c
[00:00:00.979,095] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
[00:00:00.979,125] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
[00:00:00.979,156] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 155.44175 Build 2923568579
[00:00:00.980,560] <inf> bt_hci_core: No ID address. App must call settings_load()
[00:00:00.980,590] <inf> central_uart: Bluetooth initialized
[00:00:00.980,987] <err> bt_ecc: Failed to generate ECC key -134
[00:00:00.981,170] <wrn> bt_smp: Public key not available
[00:00:00.982,208] <inf> bt_hci_core: HCI transport: H:4
[00:00:00.982,299] <inf> bt_hci_core: Identity: F1:B2:BA:28:C5:6D (random)
[00:00:00.982,330] <inf> bt_hci_core: HCI: version 6.2 (0x10) revision 0x1020, manufacturer 0x0059
[00:00:00.982,360] <inf> bt_hci_core: LMP: version 6.2 (0x10) subver 0x1020
[00:00:00.982,482] <err> bt_gatt: Unable to import the key for AES CMAC -134
error line 309
[00:00:00.982,940] <err> central_uart: uart_init failed (err -88)
[00:00:00.990,722] <err> bt_gatt: Unable to import the key for AES CMAC -134

I am not concerned with the uart_init() errors. Just the crypto errors. This is happening in v3.2.1 and v3.3.0. I am pretty sure that everything was working fine a while back, at least in v3.2.1. In another similar application I had played around with flash sectors a lot. But in this one I have not, although maybe I hosed something in flash?? I am told by AI that that should not affect ECC generation. I am using a v1.1.0 nRF9160DK board. I may have some older boards that I can experiment with, but they do not have external flash. This is so frustrating. AI tells me to try all sort of ridiculous configuration changes and none of them make any difference. Thanks for help.

Burt

Related