Controlling GPIO on a common port from two different cores

We have
nRF54H20DK (rev. 0.9.1), SDK: v2.9.0-nRF54H20-1 and the same Toolchain, IDE: VSCode + nRF Connect plugin

We need to control the GPIO LEDs from two cores (P9.00, P9.01 on the APP core and P9.02, P9.03 on the RAD core), i.e. on the same port - does this mean that the GPIO drivers on the cores must use the same memory? 

Here are the "overlapping" visualizations that indicate possible conflicts when all LED control is enabled on both cores.

Is this possible? If so, how do I need to configure the "overlay" and prj.conf files for both cores?

Br, KeySoft

Parents Reply Children
  • Hello,

    Yes. It is right

    You need to delete the property and disable the specific leds.

    / {
        aliases {
            /delete-property/ led2;
            /delete-property/ led3;
        };
    };
    
    &led2 {
        status = "disabled";
    };
    
    &led3 {
        status = "disabled";
    };

    Alternatively, you can only delete the property and then define your used leds in the device tree overlay

    / {
        aliases {
            /delete-property/ led2;
            /delete-property/ led3;
        };
        
        leds {
            compatible = "gpio-leds";
            led0: led_0 {
                gpios = <&gpio9 0 GPIO_ACTIVE_LOW>;
                label = "LED0";
            };
            led1: led_1 {
                gpios = <&gpio9 1 GPIO_ACTIVE_LOW>;
                label = "LED1";
            };
        };
    };

  • I am currently back to controlling GPIO from two cores. Yes, you are right, different pins from a common port are controllable from two cores, but I also had to configure GPIOTE in the overlay file for the RAD core so that the channels do not overlap with the APP core.

    Another option would be to disable GPIOTE in RAD core.

    Here are snippets from APP and RAD core:

    &gpiote130 {
    	status = "okay";
    	owned-channels = <0 1 2 3 4 5 6 >;
    };

    &gpiote130 {
    	owned-channels = <7>;
    	status = "okay";
    };

    BR,

    KeySoft

Related