DFU method of nrf5340

Hi,

In our custom board, currently we using SWD with segger J-link for DFU

Is there any another option except segger/dev-kit ?

Can we do DFU through USB/UART ?

Parents
  • Hello,

    The files you mentioned, zephyr.elf and tfm_s.axf, are the main Zephyr firmware binary and the Trusted Firmware-M secure binary, respectively, see output build files. If your application binary (zephyr.elf) or any other firmware component (e.g., tfm_s.axf) exceeds the size of its designated partition, it will not fit, leading to potential flash write errors or runtime issues. According to your DTS, the image-0 partition can hold up to 256 KB. If your application exceeds this size, you must either optimize the application to reduce its size or redefine the partition layout. You can follow the memory optimization guide for assistance.

    Kind Regards,

    Abhijith

Reply
  • Hello,

    The files you mentioned, zephyr.elf and tfm_s.axf, are the main Zephyr firmware binary and the Trusted Firmware-M secure binary, respectively, see output build files. If your application binary (zephyr.elf) or any other firmware component (e.g., tfm_s.axf) exceeds the size of its designated partition, it will not fit, leading to potential flash write errors or runtime issues. According to your DTS, the image-0 partition can hold up to 256 KB. If your application exceeds this size, you must either optimize the application to reduce its size or redefine the partition layout. You can follow the memory optimization guide for assistance.

    Kind Regards,

    Abhijith

Children
  • Hi Menon,

    Using the nRF5340 with a W25Q16RV external flash (2 MB) for FOTA DFU.  While configuring the external flash, I faced an issue where the internal flash overflowed by 168 bytes:

    Interestingly, I did not encounter this issue when configuring the system with an 8 MB external flash, even though the external flash is primarily used for FOTA image storage.

    Could you provide guidance on how to resolve this overflow issue, given that I would like to keep the external flash configuration with the W25Q16RV (2 MB)? I'm also interested in understanding how the external flash configuration might influence the internal flash utilization and if there are recommended approaches to optimize memory usage to prevent such overflows.


  • Hello Lavanya,

    I will try to answer your questions here, but I recommend creating a new ticket as these questions are a bit outside the scope of your original query. This will help keep the Devzone tidy and assist other users who refer to Devzone threads.

    Lavanya_Manohar said:
    Interestingly, I did not encounter this issue when configuring the system with an 8 MB external flash, even though the external flash is primarily used for FOTA image storage.

    Switching to an 8 MB external flash resolved the issue suggests that your build configuration may rely on the size of the external flash. It could be using some of the external flash for code execution or data storage, which impacts the total memory usage. The error message states that the internal flash region FLASH is overflowing by 168 bytes. This indicates that the current configuration of your application or firmware requires more internal flash memory than what is available on the nRF5340's internal flash.

    Try following the memory optimization guide I pointed out in my last response. I recommend reviewing your application code and configuration to see if there is any unnecessary code or configuration that can be removed. Try building with Optimization for size (-Os) when adding the build configuration. Adjust the partition sizes to ensure critical partitions fit within the internal flash. Modify your pm_static.yml or pm.yml file to fine-tune how memory is allocated.

    You can also refer to the memory optimization with the nRF connect sdk.

    Kind regards,

    Abhijith

  • Thanks for ur response. 
    i have created new case 

    • Case ID: 332036
      I have tried the optimization but issue still existing.
Related