2022-06-13 08:35 AM
Good morning, I have developed one board with CC2640 running to 1.8V (External Regulator Mode), this board has one LIS2DH12TR with VDD & VDD_IO to 1.8V, the communication is SPI, when I read register "WHO_AM_I" (0x0F) I get 255, not matter what register, clock or pol & pha I set... I always get 255, if CS=0 then this chip works as SPI and the interface 4-wire is default, what am I making bad?
I hope somebody can to help me
Regards
Solved! Go to Solution.
2022-06-17 09:17 AM
Good afternoon, I solved the problem 3 days ago, indeed the sensor work with SPI Mode3 (POL=1 & PAH=1). The register 0x1E has to set one bit to disable internal pull-up in SDO (it's enabled by default), I have tested chip to 1.8V reading single (dummy reg) and multibytes (0x1E until 0x25) and match the values with default values.
I had to handle CS by software prev and after call SPI_transfer(), I hope this helps someone than works with CC2640.
-Jose
2022-06-17 08:57 AM
Hi @JCorr.1 ,
can you please share the scope pattern of the SPI communication?
Please note that ST sensors generally work with 16 bit SPI Mode3.
Can you check if the device is working in I2C mode, in order to exclude a device-related issue?
-Eleon
2022-06-17 09:17 AM
Good afternoon, I solved the problem 3 days ago, indeed the sensor work with SPI Mode3 (POL=1 & PAH=1). The register 0x1E has to set one bit to disable internal pull-up in SDO (it's enabled by default), I have tested chip to 1.8V reading single (dummy reg) and multibytes (0x1E until 0x25) and match the values with default values.
I had to handle CS by software prev and after call SPI_transfer(), I hope this helps someone than works with CC2640.
-Jose