How to get rid of UART in mcuboot

Hello,

I try to figure out, why a certain IO pin shows some pattern at startup. After using JLinkExe to set a watchpoint at the configuration register of the pin (GDB was crashing reproducible), I figured out, that the pin was used by a UART driver configured into the mcuboot bootloader.

I found this article here: https://devzone.nordicsemi.com/f/nordic-q-a/93879/kernel-panic-when-i-remove-uart0_default 

But when I apply that configuration, the bootloader ends up, not being able to access a flash ares (I would guess, that this is the external QSPI flash):

00> [00:00:00.385,498] <inf> [ma*** Booting MCUboot v2.1.0-dev-4594a8693738 ***
00> *** Using nRF Connect SDK v2.8.0-a2386bfc8401 ***
00> *** Using Zephyr OS v3.7.99-6f7193b063f4 ***
00> [00:00:00.290,222] <inf> mcuboot: Starting bootloader
00> [00:00:00.290,710] <err> mcuboot: Failed to open flash area ID 3 (image 0 slot 1): -19, cannot continue

Target hardware is a custom nrf5340 design.

How to disable the usage of the UART, without disabling the QSPI flash driver?

My mcuboot.overlay:

&qspi {
    /*
     * Name of the device has to be mx25r64; Otherwise,
     * the driver is not found during linking
     */
    mx25r64: mx25r6435f@0 {
/*    flash_ext: MT25QU01GBBB@0 {*/
        compatible = "nordic,qspi-nor";
        reg = < 0x0 >;

        writeoc = "pp4o";
        readoc = "read4o";
        sck-frequency = < 90000000 >;
        jedec-id = [ 20 BB 21 ];
        sfdp-bfp = [ E5 20 F1 FF FF FF FF 03 44 EB 08 6B 08 3B 04 BB EE FF FF FF FF FF 00 FF FF FF 00 FF 0C 20 0F 52 10 D8 00 FF 23 72 F5 00 82 ED 04 CC 44 83 68 44 30 B0 30 B0 F7 C4 D5 5C 00 BE 29 FF F0 D0 FF FF ];
        /* This is the size in bits and corresponds to the length of
         * mcuboot_secondary + mcuboot_secondary_1 in pm_static.yml
         */
        size = < 0x900000 >;
        has-dpd;
        t-enter-dpd = < 0x2710 >;
        t-exit-dpd = < 0x88b8 >;
        address-size-32;
    };
};

/ {
    chosen {
        nordic,pm-ext-flash = &mx25r64;
/*        nordic,pm-ext-flash = &flash_ext;*/
    };
};

&uart0 {
    status = "disabled";
};

mcuboot.config:

# Configure MCUboot features
CONFIG_BOOT_MAX_IMG_SECTORS=512
#CONFIG_MCUBOOT_DOWNGRADE_PREVENTION=y
CONFIG_BOOT_ECDSA_TINYCRYPT=y
CONFIG_BOOT_SWAP_USING_MOVE=y

# Enable flash simulator
CONFIG_PCD_APP=y
CONFIG_FLASH_SIMULATOR=y
CONFIG_FLASH_SIMULATOR_DOUBLE_WRITES=y
CONFIG_FLASH_SIMULATOR_STATS=n

CONFIG_NORDIC_QSPI_NOR=y
CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096

CONFIG_BOOT_IMAGE_ACCESS_HOOKS=y
CONFIG_BOOT_IMAGE_ACCESS_HOOK_NRF5340=y

#
# This configuration works, but is quite complicated (especially as it
# adds multithreading to a bootloader)
#
CONFIG_LOG=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_FRONTEND_ONLY=n
CONFIG_LOG_MODE_MINIMAL=n
CONFIG_LOG_MODE_IMMEDIATE=y

CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_RTT_CONSOLE=y

thanks in advance for every pointer, hint etc.

Torsten

Parents Reply Children
No Data
Related