I am trying to debug a SPI application using Keil and the Eval board, but am having problems with control of the port pins. I am using pin 23 as the CS pin. it configures correctly as an output, but the functions NRF_GPIO->OUTSET = 23; and NRF_GPIO->OUTCLR = 23; have no effect on GPIO pin 23. however these instructions cause GPIO pins 0, 1, 2 and 4 to be set/reset. These two functions are declared in nrf_gpio.h :-
static __INLINE void nrf_gpio_pin_set(uint32_t pin_number)
{
NRF_GPIO->OUTSET = (1UL << pin_number);
}
However, if I call the function nrf_gpio_pin_set(23); followed by nrf_gpio_pin_clear(23); in a loop the pin toggles as it should.
There also appears to be no activity on the other SPI pins - but one problem at a time !