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

interfacing adxl362 accelerometer with ANNA-B112 ublox evaluation board (nrf52832) ,receive_buffer returns only 0xff on every spi_read

I am trying to interface adxl362 sensor with ANNA-B112 evaluation board.i am trying to read the part id to check the connection. The code is pasted below.

nrf_drv_spi_config_t spi_config = NRF_DRV_SPI_DEFAULT_CONFIG;
spi_config.ss_pin = 27;
spi_config.miso_pin = 2;
spi_config.mosi_pin = 3;
spi_config.sck_pin = 5;
spi_config.frequency = NRF_DRV_SPI_FREQ_125K;

APP_ERROR_CHECK(nrf_drv_spi_init(&spi, &spi_config, spi_event_handler, NULL));

m_tx_buf[0] = 0x0b;
m_tx_buf[1] = 0x02;
m_tx_buf[2] =0;
spi_xfer_done = false;


APP_ERROR_CHECK(nrf_drv_spi_transfer(&spi, m_tx_buf, 3, m_rx_buf, 3));
nrf_delay_ms(1000);

Parents Reply Children
No Data
Related