AnsweredAssumed Answered

LIS2DH SPI not Working

Question asked by koppal.madhusudan on Apr 2, 2016
Latest reply on May 17, 2016 by beaster.michael
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

Outcomes