NCS v2.0.0 - aws_iot sample - No UART output when using an overlay file

Hi,

I'm working with the NCS v2.0.0 - aws_iot sample and an nRF9160 on a custom board.

I have tested the aws_iot sample on an nRF9160DK and have confirmed that it works.

It appears that when I attempt to use an overlay file to change the TX and RX pins of UART_0, the UART output stops working.

I have tested this overlay file using hello world sample on my custom board and it outputs as expected.

I have attached my overlay file below, could you let me know what might be happening?

Thanks,

Alvin

6431.nrf9160dk_nrf9160_ns.overlay

  • When I add in the overlay file and use SPM (CONFIG_SPM=y and CONFIG_BUILD_WITH_TFM=n) in the prj.conf file, I do not see *** Booting Zephyr OS build v3.1.99-ncs1 ***. The last thing I see is:

    SPM: prepare to jump to Non-Secure image.
    
    
  • I may be facing a different problem.  I am using the peripheral_lbs example with NCS V2.1.0 .  It works on nRF5340DK, but if I change the overlay file.  Only "*** Booting Zephyr OS build v3.1.99-ncs1 *** message received on my custom board which indicates the MCUBoot works with my overlay file, but stepping thru printk() in the peripheral_lbs main.c not seeing more messages printed.  The application is running fine with the debugger.   I am debugging, but it may be different from your problem.

  • Are you connecting the oscilloscope to these pins? P0.00 and P0.01 on the DK? 

    As mentioned earlier, the GPIO P0.01 and P0.00 will by default not be connected to P0.00 and P0.01 you see on the DK. They are connected to the Interface MCU. So you won't get any input on the oscilloscope. Turn the DK upside down, or see the below picture:

    If you want an alternative routing you will need to update the board controller firmware of the nRF52840 SoC on the nRF9160 DK. In order to do so, you will need to build hello_world and add the code below to the project's device tree. Build for  nrf9160dk_nrf52840 and remember to set the PROG/DEBUG switch on the DK to nRF52.

    &vcom2_pins_routing {
            status = "disabled";
    };

    Documentation:

    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.0/nrf/ug_nrf9160.html#board-controller 

    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.0/zephyr/boards/arm/nrf9160dk_nrf52840/doc/index.html#board-controller-firmware

    Best regards,

    Simon

    
    
  • Hi Simon,

    I was probing those pins you marked on the DK, however I just tested on my custom board which has a pinout attached directly to pin P0.01.

    When I run the at_client sample with the overlay file, I see UART TX on P0.01 and UART RX on P0.00.

    When I run the aws_iot sample with the overlay file, I don't see any activity on P0.01 and P0.00.

    Is there a reason I would see UART running the at_client sample and not the aws_iot sample while using the overlay file?

    Also, it seems like you were able to run your sample without adding those lines in the prj.conf file to enable SPM. Are we both running the same version of the SDK?

    Thanks,

    Alvin

  • Try to narrow down the issue

    One difference between aws_iot and at_client is that mcuboot is enabled. Try to disable that in aws_iot (CONFIG_BOOTLOADER_MCUBOOT=n) and see if that affects it somehow.

    Since you are able to see activity on P0.01 and P0.00 in hello world, could you try to remove part by part (except for printk, which should output on P0.00 and P0.01) from the aws_iot sample. Eventually you will end up with a clean main.c with only a main() function running printk. Using this approach you can figure out exactly what is causing the issue. If you still don't see anything with a clean main.c, try to remove configs from the prj.conf file. Remember to test regularly so you can pinpoint what is causing the issue..

    Best regards,

    Simon

Related