download_client: Unexpected HTTP response: 400 bad request when CONFIG_MCUBOOT_IMG_MANAGER=n

If we enable MCUBOOT_IMG_MANAGER, SECURE_BOOT and BUILD_S1_VARIANT, FOTA works fine. However,

there is a constant 150mA power draw. If we disable them, power draw is normal but we then get "400 bad request" error.

Any idea why just enabling those three options causing the power draw or why not configuring them causes the bad request?

[00:00:18.082,580] <inf> download_client: Connecting to www.website.com
[00:00:18.339,508] <err> download_client: Unexpected HTTP response: 400 bad request
[00:00:18.339,996] <err> fota_download: Download client error
Received error from fota_download

# MCUBOOT
CONFIG_BOOTLOADER_MCUBOOT=y #
#CONFIG_MCUBOOT_IMG_MANAGER=y
#CONFIG_SECURE_BOOT=y
#CONFIG_BUILD_S1_VARIANT=y
CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY=n

Parents Reply Children
  • Here is the diff:

    $ diff build/zephyr/zephyr.dts build/mcuboot/zephyr/zephyr.dts
    9c9
    <               zephyr,entropy = &psa_rng;
    ---
    >               zephyr,entropy = &cryptocell;
    13a14
    >               zephyr,sram = &sram0_s;
    15,16c16,18
    <               zephyr,sram = &sram0_ns;
    <               zephyr,code-partition = &slot0_ns_partition;
    ---
    >               zephyr,code-partition = &slot0_partition;
    >               zephyr,sram-secure-partition = &sram0_s;
    >               zephyr,sram-non-secure-partition = &sram0_ns;
    34d35
    <               ext-flash = &mx25r16;
    60c61
    <               peripheral@40000000 {
    ---
    >               peripheral@50000000 {
    63c64
    <                       ranges = < 0x0 0x40000000 0x10000000 >;
    ---
    >                       ranges = < 0x0 0x50000000 0x10000000 >;
    102a104,107
    >                                               storage_partition: partition@fa000 {
    >                                                       label = "storage";
    >                                                       reg = < 0xfa000 0x6000 >;
    >                                               };
    326,335c331
    <                                       status = "ok";
    <                                       partitions {
    <                                               compatible = "fixed-partitions";
    <                                               #address-cells = < 0x1 >;
    <                                               #size-cells = < 0x1 >;
    <                                               storage_partition: partition@0 {
    <                                                       label = "external-flash";
    <                                                       reg = < 0x0 0x1000000 >;
    <                                               };
    <                                       };
    ---
    >                                       status = "okay";
    475c471,488
    <               gpiote: gpiote@40031000 {
    ---
    >               cryptocell: crypto@50840000 {
    >                       compatible = "nordic,nrf-cc310";
    >                       reg = < 0x50840000 0x1000 >;
    >                       status = "okay";
    >                       #address-cells = < 0x1 >;
    >                       #size-cells = < 0x1 >;
    >                       cryptocell310: crypto@50841000 {
    >                               compatible = "arm,cryptocell-310";
    >                               reg = < 0x50841000 0x1000 >;
    >                               interrupts = < 0x40 0x1 >;
    >                       };
    >               };
    >               ctrlap: ctrlap@50006000 {
    >                       compatible = "nordic,nrf-ctrlapperi";
    >                       reg = < 0x50006000 0x1000 >;
    >                       status = "okay";
    >               };
    >               gpiote: gpiote@5000d000 {
    477,478c490,507
    <                       reg = < 0x40031000 0x1000 >;
    <                       interrupts = < 0x31 0x5 >;
    ---
    >                       reg = < 0x5000d000 0x1000 >;
    >                       interrupts = < 0xd 0x5 >;
    >                       status = "okay";
    >               };
    >               spu: spu@50003000 {
    >                       compatible = "nordic,nrf-spu";
    >                       reg = < 0x50003000 0x1000 >;
    >                       interrupts = < 0x3 0x1 >;
    >                       status = "okay";
    >               };
    >               ficr: ficr@ff0000 {
    >                       compatible = "nordic,nrf-ficr";
    >                       reg = < 0xff0000 0x1000 >;
    >                       status = "okay";
    >               };
    >               uicr: uicr@ff8000 {
    >                       compatible = "nordic,nrf-uicr";
    >                       reg = < 0xff8000 0x1000 >;
    576,579d604
    <       };
    <       psa_rng: psa-rng {
    <               compatible = "zephyr,psa-crypto-rng";
    <               status = "okay";
    

Related