Hi, I want DFU the NRF52840 using the UART. Please let me know the following quires .
Process-
- I want to create two partition of memory one will store the my main application code and another partition will only store the custom bootloader code.
- In custom bootloader , I will initialize the UART communication for receiving the application code bytes and want to store that data in Application code partition.
- After writing the whole Application code , Bootloader code will reboot the system and after reboot it will read a flag from flash if "application is available "
- Incase of application code available, it will start the application code to run and Incase of any failure the code will go to Bootloader mode again to receive the new application code
- While running the application code when , It will receive command for DFU it should reboot and go to DFU mode.
Issues
- How do I create partition in memory or set address in code on which it should store ?
- In what ratio I should do that partition?
- In case of writing the whole application code , what instructions are required to run in code so that It start running the application from given address?
- Is there any way to check if stored application code is correctly stored in memory, one way I am assuming is to calculate the checksum of whole application code?
- Do I have to make changes in .ld files of Application code and Bootloader code ?
- How do I jump to bootloader mode from Application mode ?
Note - For all above queries I want a hint or brief idea to proceed
IDE used
- I am using Segger Embedded Development Studio for development purpose.
- SDK version 17.1
Please let me know if any more details required .
Thanks and regards