This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Unable to use gpio reset pin as a gpio in nrf connect sdk

Hi,

I am not able to use the gpio pin p0.18 as a gpio with nrf connect sdk.

I have tried to toggle the pin using "gpio_pin_toggle" and gpio_pin_set" functions but it is not working. (These functions returns 0)

I want to use it as a chip select pin for my peripheral, all other lines are working except the gpio p0.18.

I have disabled the reset functionality  from the manuconf option. I have also tried to add CONFIG_GPIO_AS_PINRESET=n to the project config file but no luck.

As i can see in the zephyr.dts file, qdec interrupt pin also have the same number. (qdec is in disabled state in board.dts file). Would this be causing the problem ?

fyi, i have made sure the hardware is working by running sdk5 based code.

8863.zephyr.dts

I have tested it using the blinky example from zephyr samples.

Board: custom board based on nrf52840.

Parents
  • Hi!

    From your devicetree, it looks like botoh SPI3 and the Arduino connector are defined correctly. Could you show me all the application configurations and how you're initializing the SPI in your application?

  • Hello ,

    I recognized the same as madblue. If using VSCode and the NRF Connect SDK Extension the flash function writes to the UICR, even if 

    CONFIG_GPIO_AS_PINRESET=n

    is set. I have erased the flash before and validated the UICR being all 0xFF, then just used flash functionality from the extension.

    Is there any solution available?

  • Hi Rico!

    You can use the terminal commands described above (eg. west flash --softreset). Unfortunately this isn't possible using the UI in Visual Studio Code, but you could do it using a terminal in the IDE. A launch.json task can be created as well, if it needs to be frequently called.

    Btw, keep in mind that this is an older case. You might want to create a new support ticket if you don't get much help on an older one.

    Regards,

    Elfving

Reply
  • Hi Rico!

    You can use the terminal commands described above (eg. west flash --softreset). Unfortunately this isn't possible using the UI in Visual Studio Code, but you could do it using a terminal in the IDE. A launch.json task can be created as well, if it needs to be frequently called.

    Btw, keep in mind that this is an older case. You might want to create a new support ticket if you don't get much help on an older one.

    Regards,

    Elfving

Children
No Data