This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Forced disconnections when i try to send 50 bytes per second on UART example

Hi everyone,

Explaning my project: an external device transmit via UART to nordik nrf52840DK device with UART peripheal firmware, this is connected to another nrf52840DK via BLE with UART central firmware.

So the peripheal is only working as bridge.

It simply works when i send less than 10 bytes per second, but when I increase the amount of data to more than 30bytes per second i get disconnexions of my peripheal when passed 20-40 seconds. 

I tink that it could be an overload of the UART or an overload of BLE, here my conn_params:

Here the error of disconnection: Disconnected: <log_strdup alloc failed> (reason 8)

Really the objective of the project is send 50-100 bytes every 100msec.

What point i need to check or reconfigure to achieve it??


Thank you,

regards.

  • Hi,

    I thought the fault happened on the peripheral device? Now I see you have a bus fault on the central device as well?

    Can you try to make a minimal failing project that reproduce the issue using a single DK, and using any device (like nRF connect for Desktop BLE) as the peer? Also it should not rely on physical UART, but just send some dummy NSU data in firmware. That way it is easier to test and also fewer variables to look into. Also, if stripping away parts of your firmware changes the behavior that gives an indication on where to look.

  • OK, I will try.

    I keep my custom Central Uart but trying to connect to nRF connect for Desktop BLE.

    I thought the fault happened on the peripheral device? Now I see you have a bus fault on the central device as well?

    The fault happen only on the device which the external UART is connected. On another words, the device which faults is receiving data through UART rx and sending it to the another device through BLE.

    So i can't understand that the error is on this thread...

    On hci_core on line 65:

    This thread isn't the same of the last time, I CONFIG_BT_RX_STACK_SIZE=2200 and CONFIG_BT_HCI_TX_STACK_SIZE=2200

  • Hi,

    I have new information,

    I take MY peripheral_UART code and put it into an nrf53 with the child image of hr_coded. I connect it to MY custom board with MYCentral_UART code. I connect the external UART to the peripheral nrf53 and is transmitting without problem and no asserts and no reboots.

    So i can deduce that my code works, but the configuration of my custom board doesn't work.

    This is my board peripheral .defconfig:


    # SPDX-License-Identifier: Apache-2.0
    
    CONFIG_SOC_SERIES_NRF52X=y
    CONFIG_SOC_NRF52840_QIAA=y
    CONFIG_BOARD_HELLO_BOARD=y
    
    # Enable MPU
    CONFIG_ARM_MPU=y
    
    # Enable hardware stack protection
    CONFIG_HW_STACK_PROTECTION=y
    
    # Enable RTT
    CONFIG_USE_SEGGER_RTT=y
    
    # enable GPIO
    CONFIG_GPIO=y
    
    # enable uart driver
    CONFIG_SERIAL=y
    
    # enable console
    CONFIG_CONSOLE=y
    CONFIG_UART_CONSOLE=y
    
    # additional board options
    CONFIG_GPIO_AS_PINRESET=y
    
    #Fundamental para ext adv on coded
    CONFIG_BT_CTLR_PHY_CODED=y
    CONFIG_BT_EXT_ADV=y
    CONFIG_BT_USER_PHY_UPDATE=y
    
    CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y
    CONFIG_BT_CTLR_CONN_RSSI=y
    CONFIG_BT_CTLR_ADVANCED_FEATURES=y
    

    I read about CONFIG_FLASH=y and custom boards.

    The next test that I am going to do is with a default UART_Central/Peripheral and my custoim board (probably are going to crash).

    Any question, test or idea for debug is very welcome,

    thank you for the support,

    regards.

  • There are some way to know the Kconfig parameters of the example of UART on SDK ?

    Maybe i missed something and copying the original could solve something.

    regards.

  • The next test that I am going to do is with a default UART_Central/Peripheral and my custoim board (probably are going to crash).

    I have tested dfault Central/Peripheral uart SDK example on my custom board and i got this error:

    The external UART is connected to peripheral,where the error happen: the address mach with this thread:

    As on the past i put up the Stacksize and the error is keeping, so we stay on this point

    Is the default function to do the bridge on UART example

    On the other hand if I connect the external UART to the central i get the popular error of BUS FAULT:

    So definetly there are some on this custom board that isn't well configured Disappointed

    regards.

Related