Cant get mcuboot to work on a Fanstel module with BT840F (nRF52840)

I've had success getting the Sigurd Hellesvik Serial Recovery sample to work on an nRF52840 DK with mcumgr cli commands.  I'm able to flash the Fanstel 840 with the same bootloader sample with a simple dts overlay file.   I have the timeout flags set in the mcuboot.conf file:

CONFIG_BOOT_SERIAL_WAIT_FOR_DFU=y
CONFIG_BOOT_SERIAL_WAIT_FOR_DFU_TIMEOUT=5000
"hello world" is written 5 sec after reboot, so I assume its running correctly.  But any mcumgr command times out:
"mcumgr -c acm0 image list"
Error: NMP timeout
The led from CONFIG_MCUBOOT_INDICATION_LED=y only works with the button trigger, not with the wait for DFU. But it doesn't work on the DK either, so I'm not concerned.
I've verified that the mcumgr cli works.  As I say, all works fine on an nRF52840 DK.
I used the nRF52840 DK ->All boards base for the project.  Maybe I should use another?  Don't see anything special for a Fanstel module.  
I've only had to move the uart0 pins with an overlay and that works. 
I've seen references to these flags, but it fails to build.
CONFIG_MCUMGR=y
CONFIG_MCUMGR_SMP_UART=y
I appreciate any and all suggestions.  Thanks.
Bob
Parents
  • Hi Bob,

    The Fanstel module does not have a 32.768kHz crystal onboard, does your custom board have one connected to P0.00 and P0.01? If not try changing the LFCLK source to the internal RC oscillator by adding these configs:

    CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y

     

    Best regards,

    Bendik

  • Hi Bendik,

    I'm using the LORA840XE-M2-V1 module specifically.  I added the flags u suggested to prj.conf but mcuboot still doesn't respond to mcumgr commands.  I see the hello world output on uart0 once the app starts after the 5 sec.  This worked without setting these flags so the internal oscillator must be the default?

    Is there any way to debug the bootloader?  Thanks for the reply.

  • Bob, take a look at your device tree. Are you selecting the correct “zephyr,uart-mcumgr” chosen node device? Are there any board file discrepancies between your Fanstel and nRF52840 (device trees, defconfigs, etc)?

  • Hi Tristen,

    That's default in the dts file:

    / {
        model = "Nordic nRF52840 DK NRF52840";
        compatible = "nordic,nrf52840-dk-nrf52840";

        chosen {
            zephyr,console = &uart0;
            zephyr,shell-uart = &uart0;
            zephyr,uart-mcumgr = &uart0;
            zephyr,bt-mon-uart = &uart0;
            zephyr,bt-c2h-uart = &uart0;
            zephyr,sram = &sram0;
            zephyr,flash = &flash0;
            zephyr,code-partition = &slot0_partition;
            zephyr,ieee802154 = &ieee802154;
        };
    I've only changed the uart0 pins:

    &uart0
    {
        compatible = "nordic,nrf-uarte";
        current-speed = <115200>;
        status = "okay";
        //hw-flow-control;

        pinctrl-0 = <&uart0_default_alt>;
        pinctrl-1 = <&uart0_sleep_alt>;
        pinctrl-names = "default", "sleep";
    };

    &pinctrl
    {
        uart0_default_alt: uart0_default_alt {
            group1 {
                psels = <NRF_PSEL(UART_TX, 0, 13)>,
                    <NRF_PSEL(UART_RX, 0, 12)>,
                    <NRF_PSEL(UART_RTS, 0, 26)>,
                    <NRF_PSEL(UART_CTS, 0, 27)>;
            };
        };

        uart0_sleep_alt: uart0_sleep_alt {
            group1 {
                psels = <NRF_PSEL(UART_TX, 0, 13)>,
                    <NRF_PSEL(UART_RX, 0, 12)>,
                    <NRF_PSEL(UART_RTS, 0, 26)>,
                    <NRF_PSEL(UART_CTS, 0, 27)>;
            //  low-power-enable;
            };
        };
    };
    But I think u r right about some difference in between the Fanstel module and the nRF52840 DK. 
    BTW, we r in retreat days.  Thanks, take care.
    Bob
Reply
  • Hi Tristen,

    That's default in the dts file:

    / {
        model = "Nordic nRF52840 DK NRF52840";
        compatible = "nordic,nrf52840-dk-nrf52840";

        chosen {
            zephyr,console = &uart0;
            zephyr,shell-uart = &uart0;
            zephyr,uart-mcumgr = &uart0;
            zephyr,bt-mon-uart = &uart0;
            zephyr,bt-c2h-uart = &uart0;
            zephyr,sram = &sram0;
            zephyr,flash = &flash0;
            zephyr,code-partition = &slot0_partition;
            zephyr,ieee802154 = &ieee802154;
        };
    I've only changed the uart0 pins:

    &uart0
    {
        compatible = "nordic,nrf-uarte";
        current-speed = <115200>;
        status = "okay";
        //hw-flow-control;

        pinctrl-0 = <&uart0_default_alt>;
        pinctrl-1 = <&uart0_sleep_alt>;
        pinctrl-names = "default", "sleep";
    };

    &pinctrl
    {
        uart0_default_alt: uart0_default_alt {
            group1 {
                psels = <NRF_PSEL(UART_TX, 0, 13)>,
                    <NRF_PSEL(UART_RX, 0, 12)>,
                    <NRF_PSEL(UART_RTS, 0, 26)>,
                    <NRF_PSEL(UART_CTS, 0, 27)>;
            };
        };

        uart0_sleep_alt: uart0_sleep_alt {
            group1 {
                psels = <NRF_PSEL(UART_TX, 0, 13)>,
                    <NRF_PSEL(UART_RX, 0, 12)>,
                    <NRF_PSEL(UART_RTS, 0, 26)>,
                    <NRF_PSEL(UART_CTS, 0, 27)>;
            //  low-power-enable;
            };
        };
    };
    But I think u r right about some difference in between the Fanstel module and the nRF52840 DK. 
    BTW, we r in retreat days.  Thanks, take care.
    Bob
Children
No Data
Related