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

DTM test procedure over Bootloader + SoftDevice

Hello,

 

I am using nRF52840, SDK_16.0.0, S140 SoftDevice and Segger 4.16 for flashing the image.

 

1) At factory first we will load Secure Serial Bootloader and SoftDevice. Without erasing them, we want to do DTM. Whether can I load DTM package from below path using nrfutil.

                \examples\dtm\direct_test_mode\pca10056\blank\ses

 

2) As per below post can’t I use load SoftDevice along with DTM.

a) Since SoftDevice only loaded but nowhere enabled, still DTM can be loaded. Please correct my understanding.

                https://devzone.nordicsemi.com/f/nordic-q-a/42488/how-to-run-dtm-on-nrf52840-development-kit-using-mt8852b/167016#167016

                https://devzone.nordicsemi.com/f/nordic-q-a/33236/52840-dtm

 

Thanks & Regards

Vishnu Beema

Parents
  • Hello,

     

    Thank you for your detailed explanation.

     

    1) Let me give more inputs on our setup. DTM is used only for Factory testing. Once done, we will load our Production application and release to market.

      1. Yes, Initially I thought to load merged “Secure Serial Bootloader” + “SoftDevice + MBR” and then update DTM using DFU. Since we are yet to port nrfutil on to Android OS, for time being we want to merge even DTM application and load final hex file using nrfjprog. So first we load merged hex file with “Secure Serial Bootloader” + “SoftDevice + MBR” + DTM Application + “Bootloader settings page”. Once DTM is tested we will load our BLE application via DFU (Once nrfutil is ported on Android OS) so that DTM application will be replaced by our BLE application.
      2. Also our intention is not to keep both DTM and BLE applications at a time.

     2) Can you please let me know more details on you comment “if the SoftDevice is enabled, it is a different story altogether.”. As mentioned about we are keep MBR and SoftDevice. Anyway, SoftDevice is not enabled when DTM is executed.

    3) On original DTM code as is, using below command I generated DTM package. So even FLAH macros are as is.

     nrfutil pkg generate --hw-version 52 --application-version 2 --application direct_test_mode_pca10056.hex --sd-req 0xCA --key-file CT40_private.key DTM_CT40_V2_package.zip

     

    4) I did small experiment. I modified DTM code so that I can toggle LED3 on nRF52840 DK by sending UART format commands.

    I compiled DTM example with below FLASH & RAM macros changed and merged as 1.a. With this I am able to do ON / OFF on LED3.

    FLASH_START=0x27000

    FLASH_SIZE=0xd9000

    RAM_START=0x20002300

    RAM_SIZE=0x3dd00

     

    With same DTM code (LED changes) as is I reverted back FLASH & RAM macros as below. With this I generated DTM application package (.zip).

     

    FLASH_START=0x0

    FLASH_SIZE=0x100000

    RAM_START=0x20000000

    RAM_SIZE=0x40000

     

    Using DFU, I am able to upgrade the package. DFU is success, but I am not able to toggle LED3.

     

    a) My basic query is, why DFU is success in this case. DTM as part of package starts at Flash address 0. When doing DFU, should not writing Flash fail as at address 0, Flash is not erased and MBR resides.

     

    b) Similar to ‘--verify’ option as part of nrfjprog, is there any similar verify option as part of nrfutil.

    c) As part of DFU, how CRC and other sanity check are success even though we are overwriting / overlapping on top of MBR.

     

    Thanks & Regards

    Vishnu Beema

Reply
  • Hello,

     

    Thank you for your detailed explanation.

     

    1) Let me give more inputs on our setup. DTM is used only for Factory testing. Once done, we will load our Production application and release to market.

      1. Yes, Initially I thought to load merged “Secure Serial Bootloader” + “SoftDevice + MBR” and then update DTM using DFU. Since we are yet to port nrfutil on to Android OS, for time being we want to merge even DTM application and load final hex file using nrfjprog. So first we load merged hex file with “Secure Serial Bootloader” + “SoftDevice + MBR” + DTM Application + “Bootloader settings page”. Once DTM is tested we will load our BLE application via DFU (Once nrfutil is ported on Android OS) so that DTM application will be replaced by our BLE application.
      2. Also our intention is not to keep both DTM and BLE applications at a time.

     2) Can you please let me know more details on you comment “if the SoftDevice is enabled, it is a different story altogether.”. As mentioned about we are keep MBR and SoftDevice. Anyway, SoftDevice is not enabled when DTM is executed.

    3) On original DTM code as is, using below command I generated DTM package. So even FLAH macros are as is.

     nrfutil pkg generate --hw-version 52 --application-version 2 --application direct_test_mode_pca10056.hex --sd-req 0xCA --key-file CT40_private.key DTM_CT40_V2_package.zip

     

    4) I did small experiment. I modified DTM code so that I can toggle LED3 on nRF52840 DK by sending UART format commands.

    I compiled DTM example with below FLASH & RAM macros changed and merged as 1.a. With this I am able to do ON / OFF on LED3.

    FLASH_START=0x27000

    FLASH_SIZE=0xd9000

    RAM_START=0x20002300

    RAM_SIZE=0x3dd00

     

    With same DTM code (LED changes) as is I reverted back FLASH & RAM macros as below. With this I generated DTM application package (.zip).

     

    FLASH_START=0x0

    FLASH_SIZE=0x100000

    RAM_START=0x20000000

    RAM_SIZE=0x40000

     

    Using DFU, I am able to upgrade the package. DFU is success, but I am not able to toggle LED3.

     

    a) My basic query is, why DFU is success in this case. DTM as part of package starts at Flash address 0. When doing DFU, should not writing Flash fail as at address 0, Flash is not erased and MBR resides.

     

    b) Similar to ‘--verify’ option as part of nrfjprog, is there any similar verify option as part of nrfutil.

    c) As part of DFU, how CRC and other sanity check are success even though we are overwriting / overlapping on top of MBR.

     

    Thanks & Regards

    Vishnu Beema

Children
No Data
Related