-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LIS2DH SPI Support #22348
Comments
OK, I'll start next week. |
Awesoe thanks for the help. Did some work on an older version and git it work, which i added to the newest driver version. The sensor is now working. |
Fine! |
It works sometimes and the interrupts dont seem to work. |
@theBASTI0N |
@avisconti Thanks for the help |
Have you had the chance to give it a try? |
lis2dh.h:12:10: fatal error: misc/util.h: No such file or directory |
How is it possible? |
Hey, Got it to build and is working great. Havn't been able to test the interrupt trigger. I added CONFIG_LIS2DH_TRIGGER_OWN_THREAD=y to my prj.conf then I get errors. The errors I am getting: In function 'setup_int1': It may be due to my board dts but I haven't been able to find an example for using CS pins with SPI. The board files are at : https://github.com/theBASTI0N/zephyr-ruuvi |
I think you are using an old version: the GPIO APIs have been modified recently. It seems your zephyr version is still using the old one. Please go in sync |
I used the x_nucleo_iks01a3 shield on top of nucleo_f401re board, plugged together thru arduino. &arduino_spi {
}; |
If i use
I get this error:
|
Sorry, I'm completeley confused. Let me try to recap everything.
Thanks |
Hey, I am able to use the LIS2DH through SPI and am using the LIS2DH sample by changing it to use SPI instead of I2C. When I enable the trigger it fails to build. I have Zephyr version 2.1.99. |
That's why it is not building. |
Add I2C and SPI bus communication routines in separate files, and register one or the other as read/write callbacks based on bus selection in DTS. This commit is fixing issue zephyrproject-rtos#22348 as well, as the SPI part is handling in the proper way the CS GPIO part. Signed-off-by: Armando Visconti <[email protected]>
Add I2C and SPI bus communication routines in separate files, and register one or the other as read/write callbacks based on bus selection in DTS. This commit is fixing issue #22348 as well, as the SPI part is handling in the proper way the CS GPIO part. Signed-off-by: Armando Visconti <[email protected]>
Add I2C and SPI bus communication routines in separate files, and register one or the other as read/write callbacks based on bus selection in DTS. This commit is fixing issue zephyrproject-rtos#22348 as well, as the SPI part is handling in the proper way the CS GPIO part. Signed-off-by: Armando Visconti <[email protected]>
The LIS2DH works well with I2C devices such as the Thingy52, however when testing with a Ruuvitag which has the the sensor on the SPI bus readings are wrong.
The driver looks like it doesn't not configure the SPI bus correctly as it missues the CS controller and CS pin configurations. An example of the correct configuration type can be found for the lis2ds12 driver.
Steps to reproduce the behavior:
CONFIG_USE_SEGGER_RTT=y
CONFIG_RTT_CONSOLE=y
CONFIG_UART_CONSOLE=n
There is no error in stating the device cannot be found, however the reading are wrong.
The output is:
SEGGER J-Link V6.60f - Real time terminal output
J-Link OB-SAM3U128-V2-NordicSemi compiled Jan 7 2019 14:07:15 V1.0, SN=682061953
Process: JLinkExe
*** Booting Zephyr OS build zephyr-v2.1.0-1478-g702ebb321225 ***
Polling at 0.5 Hz
#1 @ 12600 ms: x -0.009576 , y -0.009576 , z -0.009576
#2 @ 13901 ms: x -0.009576 , y -0.009576 , z -0.009576
#3 @ 15202 ms: x -0.009576 , y -0.009576 , z -0.009576
#4 @ 16503 ms: x -0.009576 , y -0.009576 , z -0.009576
#5 @ 17804 ms: x -0.009576 , y -0.009576 , z -0.009576
#6 @ 19106 ms: x -0.009576 , y -0.009576 , z -0.009576
#7 @ 20407 ms: x -0.009576 , y -0.009576 , z -0.009576
#8 @ 21708 ms: x -0.009576 , y -0.009576 , z -0.009576
#9 @ 23009 ms: x -0.009576 , y -0.009576 , z -0.009576
#10 @ 24310 ms: x -0.009576 , y -0.009576 , z -0.009576
The makes using the lis2dh12 on the ruuvitag almost impossible.
Environment
The text was updated successfully, but these errors were encountered: