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?

  • Thank you  Heidi,

    I have found that ' west flash ' is writing to UICR register to enable pin reset, which was causing the problem.

    I have  got it fixed by using,

    nrfjprog -e && west flash --softreset,

    Or by using nrfjprog --family nRF52 --program

    I This looks like a serious issue and i wonder why does the west tool is updating the UICR registers.

    Thanks for the support.

Reply
  • Thank you  Heidi,

    I have found that ' west flash ' is writing to UICR register to enable pin reset, which was causing the problem.

    I have  got it fixed by using,

    nrfjprog -e && west flash --softreset,

    Or by using nrfjprog --family nRF52 --program

    I This looks like a serious issue and i wonder why does the west tool is updating the UICR registers.

    Thanks for the support.

Children
No Data