asset_tracker_v2 booting with V2.5.0

I have a nRF9160DK board running asset_tracker_v2 on a nRF9160 custom board. V1.7.0 loads and boots fine but when I use V2.5.0 the boot fails as shown below. The only change I have made to the V2.5.0 asset_tracker_v2 code was to change the 2 lines in prj.conf that had my AWS information. This code loads fine in a nrf9160DK board but fails when I use the V2.5.0 version in the custom board. The V1.7.0 version loads in the custom board and had been running for several years. any ideas what I am doing wrong? any way to get more information on why the boot is failing? any help would be greatly appreciated. We have V1.7.0 out in the filed in many sites for years and it is working perfectly. The decision was made to upgrade to V2.5.0 so I am stuck until I can get this to boot correctly.

I noticed there are 2 new lines in the V2.5.0 code that are not in the V1.7.0 code. since these related to boot I commented them out. below are the 2 extra lines in V2.5.0 and the error message.

CONFIG_SECURE_BOOT=y
CONFIG_BUILD_S1_VARIANT=y

when I tried to build with these commented out I got the following error message.

********************************************

C:/Nordic1/v2.5.0/nrf/modules/tfm/tfm/boards/common/assert.c:16:9: note: '#pragma message:

!!!Partition alignment error!!!
The non-secure start address in pm_static.yml or generated partition.yml is: 0x1be00
which is not aligned with the SPU region size.
Refer to the documentation section 'TF-M partition alignment requirements'
for more information.

'
16 | #pragma message "\n\n!!!Partition alignment error!!!"\
| ^~~~~~~
C:/Nordic1/v2.5.0/nrf/modules/tfm/tfm/boards/common/assert.c:22:2: error: #error "TF-M non-secure start address is not aligned on SPU region size"
22 | #error "TF-M non-secure start address is not aligned on SPU region size"
| ^~~~~
ninja: build stopped: subcommand failed.
[

************************************************************************

*** Booting nRF Connect SDK v2.5.0 ***
Attempting to boot slot 0.
Attempting to boot from address 0x8200.
Verifying signature against key 0.
Hash: 0xc0...9e
Firmware signature verified.
Firmware version 1
Booting (0x8200).

  • Hi,

    Just to make sure that I understand your problem correctly:

    You have deployed custom boards with the asset_tracker_v2 from NCS v1.7.0, that you wish to upgrade to NCS v2.5.0.

    When you build the new version and flash it (with a programmer) to a DK, it works, but when you do a FPTA upgrade for the deployed devices, it fails.

    Is this correct, or you do do a FOTA upgrade of the DK as well?

    Do you have a static prtition configuration? If so, can you share it with me?

    Best regards,

    Didrik

  • Didrik

    you are correct. we have deployed custom boards with asset_tracker_v2 from NCS V1.7.0. We want to upgrade to NCS v2.5.0. We flash it with a programmer to both the nRF9160DK board and the custom board both of which are in my lab here sitting next to each other. The DK board works fine and the custom board does not boot. We are not using FOTA at this time. We are just trying to program working version of the V2.5.0 code. I am not sure where I find the partition configuration. I did not do anything to change whatever the sample asset_tracker_v2 partitions were set to. If you tell me where I can find them I will send them

  • Didrik

    just to repeat what I am trying to load in both the DK board and the custom board is the V2.5.0 sample asset_tracker_v2. The only changes are the 2 lines to load my AWS information in overlay-aws.conf. I have made no other changes to asset_tracker_v2. This is the step I took to get V1.7.0 working. I start with a working sample and expand from there. I have never seen this behavior before. I have never seen a DK or a custom board not boot. any help would be great since I can not move forward until I can get a program to boot in the custom board.

  • Didrik

    another data point. I can power cycle the board many times and occasionally it will boot up properly and run perfectly. Getting it to run is may 10% or less but when it does boot the board is fine.

  • below is an existence proof that the code is programmed correctly and runs perfectly (very rarely). I have no idea how to get it to boot consistently.

    *** Booting nRF Connect SDK v2.5.0 ***
    Attempting to boot slot 0.
    Attempting to boot from address 0x8200.
    Verifying signature against key 0.
    Hash: 0xe0...f4
    Firmware signature verified.
    Firmware version 1
    *** Booting nRF Connect SDK v2.5.0 ***
    *** Booting nRF Connect SDK v2.5.0 ***
    Attempting to boot slot 0.
    Attempting to boot from address 0x8200.
    Verifying signature against key 0.
    Hash: 0xe0...f4
    Firmware signature verified.
    Firmware version 1
    *** Booting nRF Connect SDK v2.5.0 ***
    *** GPIO Init ***
    SW2CTRL device is ready
    SPI CS2N device is ready
    SPI CS3N device is ready
    BAT MON EN device is ready
    GPIO_09 device is ready
    CHRG device is ready
    ACPR device is ready
    *** ADC Init ***
    ADC device is ready
    adc setup: 2nd channel passed
    adc setup: 4th channel passed
    *** SPI Init ***
    SPI device is ready
    *** I2C Init ***
    I2C device is ready
    I2C config passed
    [00:00:00.252,441] <err> spi_nor: Device id 00 00 00 does not match config c2 28 17
    *** Booting nRF Connect SDK v2.5.0 ***
    Calibrating PWM for channel 0...
    Application Event Manager initialized
    [00:00:00.288,970] <inf> app_event_manager: APP_EVT_START
    [00:00:00.484,680] <inf> app_event_manager: MODEM_EVT_INITIALIZED

Related