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

nrf5340 DK is unable to utilize DLE max package size

Hi,

From some time I'm trying to fix problems with throughput sample.
I don't know why, but after setting data len parameter to any value it's constantly sets 27.

uart:~$ config data_length 100
LE Data Packet Length set to: 100
[00:00:34.655,975] <inf> main: LE Data length update pending, since 1135607
[00:00:36.110,992] <inf> main: [local] LE data len updated: TX (len: 27 time: 2120) RX (len: 27 time: 2120), done: 1183285
[00:00:36.111,022] <inf> main: LE Data Length updated
uart:~$ config data_length 100
LE Data Packet Length set to: 100
[00:00:39.185,546] <inf> main: LE Data length update pending, since 1284032

Same code for Particle Xenon with nrft52840 works fine so I guess it's config problem somewhere between network and application core.

https://github.com/DuMaM/bitly_nrf5x/blob/main/prj_nrf5340dk_nrf5340_cpuapp.conf

https://github.com/DuMaM/bitly_nrf5x/blob/main/child_image/hci_rpmsg.conf

Please help me in setting this up.

  • Ok, I solved my issues by pure luck.
    After searching around something which has value 27 it turned out that my child img config is not loading.
    I investigated it a bit more and it turned out,  since 2.0.0 pattern for the child project config is a bit different.

    instead of hci_rpmsg.conf it should be hci_rpmsg_nrf5340dk_nrf5340_cpuapp.conf

    It's due to this code in muliimage.cmake

          if(NOT "${CONF_FILE_BUILD_TYPE}" STREQUAL "")
            set(child_image_conf_fragment ${ACI_CONF_DIR}/${ACI_NAME}_${CONF_FILE_BUILD_TYPE}.conf)
          else()
            set(child_image_conf_fragment ${ACI_CONF_DIR}/${ACI_NAME}.conf)
          endif()
          if (EXISTS ${child_image_conf_fragment})
            add_overlay_config(${ACI_NAME} ${child_image_conf_fragment})
          endif()
    And this one in zephyr\cmake\modules\configuration_files.cmake

    if(DEFINED CONF_FILE)
      # This ensures that CACHE{CONF_FILE} will be set correctly to current scope
      # variable CONF_FILE. An already current scope variable will stay the same.
      set(CONF_FILE ${CONF_FILE})

      # CONF_FILE has either been specified on the cmake CLI or is already
      # in the CMakeCache.txt. This has precedence over the environment
      # variable CONF_FILE and the default prj.conf

      # In order to support a `prj_<name>.conf pattern for auto inclusion of board
      # overlays, then we must first ensure only a single conf file is provided.
      string(REPLACE " " ";" CONF_FILE_AS_LIST "${CONF_FILE}")
      list(LENGTH CONF_FILE_AS_LIST CONF_FILE_LENGTH)
      if(${CONF_FILE_LENGTH} EQUAL 1)
        # Need the file name to look for match.
        # Need path in order to check if it is absolute.
        get_filename_component(CONF_FILE_NAME ${CONF_FILE} NAME)
        if(${CONF_FILE_NAME} MATCHES "prj_(.*).conf")
          set(CONF_FILE_BUILD_TYPE ${CMAKE_MATCH_1})
          set(CONF_FILE_INCLUDE_FRAGMENTS true)
        endif()
      endif()
    elseif(CACHED_CONF_FILE)

    Second part of code is defining CONF_FILE_BUILD_TYPE so it makes unable for muliimage.cmake to pick up correct default conf file.
Related