2017-12-19 08:50 AM
Hello,
I am using nRF SDK 12.2.0 , with nRF52832 on pca10040 hardware, and working with the example in examples/peripheral/spi/main.c to develop a driver for LIS2DE12. When I write a hexadecimal value I find a problem. I checked with the scope that CS, MOSI and SCK are correct, but I get 0xFF on MISO line .
Any ideas what to check?
#lis2de12 #miso #spi #nrf522017-12-20 01:43 AM
You didn't attach the screenshot from logic analyzer, but from you personal message I see that the communication is OK, I see that the LIS2DE12 responds correctly (0x33) to the who_am_i read request (0x8F). Firts 8 clock cycles the SPI master sends the request and next 8 clock cycles slave sends the respond. Please check the SPI communication diagrams in the datasheet.
2017-12-21 02:58 AM
Thank you !
the problem is that I can read the default values of the registers, but when I try to write and read the register at the same time but I encounter a problem (a byte of ORC bits which is added during the write)this a example CTRL_REG1
Write funcion
read function
2017-12-21 06:40 AM
The problems are caused by your SPI master (the microcontroller). I'm sorry I can't help you because I don't know
nRF52832
device.2017-12-28 07:05 AM
Thank you ,
I solved the problem