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
  • Are you testing this on an nRF5340 DK? If so, the pins are connected to the debugger. Flash the application, power cycle the DK, and make sure not to start a debug session (By opening an UART or RTT terminal, which will activate the debugger, which will control the UART pins).

    BR,

    Edvin

  • Yes, i test it on the DK board, However, I have already set up to output log information from the SWD interface via Rtt. Moreover, on our client's board, these two pins are also uncontrollable.

  • 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

  • Hi,

    Thank you for your reply. I have modified the code you provided earlier according to your instructions. The application can run on my development board, and I can see that LED1 is flashing, but LED2 does not respond at all, as shown in the attached video file.

  • Hi,

    After adding these two statements to my conf file, the problem was resolved. Thank you for your help!
    CONFIG_TFM_LOG_LEVEL_SILENCE=y
    CONFIG_TFM_SECURE_UART=n

Reply Children
No Data
Related