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

It hang in ble_app_uart + libuarte

Hello,

I'm developing a BLE device and it consist of nRF52833 and a external UART component.

ble_app_uart example in SDK v17.0.0 is replaced app_uart to libuarte. The UART component is sent a variable length data to nRF52833. Normally, it send 384 or 512 bytes per second.  sometimes it send 2048 bytes, but nRF52833 go to hang.  I enabled log options - NRF_LIBUARTE_CONFIG_LOG_ENABLED and NRF_BALLOC_CONFIG_LOG_ENABLED.

This is a initialization parameter for libuarte.

    NRF_LIBUARTE_ASYNC_DEFINE(libuarte, 0, 1, 2, NRF_LIBUARTE_PERIPHERAL_NOT_USED, 255, 9);
    
    nrf_libuarte_async_config_t nrf_libuarte_async_config = {
            .tx_pin     = TX_PIN_NUMBER, //TX_PIN_NUMBER,
            .rx_pin     = RX_PIN_NUMBER, //RX_PIN_NUMBER,
            .baudrate   = NRF_UARTE_BAUDRATE_115200,
            .parity     = NRF_UARTE_PARITY_EXCLUDED,
            .hwfc       = NRF_UARTE_HWFC_DISABLED,
            .timeout_us = 100,
            .int_prio   = APP_IRQ_PRIORITY_MID
    };

The data size is 2048 bytes. but it is not done to receive. No more progress.

00> <debug> libUARTE: (evt) RX dma_cnt:255, endrx_cnt:255, stop_cnt:0
00> 
00> <debug> libUARTE: RX END chunk0:255, chunk1:0, data[0]=66 80
00> 
00> <debug> libUARTE_async: (evt) RX: 223 (addr:0x20003AB0, internal index: 32)
00> 
00> <debug> app: >> RX Buf:0x20003AD0 Len:223
00> 
00> <info> libUARTE_async: Freeing full buffer 0x20003AB0, 223, (currently allocated:2).
00> 
00> <debug> app: END RXDATA
00> 
00> <debug> libUARTE: RX buf response (mp_next_rx not NULL:0x20003CB0), Provided buffer:0x20003AB0
00> 
00> <debug> libUARTE: (evt) RX dma_cnt:255, endrx_cnt:510, stop_cnt:0
00> 
00> <debug> libUARTE: RX END chunk0:255, chunk1:0, data[0]=0 0
00> 
00> <debug> libUARTE_async: (evt) RX: 255 (addr:0x20003BB0, internal index: 0)
00> 
00> <debug> app: >> RX Buf:0x20003BB0 Len:255
00> 
00> <info> libUARTE_async: Freeing full buffer 0x20003BB0, 255, (currently allocated:2).
00> 
00> <debug> app: END RXDATA
00> 
00> <debug> libUARTE: RX buf response (mp_next_rx not NULL:0x20003AB0), Provided buffer:0x20003BB0
00> 
00> <debug> libUARTE: (evt) RX dma_cnt:255, endrx_cnt:765, stop_cnt:0
00> 
00> <debug> libUARTE: RX END chunk0:255, chunk1:0, data[0]=0 0
00> 
00> <debug> libUARTE_async: (evt) RX: 255 (addr:0x20003CB0, internal index: 0)
00> 
00> <debug> app: >> RX Buf:0x20003CB0 Len:255
00> 
00> <info> libUARTE_async: Freeing full buffer 0x20003CB0, 255, (currently allocated:2).
00> 
00> <debug> app: END RXDATA
00> 
00> <debug> libUARTE: RX buf response (mp_next_rx not NULL:0x20003BB0), Provided buffer:0x20003CB0
00> 
00> <debug> libUARTE: (evt) RX dma_cnt:255, endrx_cnt:1020, stop_cnt:0
00> 
00> <debug> libUARTE: RX END chunk0:255, chunk1:0, data[0]=0 0
00> 
00> <debug> libUARTE_async: (evt) RX: 255 (addr:0x20003AB0, internal index: 0)
00> 
00> <debug> app: >> RX Buf:0x20003AB0 Len:255
00> 
00> <info> libUARTE_async: Freeing full buffer 0x20003AB0, 255, (currently allocated:2).
00> 
00> <debug> app: END RXDATA
00> 
00> <debug> libUARTE: RX buf response (mp_next_rx not NULL:0x20003CB0), Provided buffer:0x20003AB0
00> 
00> <debug> libUARTE: (evt) RX dma_cnt:255, endrx_cnt:1275, stop_cnt:0
00> 
00> <debug> libUARTE: RX END chunk0:255, chunk1:0, data[0]=0 0
00> 
00> <debug> libUARTE_async: (evt) RX: 255 (addr:0x20003BB0, internal index: 0)
00> 
00> <debug> app: >> RX Buf:0x20003BB0 Len:255
00> 
00> <info> libUARTE_async: Freeing full buffer 0x20003BB0, 255, (currently allocated:2).
00> 
00> <debug> app: END RXDATA
00> 
00> <debug> libUARTE: RX buf response (mp_next_rx not NULL:0x20003AB0), Provided buffer:0x20003BB0
00> 
00> <debug> libUARTE: (evt) RX dma_cnt:255, endrx_cnt:1530, stop_cnt:0
00> 
00> <debug> libUARTE: RX END chunk0:255, chunk1:0, data[0]=0 0
00> 
00> <debug> libUARTE_async: (evt) RX: 255 (addr:0x20003CB0, internal index: 0)
00> 
00> <debug> app: >> RX Buf:0x20003CB0 Len:255
00> 
00> <info> libUARTE_async: Freeing full buffer 0x20003CB0, 255, (currently allocated:2).
00> 
00> <debug> app: END RXDATA
00> 
00> <debug> libUARTE: RX buf response (mp_next_rx not NULL:0x20003BB0), Provided buffer:0x20003CB0
00> 
00> <debug> libUARTE: (evt) RX dma_cnt:255, endrx_cnt:1785, stop_cnt:0
00> 
00> <debug> libUARTE: RX END chunk0:255, chunk1:0, data[0]=0 0
00> 
00> <debug> libUARTE_async: (evt) RX: 255 (addr:0x20003AB0, internal index: 0)
00> 
00> <debug> app: >> RX Buf:0x20003AB0 Len:255
00> 
00> <info> libUARTE_async: Freeing full buffer 0x20003AB0, 255, (currently allocated:2).
00> 
00> <debug> app: END RXDATA
00> 
00> <debug> libUARTE: RX buf response (mp_next_rx not NULL:0x20003CB0), Provided buffer:0x20003AB0
00> 
00> <debug> libUARTE: (evt) RX dma_cnt:255, endrx_cnt:2040, stop_cnt:0
00> 
00> <debug> libUARTE: RX END chunk0:255, chunk1:0, data[0]=0 0
00> 
00> <debug> libUARTE_async: (evt) RX: 255 (addr:0x20003BB0, internal index: 0)
00> 
00> <debug> app: >> RX Buf:0x20003BB0 Len:255
00> 
00> <info> libUARTE_async: Freeing full buffer 0x20003BB0, 255, (currently allocated:2).
00> 
00> <debug> app: END RXDATA

Please somebody help !!

Regards,

HyunSuk Lee

Parents Reply Children
Related