You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/03/21 04:07:15 UTC

[incubator-nuttx] branch master updated: fixed mpu9250 not work on i2c bus issue.

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 7fbadb5  fixed mpu9250 not work on i2c bus issue.
7fbadb5 is described below

commit 7fbadb5c16fc78746cd77beff6f6d3433ba89817
Author: smartether <sm...@gmail.com>
AuthorDate: Mon Mar 21 10:11:50 2022 +0800

    fixed mpu9250 not work on i2c bus issue.
    
    1,set rp2040 FIFO_MAX_SIZE to 16.ref: pico sdk ->
    static inline size_t i2c_get_write_available(i2c_inst_t *i2c) {
    const size_t IC_TX_BUFFER_DEPTH = 16;
    return IC_TX_BUFFER_DEPTH - i2c_get_hw(i2c)->txflr;
    }
---
 arch/arm/src/rp2040/rp2040_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/src/rp2040/rp2040_i2c.c b/arch/arm/src/rp2040/rp2040_i2c.c
index 338e07e..e9d2cb8 100644
--- a/arch/arm/src/rp2040/rp2040_i2c.c
+++ b/arch/arm/src/rp2040/rp2040_i2c.c
@@ -55,7 +55,7 @@
 #define I2C_TIMEOUT  (20*1000/CONFIG_USEC_PER_TICK) /* 20 mS */
 
 #define I2C_DEFAULT_FREQUENCY 400000
-#define I2C_FIFO_MAX_SIZE	    32
+#define I2C_FIFO_MAX_SIZE	    16
 
 #define I2C_INTR_ENABLE ((RP2040_I2C_IC_INTR_STAT_R_STOP_DET) | \
                          (RP2040_I2C_IC_INTR_STAT_R_TX_ABRT)  | \