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

GPIO checking in start-up code, before booting S110 soft device?

Hey guys,

I’m working on an nRF51822 design where I’d like to check the value of a GPIO at Power-ON, then either shutdown, OR start the BLE stack and do BLE stuff. I really don’t want to have to do a full boot-up, initialization and loading of the S110 each time we check the GPIO.

I think it can be done in the start-up code, before loading the soft device? Using gcc. Where exactly would I need to put this code? I’m looking at gcc_startup_nrf51.s, but what happens between that start-up code and main.c?

From an earlier post, I understand we jump to the soft device, before main(), but from where does that jump happen and can we make changes there to do this GPIO checking as I describe?

Many Thanks! Brian