Change CONFIG_ESB_MAX_PAYLOAD_LENGTH parameter

Hello everyone.

I'm developing on the nRF5340 using nRF Connect SDK. I'm porting an application and I noticed that I need to change the CONFIG_ESB_MAX_PAYLOAD_LENGTH parameter to 252, instead of the default 32. Any guidance on how to achieve so? I tried to write in the Kconfig something like 

config ESB_MAX_PAYLOAD_LENGTH
    int "Maximum payload size"
    range 1 252
    default 252
    depends on ESB
    help
      The maximum size of the payload.
But If I have a look at the build files I notice that it stays 32. Is this approach correct?
Parents
  • Hi Dario,

    That approach is not correct, but I understand the confusion. To configure existing Kconfig options such as CONFIG_ESB_MAX_PAYLOAD_LENGTH, you add them as a new line in the prj.conf file in your application folder:

    CONFIG_ESB_MAX_PAYLOAD_LENGTH=252

    prj.conf is where all configurations are set. See this documentation page. You can browse the available Kconfig options through the Kconfig search: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html

    Meanwhile, writing to Kconfig files (the ones without a file extension) in the way you've done, defines _new_ Kconfig options. So if you want to add some configurability to your project, you can define new options there, and then manage the value of those options next to everything else in prj.conf. This is not commonly needed, but could be useful as your project grows in size.

    Does that clarify things? You'll be dealing with prj.conf a lot when developing with NCS, so if you want a primer on this and more, you could try out https://academy.nordicsemi.com/

    Best regards,

    Raoul

  • Thank you for your reply. That was an option I was thinking about but I was also not sure.

    In my application, ESB runs on the Network core of the MCU, so I'm using the structure of the Multicore example. Should I include the line also on the proj.conf of the Application core (also enabling ESB over there)?

    Also, is there a way to check that the parameter is actually changed in the build I do?

  • No, you won't need to set that Kconfig setting on the application core, the setting is only relevant for the ESB firmware running on the network core. In fact, you could run an ESB sample while leaving the application core completely empty, see my colleague's reply in this case:  RE: Is the Enhanced ShockBurst (ESB) protocol applicable to the nRF5340?

    Also, is there a way to check that the parameter is actually changed in the build I do?

    If you want to make sure that a Kconfig setting has actually been changed, you could open build/zephyr/include/autoconf.h, and do a search for CONFIG_ESB_MAX_PAYLOAD_LENGTH there. You'll be able to confirm that the setting has the correct value after all steps of the build process have completed. It's quite useful, I often look at autoconf.h when I'm in doubt about some setting.

    Best regards,

    Raoul

Reply
  • No, you won't need to set that Kconfig setting on the application core, the setting is only relevant for the ESB firmware running on the network core. In fact, you could run an ESB sample while leaving the application core completely empty, see my colleague's reply in this case:  RE: Is the Enhanced ShockBurst (ESB) protocol applicable to the nRF5340?

    Also, is there a way to check that the parameter is actually changed in the build I do?

    If you want to make sure that a Kconfig setting has actually been changed, you could open build/zephyr/include/autoconf.h, and do a search for CONFIG_ESB_MAX_PAYLOAD_LENGTH there. You'll be able to confirm that the setting has the correct value after all steps of the build process have completed. It's quite useful, I often look at autoconf.h when I'm in doubt about some setting.

    Best regards,

    Raoul

Children
Related