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

BLE number of pakets NRF52832

Hi everybody,

I have a question about the number of data pakets which I can send with the BLE. Every data paket has a range of 20 Byte.

Now I want to send about 55 of these data pakets. But I only can send 10 then it works without problems. When I want to send more than 10 pakets, my device is sending 10 and after that, the BLE is crashing. 

What is used:. Nrf52832 module, ble_nus.c  

Does anybody know, why I can only send, in every case I tried, 10 pakets. Maybe it is defined anywhere and I don't know where.

Thanks a lot  Slight smile

Marius

Parents Reply Children
  • How much RAM the SoftDevice needs depends on how you configure the SoftDevice. Configuring e.g. more characteristics and services, the SoftDevice will require more RAM. The exact number is returned by the function sd_ble_enable(), and if it needs to be adjusted, it’s printed in the nrf_sdh_ble_enable() function in nrf_sdh_ble.c

    Snippet:

    ret_code_t nrf_sdh_ble_enable(uint32_t * const p_app_ram_start)
    {
        // Start of RAM, obtained from linker symbol.
        uint32_t const app_ram_start_link = *p_app_ram_start;
    
        ret_code_t ret_code = sd_ble_enable(p_app_ram_start);
        if (*p_app_ram_start > app_ram_start_link)
        {
            NRF_LOG_WARNING("Insufficient RAM allocated for the SoftDevice.");
    
            NRF_LOG_WARNING("Change the RAM start location from 0x%x to 0x%x.",
                            app_ram_start_link, *p_app_ram_start);
            NRF_LOG_WARNING("Maximum RAM size for application is 0x%x.",
                            ram_end_address_get() - (*p_app_ram_start));
        }
        else
        {
            NRF_LOG_DEBUG("RAM starts at 0x%x", app_ram_start_link);
            if (*p_app_ram_start != app_ram_start_link)
            {
                NRF_LOG_DEBUG("RAM start location can be adjusted to 0x%x.", *p_app_ram_start);
    
                NRF_LOG_DEBUG("RAM size for application can be adjusted to 0x%x.",
                              ram_end_address_get() - (*p_app_ram_start));
            }
        }
    
        if (ret_code == NRF_SUCCESS)
        {
            m_stack_is_enabled = true;
        }
        else
        {
            NRF_LOG_ERROR("sd_ble_enable() returned %s.", nrf_strerror_get(ret_code));
        }
    
        return ret_code;
    }

Related