Hi,
Firmware with changes from hci-lpuart sample code is terminating abnormally. hci-lpuart sample code is modified to call "adc_read()" method to read adc values. When BLE central is connected to the device, then adc_read() method is called, it terminates. All the register has a value of "0xdeadbeef".
Test code to reproduce this behavior is the following:
https://github.com/reinforce-lab/sdk-nrf/tree/sample_ble_adc_nvs
It uses nRF Connect SDK ver1.7.1. It runs on nRF9160 development kit. PCA10090 ver1.0.0.
Flash to board sdk-nrf/samples/bluetooth/peripheral_uart to nrf9160, then sdk-nrf/samples/bluetooth/hci_lpuart to nrf52840.
Then reset nrf9160 and connect to the peripheral.
I used iPhone 12 Pro iOS15.3.1, nRF Connect 2.4.13, to connect to the device. After 20 seconds, adc_read() is called and BLE connection is lost.
Code diff:
Code diff, timer method which calls adc_read() added to hci-lpuart is here:
https://github.com/reinforce-lab/sdk-nrf/commit/569ca927873be5c071c5f91a9be3db25a7ad512b
Code diff, adc initialization and reading code added to hci-lpuart is here:
https://github.com/reinforce-lab/sdk-nrf/commit/1eb18aadf6c6ee1b21b3ccbcb71a26e09ef986cb
I afraid that BLE software device terminates abnormally by a adc_read() method. How can I use adc read with BLE soft device?