Question
LIS2DH SPI not Working
Posted on April 02, 2016 at 11:15
I am using LIS2DH spi to communicate with nrf51822. I have set CPOL =1(active Low) and CPHA=1(trailing). I am able to see CS , MOSI and CLOCK properly but MISO pin is always high.Below is my code.
nrf_gpio_pin_clear(SPIM0_SS_PIN); NRF_SPI0->TXD = 0x8F; NRF_SPI0->TXD = 0x00; while(NRF_SPI0->EVENTS_READY == 0){} NRF_SPI0->EVENTS_READY = 0; receive_rx[0] = NRF_SPI0->RXD; receive_rx[1] = NRF_SPI0->RXD; nrf_gpio_pin_set(SPIM0_SS_PIN); can someone help me in debugging this.It would be a great help #lis2dh-spi-configuration