Why can't my application control the p1.00 and p1.01 pins of 5340?

I am developing a project using nRF5340 to drive some peripherals. During debugging, I found that no matter how I executed the pull-up/pull-down commands, the p1.00 and p1.01 pins remained uncontrollable and always stayed in a high-level state. Why is this? I have attached my config file and overlay file.

5050.prj.conf

7026.nrf5340dk_nrf5340_cpuapp_ns.overlay

Parents Reply Children
  • Can you please upload the full application (or at least an application that can reproduce the issue), so that I can try to reproduce it locally?

    Best regards,

    Edvin

  • OK, I have uploaded the entire application, and you can track the status of pins p1.00 and p1.01 step by step according to my screenshot. 

    By the way, I am using the version ncs2.7.0.

    5340_NCS2.7.0_TEST.rar

  • I am struggling to understand your application, but I was able to build it using v2.7.0 (see that you edited it, but it said v2.3.0 before).

    The pins are set as inputs, even if I completely remove the lines that you highlighted, so they are set from somewhere else.

    I modified the peripheral_uart sample to toggle these GPIOs:

    peripheral_uart_53.zip

    They are toggled from main.c:

    	for (;;) {
    		dk_set_led(RUN_STATUS_LED0, (++blink_status) % 2);
    		dk_set_led(RUN_STATUS_LED1, (blink_status) % 2);
    		dk_set_led(RUN_STATUS_LED2, (blink_status) % 2);
    		k_sleep(K_MSEC(RUN_LED_BLINK_INTERVAL));
    	}

    And I changed the Led 1 and 2 to P1.00 and P1.01 in boards\nrf5340dk_nrf5340_cpuapp.overlay.

    I also added the line:

    /delete-node/ &gpio_fwd;

    in that file.

    Please note that if you have any sub-images (because I don't think you are using sysbuild?) such as mcuboot or an immutable bootloader, that also runs on the app core, you need to disable the gpio_fwd in their respective board files as well.

    Best regards,

    Edvin

  • Sorry, I made a mistake earlier and wrote it as ncs2.3.0, but it's actually ncs2.7.0. I added `/delete-node/ &gpio_fwd;` in my overlay file, but it didn't work, even though it's no longer found in the compiled zephyr.dts file. I confirm that my project has no other sub-images, which can be verified from the build folder.

    8524.zephyr.dts

  • Hello,

    Try taking the app that I sent in the previous reply, and add this to prj.conf:

    CONFIG_TFM_LOG_LEVEL_SILENCE=y
    CONFIG_TFM_SECURE_UART=n

    Then copy boards\nrf5340dk_nrf5340_cpuapp.overlay, and paste it as boards\nrf5340dk_nrf5340_cpuapp_ns.overlay

    And build for nRF5340dk/nrf5340/cpuapp/ns, and see if that works.

    Best regards,

    Edvin

Related