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

Programmig external board slow

When I program my external board via the nrf52dk the programming is much slower then when I program the nrf52 chip on the devboard. Is this normal behaviour and if not how can I solve this?

Has it something to do with the length of the programming cables for instance (signal interference etc.)?

  • Hi,

     

    I haven't heard about this before. Are you using nrfjprog for both scenarios? Can you please show some logs with the behavior?

    Have you tested with a new 10-pin cable, just to ensure its not this one that is marginal?

     

    Kind regards,

    Håkon

  • I've tested with two different devboards and two different cables. Same result.

    See log below:

    2021-08-04T19:10:28.408Z INFO Using nrfjprog to communicate with target
    2021-08-04T19:10:29.147Z INFO Using J-Link Software version 6.88
    2021-08-04T19:10:29.754Z INFO Segger serial:  682561746
    2021-08-04T19:10:29.754Z INFO Segger speed:  2000  kHz
    2021-08-04T19:10:29.754Z INFO Segger version:  J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 17 2020 14:43:00
    2021-08-04T19:10:29.754Z INFO Core probed: 682561746
    2021-08-04T19:10:29.754Z INFO Core RAM: 64KiB
    2021-08-04T19:10:29.754Z INFO Core ROM: 512KiB in pages of 4KiB
    2021-08-04T19:10:29.867Z INFO Model: NRF52832_xxAA_REV2.
    2021-08-04T19:10:30.527Z INFO Core0: Reading device non-volatile memory. This may take a few seconds.
    2021-08-04T19:10:38.090Z INFO Core0: Non-volatile memory has been read. 2 non-empty memory blocks identified 
    2021-08-04T19:10:43.047Z INFO Parsing HEX file:  C:\Users\gholl\stack\Nordic\dfu_test\pca10400s132\dfu_target_firmware.hex
    2021-08-04T19:10:43.057Z INFO File was last modified at  16-7-2021 09:42:08
    2021-08-04T19:10:43.184Z INFO SoftDevice detected, id 0xCB (S132 v7.0.1)
    2021-08-04T19:10:44.538Z INFO Does not need to be reloaded:  C:\Users\gholl\stack\Nordic\dfu_test\pca10400s132\dfu_target_firmware.hex
    2021-08-04T19:10:44.538Z INFO Writing procedure starts for core0
    2021-08-04T19:11:02.437Z INFO Write procedure finished
    2021-08-04T19:11:02.440Z INFO Using nrfjprog to communicate with target
    2021-08-04T19:11:03.123Z INFO Using J-Link Software version 6.88
    2021-08-04T19:11:03.746Z INFO Segger serial:  682561746
    2021-08-04T19:11:03.746Z INFO Segger speed:  2000  kHz
    2021-08-04T19:11:03.746Z INFO Segger version:  J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 17 2020 14:43:00
    2021-08-04T19:11:03.746Z INFO Core probed: 682561746
    2021-08-04T19:11:03.746Z INFO Core RAM: 64KiB
    2021-08-04T19:11:03.746Z INFO Core ROM: 512KiB in pages of 4KiB
    2021-08-04T19:11:03.863Z INFO Model: NRF52832_xxAA_REV2.
    2021-08-04T19:11:04.534Z INFO Core0: Reading device non-volatile memory. This may take a few seconds.
    2021-08-04T19:11:12.116Z INFO Core0: Non-volatile memory has been read. 12 non-empty memory blocks identified 
    2021-08-04T19:11:12.231Z INFO SoftDevice detected, id 0xCB (S132 v7.0.1)
    2021-08-04T19:12:18.882Z INFO Using nrfjprog to communicate with target
    2021-08-04T19:12:19.596Z INFO Using J-Link Software version 6.88
    2021-08-04T19:12:20.295Z INFO Segger serial:  682561746
    2021-08-04T19:12:20.295Z INFO Segger speed:  2000  kHz
    2021-08-04T19:12:20.295Z INFO Segger version:  J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 17 2020 14:43:00
    2021-08-04T19:12:20.296Z INFO Core probed: 682561746
    2021-08-04T19:12:20.296Z INFO Core RAM: 128KiB
    2021-08-04T19:12:20.296Z INFO Core ROM: 512KiB in pages of 4KiB
    2021-08-04T19:12:20.409Z INFO Model: NRF52833_xxAA_REV1.
    2021-08-04T19:12:21.068Z INFO Core0: Reading device non-volatile memory. This may take a few seconds.
    2021-08-04T19:12:28.546Z INFO Core0: Non-volatile memory has been read. 13 non-empty memory blocks identified 
    2021-08-04T19:12:28.660Z INFO SoftDevice detected, id 0xCB (S132 v7.0.1)
    2021-08-04T19:12:32.972Z INFO Writing image to disable app readback protection
    2021-08-04T19:12:32.973Z INFO Image path: C:\Users\gholl\.nrfconnect-apps\node_modules\pc-nrfconnect-programmer\resources\firmware\disable_approtect_nrf52832.hex
    2021-08-04T19:12:34.081Z INFO Recovery procedure finished
    2021-08-04T19:12:34.089Z INFO Using nrfjprog to communicate with target
    2021-08-04T19:12:34.698Z INFO Using J-Link Software version 6.88
    2021-08-04T19:12:35.438Z INFO Segger serial:  682561746
    2021-08-04T19:12:35.438Z INFO Segger speed:  2000  kHz
    2021-08-04T19:12:35.438Z INFO Segger version:  J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 17 2020 14:43:00
    2021-08-04T19:12:35.439Z INFO Core probed: 682561746
    2021-08-04T19:12:35.439Z INFO Core RAM: 128KiB
    2021-08-04T19:12:35.439Z INFO Core ROM: 512KiB in pages of 4KiB
    2021-08-04T19:12:35.557Z INFO Model: NRF52833_xxAA_REV1.
    2021-08-04T19:12:36.245Z INFO Core0: Reading device non-volatile memory. This may take a few seconds.
    2021-08-04T19:12:43.675Z INFO Core0: Non-volatile memory has been read. 2 non-empty memory blocks identified 
    2021-08-04T19:12:43.797Z INFO SoftDevice detected, id 0xCB (S132 v7.0.1)
    2021-08-04T19:12:45.695Z INFO Does not need to be reloaded:  C:\Users\gholl\stack\Nordic\dfu_test\pca10400s132\dfu_target_firmware.hex
    2021-08-04T19:12:45.695Z INFO Writing procedure starts for core0
    2021-08-04T19:13:09.065Z INFO Write procedure finished
    2021-08-04T19:13:09.067Z INFO Using nrfjprog to communicate with target
    2021-08-04T19:13:09.745Z INFO Using J-Link Software version 6.88
    2021-08-04T19:13:10.419Z INFO Segger serial:  682561746
    2021-08-04T19:13:10.419Z INFO Segger speed:  2000  kHz
    2021-08-04T19:13:10.419Z INFO Segger version:  J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 17 2020 14:43:00
    2021-08-04T19:13:10.420Z INFO Core probed: 682561746
    2021-08-04T19:13:10.420Z INFO Core RAM: 128KiB
    2021-08-04T19:13:10.420Z INFO Core ROM: 512KiB in pages of 4KiB
    2021-08-04T19:13:10.550Z INFO Model: NRF52833_xxAA_REV1.
    2021-08-04T19:13:11.229Z INFO Core0: Reading device non-volatile memory. This may take a few seconds.
    2021-08-04T19:13:18.680Z INFO Core0: Non-volatile memory has been read. 12 non-empty memory blocks identified 
    2021-08-04T19:13:18.801Z INFO SoftDevice detected, id 0xCB (S132 v7.0.1)
    

    The first write is to the devkit:

    2021-08-04T19:10:44.538Z INFO Writing procedure starts for core0
    2021-08-04T19:11:02.437Z INFO Write procedure finished

    ~18 seconds

    Second write is to external board:

    2021-08-04T19:12:45.695Z INFO Writing procedure starts for core0
    2021-08-04T19:13:09.065Z INFO Write procedure finished

    ~24 seconds

    Ok not that much difference (I've never checked it like this, but it felt more), but it's still strange that it takes longer right?

  • Hi,

     

    I am not able to reproduce this behavior locally.

    Programming on-board chip:

    nrfjprog -e && time nrfjprog --program zephyr/zephyr.hex 
    Erasing user available code and UICR flash areas.
    Applying system reset.
    Parsing image file.
    Reading flash area to program to guarantee it is erased.
    Checking that the area to write is not protected.
    Programming device.
    
    real	0m7,686s
    user	0m0,607s
    sys	0m0,851s
    

     

    Programming external:

    nrfjprog -e && time nrfjprog --program zephyr/zephyr.hex 
    Erasing user available code and UICR flash areas.
    Applying system reset.
    Parsing image file.
    Reading flash area to program to guarantee it is erased.
    Checking that the area to write is not protected.
    Programming device.
    
    real	0m7,805s
    user	0m0,630s
    sys	0m0,832s
    

     

    Trying a third kit as programmer:

    nrfjprog -e && time nrfjprog --program zephyr/zephyr.hex 
    Erasing user available code and UICR flash areas.
    Applying system reset.
    Parsing image file.
    Reading flash area to program to guarantee it is erased.
    Checking that the area to write is not protected.
    Programming device.
    
    real	0m7,654s
    user	0m0,554s
    sys	0m0,873s
    

     

    Do you only see this issue in nRF connect, programmer application?

     

    Kind regards,

    Håkon

Related