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

NRF5340: Is GPIO_1 set as non-secure?

Greetings!

I am using NCS 1.4.99. I have spent some time debugging my I2c application on NRF5340 and I came to the realisation that I was not able to control any pin that was on the GPIO_1 (simple blinky did not work), while all pins on GPIO_0 worked as expected. I was building my test example with west build -b nrf5340dk_nrf5430_cpuappns, so, as a non-secure application. As soon I started building with nrf5340dk_nrf5430_cpuapp everything worked.

According to the comment in inside function spm_config_peripherals in file ncs/nrf/subsys/spm/spm.c all GPIOs should be allocated to Non-Secure domain. I did not observe that, or my assumptions are wrong. In the same function, I also see mention of CONFIG_SPM_NRF_P0_NS option but the option CONFIG_SPM_NRF_P1_NS is not mentioned in the function nor in KConfig reference list: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index-all.html

I can also see that spm sample, that is built with every non-secure application, does only contain overlay for nrf9160 but not any for nrf5340.

Can somebody shed some light on this issue? Am I supposed to build only secure images for nrf5340 if I need to use GPIO_1?

Thanks,

Marko

Parents Reply Children
No Data
Related