Hi,
I'm trying to connect the nrf51822 chip to an ethernet (W5500 module). For the moment, it fails without error (nothing works). So I start from a simpliest program that just initialize spi:
int main(void)
{
nrf_gpio_range_cfg_output(12,14);//red
nrf_gpio_pin_set(14);
nrf_gpio_pin_set(12);
spi0_address = spi_master_init(SPI0, SPI_MODE0, false);
if(spi0_address == 0) {
nrf_gpio_pin_clear(14);
} else {
nrf_gpio_pin_clear(12);
}
}
spi0_address is never null, even if the pin are not connected !
In spi_master_config.h, the pin are configured:
/* SPI0 */
#define SPI_PSELSCK0 23
#define SPI_PSELMOSI0 21
#define SPI_PSELMISO0 22
#define SPI_PSELSS0 20
Is this a normal behaviour or do I have done something wrong ?