Hi , I'm using nrf5340 and nrf connect sdk 1.5.1 , recently I found out when sending large amount of data with low RSSI through bt_gatt_notify_cb the system would enter some sort of fatal error and won't reset unless re-power .
Here's the scenario , with about -70dbm RSSI and average data rate 50kbyte/s the device would disconnect and become completely dead (Neither app core nor net core is working , won't reset unless re-power) . Normal power consumption is about 3.7V/ 10mA + , but when it's dead it drops to below 3.7/ 2mA , I assume nrf5340 cut down it's power supply in order to prevent such error damages the chip .
On net core we are using hci_rpmsg sample from nrf connect sdk 1.5.1 , with these additional settings in prj.conf :
CONFIG_BT_CTLR_TX_BUFFER_SIZE=251
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
CONFIG_BT_RX_BUF_LEN=255
On app core here are all bt settings in prj.conf:
CONFIG_BT=y
CONFIG_BT_DEBUG_LOG=y
CONFIG_BT_SMP=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_RX_BUF_LEN=255
CONFIG_BT_GATT_CLIENT=y
CONFIG_BT_ATT_TX_MAX=10
CONFIG_BT_ATT_PREPARE_COUNT=2
CONFIG_BT_CONN_TX_MAX=10
CONFIG_BT_L2CAP_RX_MTU=247
CONFIG_BT_L2CAP_TX_MTU=247
CONFIG_BT_L2CAP_TX_BUF_COUNT=10
CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y
CONFIG_HEAP_MEM_POOL_SIZE=2048
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_BT_SETTINGS=y
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
CONFIG_BT_PERIPHERAL_PREF_MIN_INT=12
CONFIG_BT_PERIPHERAL_PREF_MAX_INT=12
I also tried only call bt_gatt_notify and k_sleep without calling any other function in a loop (which simulate a 50kbyte/s transmission , avoiding other parts of the system go wrong) , it still dies when RSSI drops below about -70dbm .