This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

GPIO port 1 unable to read with MCUBoot added

I've recently upgraded my SDK to 1.6.0 and I am now unable to read the state of P1.00 but I am able to read the state of P0.28.

I've stripped the project down to just a gpio setup and pin read loop.

If I remove the MCUBOOT define I can read the pin on GPIO 1 but when I add it in I can't.

I am now testing with a nRF5340-DK with a basic button example.

Any ideas will be gratefully received.

Thank you,

Neil

  • Hey,

    Neil_CPD said:
    In the project settings if I remove CONFIG_BT=y and hence remove the net core it starts working again.

    This is most likely because the net core uses P1.00 and P1.01 for UART0. I'm not sure why this wouldn't be the case for earlier versions of NCS though. It seems a bit strange. Maybe the net core isn't enabled by default. That could be worth checking out.

  • Hi Hakon,

    What is the best way to disable the network core setting up the uart? I couldn't see it as an option in the config menu.

    Thanks,

  • Neil_CPD said:
    I couldn't see it as an option in the config menu.

    This config seems to do just that.

  • Thanks for the reply Hakon, I need the network core for bt bit I don't won't it setup the uart.

    Neil

  • v1.6.1\zephyr\boards\arm\nrf5340dk_nrf5340\nrf5340dk_nrf5340_cpunet.dts -> uart0 uses pin 0x21 (P1.01).. i changed the dts file as follows since I don't care about netcore using uart

    &uart0 {
    status = "disabled";
    current-speed = <115200>;
    tx-pin = <33>;
    rx-pin = <32>;
    rts-pin = <11>;
    cts-pin = <10>;
    };

    that didn't seem to help (i did clean and rebuild, clean run cmake and rebuild as well) 

    the final dts file created after build build_nrf5340dk_nrf5340_cpuapp\zephyr.dts (for the main application image created after build)  shows pwm0 using the same pin as well..

    pwm0: pwm@21000 {
    compatible = "nordic,nrf-pwm";
    reg = < 0x21000 0x1000 >;
    interrupts = < 0x21 0x1 >;
    status = "okay";
    label = "PWM_0";
    #pwm-cells = < 0x1 >;
    ch0-pin = < 0x1c >;
    };

    but v1.6.1\zephyr\boards\arm\nrf5340dk_nrf5340\nrf5340dk_nrf5340_cpuapp.dts only has the following 

    &pwm0 {
    status = "okay";
    ch0-pin = <28>;
    };

    where do rest of entries come from and how do i ensure "interrupts" use another pin instead of 0x21 ? (I do need pwm0 and hence can not disable it)

    This pin on my device is used for my touch interrupt and this is becoming a blocker for my project.. How can we use pin 0x21 (P1.01) please help

Related