Use XL1 and XL2 as GPIO in nRF5340

Using the nRF5340 DK, SB1 and SB2 is cut and SB3 and SB4 is shorted (disconnecting 32kHz xta from pinsl)

Using the sample/basic/button example in 2.3.0 / nRF Connect.

In the prj.conf, I've set:

CONFIG_GPIO=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH=n
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n
Changing the LED to P0.00 / XL1 resulting in output low and will not work as output
Also changed the SW0 to P0.01 / XL2 reulting in reading input as pressed, no pullup set and will not work as input.
Generally it seems to be impossible to disconnect the pins from the oscillator. Reading NRF_CLOCK->LFCLKRUN to 0x0001 and NRF_CLOCK->LFCLKSTAT to 0x10001 after start-up.
Tried several boards with same result. Also tried to use pin P0.00 and P0.01 as TWI with the same result.
Any help is very appreciated.
Parents
  • Hi Geir

    I handled an issue recently which sounds similar, you can check out the ticket here

    Could you try to add the following configuration to your project configuration? 

    CONFIG_SOC_ENABLED_LFXO=n

    If the netcore is used you need to add this for the child_image configuration as well. 

    In the old case there was a second problem since TF-M was used, and the application was built for the non secure board, but I assume you are not running TF-M if you are just trying to build the button sample. 

    Best regards
    Torbjørn

Reply
  • Hi Geir

    I handled an issue recently which sounds similar, you can check out the ticket here

    Could you try to add the following configuration to your project configuration? 

    CONFIG_SOC_ENABLED_LFXO=n

    If the netcore is used you need to add this for the child_image configuration as well. 

    In the old case there was a second problem since TF-M was used, and the application was built for the non secure board, but I assume you are not running TF-M if you are just trying to build the button sample. 

    Best regards
    Torbjørn

Children
Related