I have several questions about 52811

Hello Nordic engineer,

I use SDK15.3.0 and Keil

52811 have ROM 192K and RAM 24K

Questions 1:I'd like to know how much RAM and ROM does softdevice(BLE) occupy?

Questions 2:In SDK example, If a certain example doesn't have "p10056e," how many steps do I need to take to go from p10056 to p10056e?

Is there anything else I might have missed?

Questions 3:If I want to achieve functionality similar to that of "ble_app_uart," but it's necessary to have both center and peripheral roles, I looked at "ble_app_multirole_lesc." In the diagram below, can the highlighted section within the red box be removed?

《peer_manager_init()》I don't need to record the previous connection information. Also, it's not necessarily A connecting to B every time; it could be A connecting to C, or B connecting to A.

《buttons_leds_init(&erase_bonds)》The reason is the same as the peer's.

《hrs_init()》《hrs_c_init()》I don't need Heart Rate Service.

《qwr_init()》Because this feature is not utilized in the "ble_central\ble_app_uart_c" context.

Is my understanding correct?

Thanks

  • Hi,

    Questions 1:I'd like to know how much RAM and ROM does softdevice(BLE) occupy?

    The amount of ROM (flash) used by the SoftDevice differs for different versions. You can see that in the release notes from each SoftDevice version that is part of the SoftDevice zip and where you find the SoftDevices in the SDK(for instance under components/softdevice/s112/doc for S112). If for instence the size of your SoftDevice is 0x19000 (100 kB), that means that the start address of the application must be 0x19000, as it must start immediately after the SoftDevice. (So your screenshot where the application start address is 0 is not going to work). The RAM usage is a bit more complex and depends on the SoftDevice configuration, and is best found experimentally. See Adjustment of RAM and Flash memory for details.

    Questions 2:In SDK example, If a certain example doesn't have "p10056e," how many steps do I need to take to go from p10056 to p10056e?

    pca10056e projects are for the nRF52840 DK, but emulating nRF52811, mostly meaning that the projects are configured for that device peripherals and memory (see Developing for nRF52811 for details). You can refer to Creating your own emulated project for how to convert a pca10056 project to pca10056e. These projects need further adjustments in order to run on an actual nRF52811, as explained under Transferring the project to nRF52811 hardware.

    Questions 3:If I want to achieve functionality similar to that of "ble_app_uart," but it's necessary to have both center and peripheral roles, I looked at "ble_app_multirole_lesc." In the diagram below, can the highlighted section within the red box be removed?

    You can remove most of these if you don't need them (and remove other code related as well, not jut the init functions). One exception is the qwr module, as that can be usefull (unless you want to handle some events yourself). Generally, this approach makes sense. Pick a example that does most of what you need, and remove everything you don't need, then add your additional stuff.

    One thing though. Are you starting a new project now? If so, I would consider using the nRF Connect SDK instead, which is the SDK that is currently being actively developed. Also, if you want to stick with the nRF5 SDK for some reason, I would consider going for nRF5 SDK 17.1.0, which is the latest and has the most resent bug fixes etc.

  • Hi Einar,

    Thank you for your reply

    I ultimately want to implement 'ble_app_multirole_lesc' + 'UART'.

    Regarding the addition of UART functionality, I will figure it out myself.

    However, due to the 'ble_app_multirole_lesc' consuming approximately 100KB of ROM and 26KB of RAM, which exceeds the capacity of the 52811, could you provide me with some keywords to know which library functions can be deleted, such as 'HRS'?

    Thank you.

  • Hi,

    Generally, you should remove any library and feature you do not need, such as services. You may also be able to save quite a bit of space by using a different crypto library. The default configuration of the sample use oberon for elliptice curve crypto (needed in LESC), but you can use micro_ecc instead by disabling NRF_CRYPTO_BACKEND_OBERON_ENABLED in sdk_config.h and enabling NRF_CRYPTO_BACKEND_MICRO_ECC_ENABLED (see Configuring nrf_crypto frontend and backends).

  • Hi Einar,

    Thank you for your reply

    Can you tell me which folder in Nordic classifies "Services" under?

    What you mentioned, "NRF_CRYPTO_BACKEND_OBERON_ENABLED," is set to 0 in the "ble_app_multirole_lesc" that I'm using, and I haven't made any code modifications yet. This means it's in a disabled state. Another one, "NRF_CRYPTO_BACKEND_MICRO_ECC_ENABLED," is also set to 0. So, do I need to change it to 1 to enable it, right?

    Additional note: When I mentioned that I haven't made any modifications, it means that after extracting the SDK, I'm using the example as it is, without any changes.

    Thank you

  • Hi,

    tony55723 said:
    Can you tell me which folder in Nordic classifies "Services" under?

    I was referring to BLE servics (you mentionned HRS). Generally, remove anything you don't need. Another thing I did not mention but which is imporatnt when it comes to size is logging. Make sure to disable logging by setting NRF_LOG_ENABLED to 0 in your sdk_config.h.

    tony55723 said:
    What you mentioned, "NRF_CRYPTO_BACKEND_OBERON_ENABLED," is set to 0 in the "ble_app_multirole_lesc" that I'm using, and I haven't made any code modifications yet. This means it's in a disabled state. Another one, "NRF_CRYPTO_BACKEND_MICRO_ECC_ENABLED," is also set to 0. So, do I need to change it to 1 to enable it, right?

    I did not notice tha tyou were developing on an nRF52840 (or at least have started with a project for that device). That has CryptoCell, which is a HW accelerator, and in that case it is what will be enabled. That is not present on the nRF52811, so you need to disable that. And as LESC needs some crypto features, you need to enable another backend instead. And the backend that will give you the lowest flash usage is micro-ecc.

Related