This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF5 SDK bootloader animation (app_timer)

Hi,

I would like to add LED animation when DFU is in place. I know where to start it and where to stop it in the secure_bootloader source. The main issue for me is to add app_timer since I need it for the animation. 

Is there a good way on how to do that, and is there a need to enlarge the bootloader size in the linker script? 

I am using nRF5 SDK 17.0.2

Best regards,
Vojislav

Parents
  • Hello Vojislav,

    I don't foresee any problems with using the app timer in the bootloader, but you will likely have to allocate more flash to it. Just keep in mind that the bootloader must always start at a page aligned address (0x78000, 0x77000, 0x76000, and so on). I.e. the size of the bootloader can be increased in increments of 4 kilobytes.

    Another alternative may be to add this timer to the nrf_bootloader_dfu_timers.c implementation. It would have less impact on the memory footprint.

    Best regards,

    Vidar

  • Hi Vidar,

    Thanks, I got it working in the meantime. 

    Here is how memory is divided in the bootloader linker script. Do you think it should be ok?

    MEMORY
    {
      /* FLASH (rx) : ORIGIN = 0x78000, LENGTH = 0x6000 */
      FLASH (rx) : ORIGIN = 0x71000, LENGTH = 0xd000
      RAM (rwx) :  ORIGIN = 0x20005968, LENGTH = 0xa698
      uicr_bootloader_start_address (r) : ORIGIN = 0x10001014, LENGTH = 0x4
      uicr_mbr_params_page (r) : ORIGIN = 0x10001018, LENGTH = 0x4
      mbr_params_page (r) : ORIGIN = 0x0007E000, LENGTH = 0x1000
      bootloader_settings_page (r) : ORIGIN = 0x0007F000, LENGTH = 0x1000
    }
    


    I also added RTT backed for logs, that is why I have moved it for that much.

    Best regards,
    Vojislav

Reply
  • Hi Vidar,

    Thanks, I got it working in the meantime. 

    Here is how memory is divided in the bootloader linker script. Do you think it should be ok?

    MEMORY
    {
      /* FLASH (rx) : ORIGIN = 0x78000, LENGTH = 0x6000 */
      FLASH (rx) : ORIGIN = 0x71000, LENGTH = 0xd000
      RAM (rwx) :  ORIGIN = 0x20005968, LENGTH = 0xa698
      uicr_bootloader_start_address (r) : ORIGIN = 0x10001014, LENGTH = 0x4
      uicr_mbr_params_page (r) : ORIGIN = 0x10001018, LENGTH = 0x4
      mbr_params_page (r) : ORIGIN = 0x0007E000, LENGTH = 0x1000
      bootloader_settings_page (r) : ORIGIN = 0x0007F000, LENGTH = 0x1000
    }
    


    I also added RTT backed for logs, that is why I have moved it for that much.

    Best regards,
    Vojislav

Children
Related