This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

central_and_peripheral_hr does not compile for Nrf5833dk_52820

Hello all,

we are working on new project that should work for both role (central and peripheral).
If I compile the sample "central_and_peripheral_hr for NRF52833DK_NRF52833 everythngs works perfectly, but If i compile the same sample for NRF52833DK_NRF52820 it does not compile.
Can this example run on NTF5280? Can you suggest to me how to fix the problem?

I'm using NCS v1.9.1 and VSCode.
The location project is the following: "ncs\v1.9.1\nrf\samples\bluetooth\central_and_peripheral_hr"

thanks in advance
Best regards

  • Hi,

    The Central and Peripheral HRS sample does not run on nRF52820 out of the box due to memory constraints. Without making any changes the sample requires more than the 32 kB of RAM available on the chip, as you can see from the error when trying to build the sample:

    c:/ncs/v1.9.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: region `SRAM' overflowed by 789 bytes

    It is possible to reduce RAM usage by disabling features that you do not use and reducing the size of threads and buffers. You can do this by setting these settings in prj.conf. There is an example of how to do this in the Peripheral UART sample, where the file prj_minimal.conf can be used as configuration file in order to reduce both code size and RAM usage. You can also check out Memory footprint optimization for even more information about this.

    Please be aware that an application where the device is able to act as both a central and a peripheral will require more flash and RAM, so you might have problems using both roles on nRF52820.

    Best regards,

    Marte

  • Hello Marte,

    thaks for your answer. 
    Do you suggest to move to another one chip, like NRF52833?
    I have to add also OTA upgrade.

    Thanks again for your time
    Best regards

Related