483 views|2 replies

364

Posts

0

Resources
The OP
 

[RISC-V] Milk-v development board gyroscope lsm6dsr i2c driver module and test program [Copy link]

邀请:@chenzhufly   @spacexplorer   @wsdymg   @bigbat   参与回复

Encountering permissions issues

sudo chmod 777 -R /home/dar/riscv/milkv/duo-buildroot-sdk

Loading configuration and environment

cd build/
source milkvsetup.sh
defconfig cv1800b_milkv_duo_sd

Compiling the driver requires compiling the kernel first

build_all

Device Tree

build\boards\cv180x\cv1800b_milkv_duo_sd\dts_riscv\cv1800b_milkv_duo_sd.dts
&i2c3 {
    status = "okay";
    lsm6dsr:lsm6dsr@6b {
        compatible = "litchicheng,lsm6dsr";
        reg = <0x6b>;
        status = "okay";
    };  
};

Driver warehouse address

[riscv_milkv-duo]( https://github.com/LitchiCheng/riscv_milkv-duo)
test results

[root@milkv]~# insmod i2c-lsm6dsr.ko
[root@milkv]~# lsmod
Module                  Size  Used by    Tainted: GF
i2c_lsm6dsr             4450  0
cvi_vc_driver         879138  0 [permanent]
cv180x_jpeg            25220  1 cvi_vc_driver,[permanent]
cv180x_vcodec          28451  2 cvi_vc_driver,cv180x_jpeg,[permanent]
cv180x_tpu             32041  0 [permanent]
cv180x_clock_cooling     5953  0 [permanent]
cv180x_thermal          3404  0
cv180x_rgn            100809  0 [permanent]
cv180x_dwa             48669  0 [permanent]
cv180x_vpss           280938  0 [permanent]
cv180x_vi             338826  0 [permanent]
snsr_i2c                9341  0 [permanent]
cvi_mipi_rx            54306  0 [permanent]
cv180x_fast_image      32955  0 [permanent]
cv180x_rtos_cmdqu      25922  1 cv180x_fast_image,[permanent]
cv180x_base            96472  8 cvi_vc_driver,cv180x_rgn,cv180x_dwa,cv180x_vpss,cv180x_vi,snsr_i2c,cvi_mipi_rx,cv180x_rtos_cmdqu,[permanent]
cv180x_sys             64161  7 cvi_vc_driver,cv180x_rgn,cv180x_dwa,cv180x_vpss,cv180x_vi,cv180x_fast_image,cv180x_base,[permanent]
[root@milkv]~# ls /dev
bus             cvi_vc_dec3     cvitekaadc      ion             stderr
console         cvi_vc_dec4     cvitekadac      kmsg            stdin
cvi-base        cvi_vc_dec5     fd              log             stdout
cvi-dwa         cvi_vc_dec6     full            lsm6dsr         tty
cvi-fast-image  cvi_vc_dec7     gpiochip0       mem             ttyS0
cvi-mipi-rx     cvi_vc_dec8     gpiochip1       mmcblk0         ttyS1
cvi-rgn         cvi_vc_enc0     gpiochip2       mmcblk0p1       ttyS2
cvi-rtos-cmdqu  cvi_vc_enc1     gpiochip3       mmcblk0p2       ttyS3
cvi-sys         cvi_vc_enc2     gpiochip4       null            ttyS4
cvi-tpu0        cvi_vc_enc3     hwrng           ptmx            urandom
cvi-vi          cvi_vc_enc4     i2c-0           pts             zero
cvi-vpss        cvi_vc_enc5     i2c-1           random
cvi_vc_dec0     cvi_vc_enc6     i2c-2           rfkill
cvi_vc_dec1     cvi_vc_enc7     i2c-3           shm
cvi_vc_dec2     cvi_vc_enc8     i2c-4           snd


ADC value:
gx = 20, gy = -31, gz = -12
ax = 836, ay = -9022, az = -13048
temp = 0
TRUE value:act gx = 1.40°/S, act gy = -2.17°/S, act gz = -0.84°/S
act ax = 0.41g, act ay = -4.41g, act az = -6.37g

ADC value:
gx = 27, gy = -34, gz = -22
ax = 820, ay = -9004, az = -13021
temp = 0
TRUE value:act gx = 1.89°/S, act gy = -2.38°/S, act gz = -1.54°/S
act ax = 0.40g, act ay = -4.40g, act az = -6.36g

Video Explanation


This post is from Linux and Android

Latest reply

The last video explanation is great   Details Published on 2024-4-22 07:33

6593

Posts

0

Resources
2
 

The last video explanation is great

This post is from Linux and Android

Comments

Thank you for your support, let's make progress together  Details Published on 2024-4-22 10:07
 
 

364

Posts

0

Resources
3
 
Jacktang posted on 2024-4-22 07:33 The last video explanation is very exciting

Thank you for your support, let's make progress together

This post is from Linux and Android
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list