netcore claiming ownership of GPIO pin 1.01

I have a problem where the GPIO pin is not working as intended (it is constantly high but it should be alternating high and low). Via debugging I've ascertained that the problem is the fact that bit 28 in register NRF_P1->PIN_CNF[1] is set to 1 which means it is owned by netcore and not appcore. When I force this bit to 0 in code, the pin works as expected. But this needs to be done through configuration and I have remove all other functions from that pin in nrf5340dk_nrf5340_cpunet.overlay, ipc_radio.overlay and mcuboot.overlay. Am I missing some other configuration files or something in the existing ones?

This problem started occurring after migrating from SDK version 2.6.0 to SDK version 2.9.0 on the nRF5340DK board. I'm using Windows 10 and VS code for development. I have attached the boards and sysbuild folders which contain the configuration files, I hope that helps. Thank you.

1732.project.zip

  • Hi,

     

    Ownership of the GPIOs are set by the application core, via node "gpio_fwd".

    I am using your board/*.overlay file in bluetooth/peripheral_lbs, and your sysbuild configuration, and print the register:

    printk("GPIO P1.01: %x ", NRF_P1->PIN_CNF[1]);

     

    If you are using any other sub-images (mcuboot for instance), you need to delete the entry there as well (my_project/sysbuild/mcuboot.overlay), which you seem to do already.

     

    Here's my output:

    *** Booting MCUboot v2.1.0-dev-12e5ee106034 ***
    *** Using nRF Connect SDK v2.9.0-7787b2649840 ***
    *** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
    I: Starting bootloader
    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Boot source: none
    I: Image index: 0, Swap type: none
    I: Bootloader chainload address offset: 0xc000
    ?*** Booting My Application v2.9.0-7787b2649840 ***
    *** Using nRF Connect SDK v2.9.0-7787b2649840 ***
    *** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
    Starting Bluetooth Peripheral LBS example
    I: 2 Sectors of 4096 bytes
    I: alloc wra: 0, fe8
    I: data wra: 0, 0
    I: HW Platform: Nordic Semiconductor (0x0002)
    I: HW Variant: nRF53x (0x0003)
    I: Firmware: Standard Bluetooth controller (0x00) Version 45.41337 Build 3074452168
    I: No ID address. App must call settings_load()
    Bluetooth initialized
    I: Identity: CA:C4:23:90:3B:06 (random)
    I: HCI: version 6.0 (0x0e) revision 0x206b, manufacturer 0x0059
    I: LMP: version 6.0 (0x0e) subver 0x206b
    Advertising successfully started
    GPIO P1.01: 3

     

    I would recommend that you delete the build folder, and try to regenerate the project and see if this issue persists.

     

    Kind regards,

    Håkon

  • Thank you Håkon for the reply. Unfortunately this did not solve the issue. Do you have any other suggestions?

  • Hi,

     

    As mentioned, I have used the configuration in the .zip, and cannot replicate the issue.

    If you do the same exercise as me (add your configurations to a arbitrary project), do you see the same issue? Please share a verbose log.

     

    Kind regards,

    Håkon

Related