I want to use the pca10001 to communicate as a master to an accelerometer, but when i use the function spi_master_open i get a NRF_ERROR_NOT_SUPPORTED error. I get no clock on sclk when I measure with an oscilloscope.
I have setup the spi as follows:
spi_master_config_t * spi_acc_config;
spi_acc_config->SPI_Pin_MISO = SPI_PSELMISO0;
spi_acc_config->SPI_Pin_MOSI = SPI_PSELMOSI0;
spi_acc_config->SPI_Pin_SCK = SPI_PSELSCK0;
spi_acc_config->SPI_Pin_SS = SPI_PSELSS0;
spi_acc_config->SPI_Freq = 20000UL; /**< Slave clock frequency. */
spi_acc_config->SPI_CONFIG_CPHA = 0;
spi_acc_config->SPI_CONFIG_CPOL = 0;
spi_acc_config->SPI_CONFIG_ORDER = 0; //MSB first
uint32_t result = spi_master_open(spi_acc_, spi_acc_config);
if (result == NRF_SUCCESS)
{
simple_uart_putstring((const uint8_t *)"\n\rSuccess\n\r");
}
else if (result == NRF_ERROR_NOT_SUPPORTED)
{
simple_uart_putstring((const uint8_t *)"\n\rError not supported\n\r");
}