You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/05/03 05:37:08 UTC

[GitHub] [incubator-nuttx] btashton opened a new pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

btashton opened a new pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646


   ## Summary
   This adds i2c support to the NUCLEO-F676ZI board and optionally includes support for an mpu60x0 IMU to be attached to it.
   
   Additionally it fixes a bad bug in the mpu60x0 driver where bitmasks were not computed correctly causing incorrect settings to be set.
   
   ## Impact
   * mpu60x0 driver not produces expected results
   * board optionally includes this driver now.
   
   ## Testing
   
   ```
   NuttShell (NSH) NuttX-10.1.0-RC1
   nsh> uname -a
   NuttX 10.1.0-RC1 93f4526a4a-dirty May  2 2021 22:21:09 arm nucleo-144
   nsh> hexdump /dev/imu0 count=14
   /dev/imu0 at 00000000:
   0000: fe 7f ff 8d 0c 5a f0 c5 ff 75 ff b0 ff dc       .....Z...u....
   nsh> i2c dev -b 1 0x00 0x7f
        0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
   00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
   10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
   20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
   30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
   40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
   50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
   60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 
   70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
   nsh> 
   ```
   
   This hex dump can then be supplied to this python script to decode the IMU output:
   ```python
   rawdata = 'fe 7f ff 8d 0c 5a f0 c5 ff 75 ff b0 ff dc'
   data = struct.unpack(">7h",bytearray.fromhex(rawdata))
   
   temp = data[3]/340 + 36.5
   acel = [elm / 4096.0 for elm in data[0:3]]
   gyro = [elm / 32.8 for elm in data[4:7]]
   
   print(f'{temp}C\nacel: {acel}\ngyro: {gyro}')
   ```
   ```
   25.03235294117647C
   acel: [-0.093994140625, -0.028076171875, 0.77197265625]
   gyro: [-4.237804878048781, -2.439024390243903, -1.0975609756097562]
   ```
   
   This was also tested without the sensor connected to make sure that we do not hang (previously the mpu60x0 driver would hang forever if it was not found).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] yutaide commented on pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

Posted by GitBox <gi...@apache.org>.
yutaide commented on pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646#issuecomment-831680039


   > @yutaide also try enable `CONFIG_DEBUG_SENSORS_ERROR` to understand exactly in which point it is failing.
   
   @saramonteiro 
   Thank you for your advice. I'll try it after trying pull-up resistor.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] saramonteiro commented on pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

Posted by GitBox <gi...@apache.org>.
saramonteiro commented on pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646#issuecomment-831393574


   @yutaide also try enable `CONFIG_DEBUG_SENSORS_ERROR` to understand exactly in which point it is failing.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] btashton edited a comment on pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

Posted by GitBox <gi...@apache.org>.
btashton edited a comment on pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646#issuecomment-831681722


   Yep this module does not have pullups on SCL and SDA you need to provide those for i2c to work. I think you had mentioned the Arduino working with this but it has weak internal pullups enabled. 
   
   I recommend using 4.7k resistors if you can, but quite a range will work with most devices. 
   
   https://learn.sparkfun.com/tutorials/i2c/i2c-at-the-hardware-level


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] acassis commented on pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

Posted by GitBox <gi...@apache.org>.
acassis commented on pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646#issuecomment-831315360


   > @acassis
   > Thank you always.
   > I tried hexdump command but it failed (with error code 2).
   > 
   > I'm wondering if I need to configure extra option in I2C Driver Support in menuconfig.
   > I just enabled "I2C character driver" there.
   > I didn't enabled "I2C Slave", "Polled I2C", "Support I2C reset interface method", "Enable I2C trace debug", "I2C bitbang implementation", or I2C Multiplexer Support".
   
   Try to verify your MPU9250 module, double check if you wired it correctly (use the same pins that Brennan used in the above image), etc.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] yutaide commented on pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

Posted by GitBox <gi...@apache.org>.
yutaide commented on pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646#issuecomment-831240080


   @btashton 
   Will you see "/dev/i2c1" and "/dev/imu0" when you try "ls /dev" ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] btashton edited a comment on pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

Posted by GitBox <gi...@apache.org>.
btashton edited a comment on pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646#issuecomment-831055772


   The 9250 contains the 6050 (plus another chip for the compass), so I think this should work for you.
   
   Can you share what you see with:
   `i2c dev -b 1 0x00 0x7f`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] btashton commented on pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

Posted by GitBox <gi...@apache.org>.
btashton commented on pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646#issuecomment-831055772


   The 9250 contained the 6050 (plus another chip for the compass), so I think this should work for you.
   
   Can you share what you see with:
   `i2c dev -b 1 0x00 0x7f`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] yutaide commented on pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

Posted by GitBox <gi...@apache.org>.
yutaide commented on pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646#issuecomment-831708770


   @btashton 
   I put 4.7k pullup resistors on SCL and SDA like [this](https://twitter.com/ide_yuta/status/1389461771623280642?s=20).
   I can get "0x71" when I put __mpu_read_who_am_i(dev) in mpu_reset() in mpu60x0.c now.
   This always failed when I didn't put pullup resistors. But this time, it succeeded sometimes, and failed sometimes. (When it fails, I got 0xff.)
   
   Besides,
   I enabled I2C Debug Features ( I2C Error Output ). Then I always see an error below.
   ```
   stm32_i2c_process: ERROR: Waitdone timed out CR1: 0x00000011 CR2: 0x010100d0 status: 0x00008011
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] yutaide commented on pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

Posted by GitBox <gi...@apache.org>.
yutaide commented on pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646#issuecomment-831129055


   I got -11 as returned value of mpu60x0_register().


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] yutaide commented on pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

Posted by GitBox <gi...@apache.org>.
yutaide commented on pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646#issuecomment-831077533


   @btashton 
   This is the result.
   ```:
   nsh> i2c bus
    BUS   EXISTS?
   Bus 0: NO
   Bus 1: YES
   Bus 2: NO
   Bus 3: NO
   nsh> i2c dev -b 1 0x00 0x7f
        0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
   00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
   10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
   20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
   30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
   40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
   50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
   60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
   70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
   nsh> ls /dev
   /dev:
    console
    gpin0
    gpin1
    gpin2
    gpin3
    gpint8
    gpout4
    gpout5
    gpout6
    gpout7
    i2c1
    null
    ttyS0
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] saramonteiro commented on a change in pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

Posted by GitBox <gi...@apache.org>.
saramonteiro commented on a change in pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646#discussion_r625029381



##########
File path: boards/arm/stm32f7/nucleo-144/README.txt
##########
@@ -573,6 +573,8 @@ f7xx-evalos:
     - Configures nsh with advanced features such as autocompletion.
     - Configures the on-board LEDs to work with the 'leds' example app.
     - Configures the 'helloxx' example app.
+    - Adds character device for i2c1
+    - Trys to register mpu60x0 IMU to i2c1 

Review comment:
       ```suggestion
       - Tries to register mpu60x0 IMU to i2c1 
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] saramonteiro commented on a change in pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

Posted by GitBox <gi...@apache.org>.
saramonteiro commented on a change in pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646#discussion_r625031533



##########
File path: drivers/sensors/mpu60x0.c
##########
@@ -709,7 +710,12 @@ static int mpu_reset(FAR struct mpu_dev_s *dev)
 
   /* Awaken chip, issue hardware reset */
 
-  __mpu_write_pwr_mgmt_1(dev, PWR_MGMT_1__DEVICE_RESET);
+  ret = __mpu_write_pwr_mgmt_1(dev, PWR_MGMT_1__DEVICE_RESET);
+  if (ret != OK)
+    {
+      serr("Could not find mpu60x0!\n");

Review comment:
       ```suggestion
         snerr("Could not find mpu60x0!\n");
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] yutaide commented on pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

Posted by GitBox <gi...@apache.org>.
yutaide commented on pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646#issuecomment-831053610


   @btashton 
   > This adds i2c support to the NUCLEO-F676ZI board and optionally includes support for an mpu60x0 IMU to be attached to it.
   
   NUCLEO-F767ZI is correct.
   
   I'm also using Nucleo-F767ZI.
   i2c tool hasn't detected a sensor in my environment yet.
   errors I had gotten before seems to be fixed. 
   btw, I only have MPU9250 not MPU60x0 so the reason why I can't get good result may be difference of sensors or some my mistake.
   wiring is the same as yours. I believe that your yellow wire is SCL and blue one is SDA.
   
   Thank you very much.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] yutaide commented on pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

Posted by GitBox <gi...@apache.org>.
yutaide commented on pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646#issuecomment-831680724


   @btashton 
   The device is here. 
   https://strawberry-linux.com/catalog/items?code=12250
   Module's circuit diagram is in this pdf. (p.2)
   https://strawberry-linux.com/pub/mpu-9250-manual.pdf


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] btashton commented on pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

Posted by GitBox <gi...@apache.org>.
btashton commented on pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646#issuecomment-831395103


   > @yutaide also try enable `CONFIG_DEBUG_SENSORS_ERROR` to understand exactly in which point it is failing.
   
   It's failing on the actual i2c transaction, there is a bus failure that needs to be sorted before we can dig into the sensor issue. I am very suspicious it's just a pull-up resistor issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] btashton commented on pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

Posted by GitBox <gi...@apache.org>.
btashton commented on pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646#issuecomment-831180931


   
   > This is the result.
   > ```
   > nsh> i2c dev -b 1 0x00 0x7f
   >      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
   > 00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
   > 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
   > 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
   > 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
   > 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
   > 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
   > 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
   > 70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
   > ```
   
   This would indicate no I2C device at all was found on the bus (It tried addresses 0x00-0x7f).
   
    I would double check that everything is wired correctly and has power / enabled. Until the device shows up as it did in my example, the driver will not be able to register it.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] yutaide commented on pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

Posted by GitBox <gi...@apache.org>.
yutaide commented on pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646#issuecomment-831719373


   @btashton 
   It works now!
   sorry but it was my mistake. I've forgotten to connect a wire between VDDIO and ~CS on my module.
   after connecting them like [this](https://twitter.com/ide_yuta/status/1389471735892779010?s=20) , it works well. 
   
   As you said, pull-up resistors are needed. Without those resistors, sensor doesn't work. With those resistors, sensor works!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] yutaide commented on pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

Posted by GitBox <gi...@apache.org>.
yutaide commented on pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646#issuecomment-831253190


   @acassis 
   Thank you always.
   I tried hexdump command but it failed (with error code 2).
   
   I'm wondering if I need to configure extra option in I2C Driver Support in menuconfig.
   I just enabled "I2C character driver" there. 
   I didn't enabled "I2C Slave", "Polled I2C", "Support I2C reset interface method", "Enable I2C trace debug", "I2C bitbang implementation", or I2C Multiplexer Support".


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] btashton commented on pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

Posted by GitBox <gi...@apache.org>.
btashton commented on pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646#issuecomment-831681722


   Yep this module does not have pullups on SCL and SDA you need to provide those for i2c to work. I think you had mentioned the Arduino working with this but it has weak pullups. 
   
   I recommend using 4.7k resistors if you can, but quite a range will work with most devices. 
   
   https://learn.sparkfun.com/tutorials/i2c/i2c-at-the-hardware-level


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] acassis commented on pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

Posted by GitBox <gi...@apache.org>.
acassis commented on pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646#issuecomment-831246202


   > @btashton
   > Will you see "/dev/i2c1" and "/dev/imu0" when you try "ls /dev" ?
   
   Yes, note he used the command "hexdump /dev/imu0 count=14", if imu0 didn't exist at /dev/ that command should fail.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] yutaide commented on pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

Posted by GitBox <gi...@apache.org>.
yutaide commented on pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646#issuecomment-831682629


   @btashton 
   Brennan, 
   Thank you. I'm going to try pullup with 4.7k resistors.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] yutaide edited a comment on pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

Posted by GitBox <gi...@apache.org>.
yutaide edited a comment on pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646#issuecomment-831719373


   @btashton 
   It works now!
   sorry but it was my mistake. I've forgotten to connect a wire between VDDIO and ~CS on my module.
   after connecting them like [this](https://twitter.com/ide_yuta/status/1389471735892779010?s=20) , it works well. 
   (As for the device I'm using, VDDIO pin and ~CS pin have to be connected each other to select I2C.)
   
   As you said, pull-up resistors are needed. Without those resistors, sensor doesn't work. With those resistors, sensor works!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] acassis merged pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

Posted by GitBox <gi...@apache.org>.
acassis merged pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] yutaide edited a comment on pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

Posted by GitBox <gi...@apache.org>.
yutaide edited a comment on pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646#issuecomment-831129055


   I got -11 as returned value of mpu60x0_register().
   I got errors below too after I enabled I2C Debug features in menuconfig.
   ```:
   nsh> stm32_i2c_sendstart: RELOAD enabled: dcnt = 1 msgc = 2
   stm32_i2c_sendstart: Sending START: dcnt=1 msgc=2 flags=0x0040
   stm32_i2c_isr_process: ENTER: status = 0x00008201
   stm32_i2c_isr_process: ERROR: Invalid state detected, status 0x00000201
   stm32_i2c_isr_process: MSG: Shutting down I2C ISR
   stm32_i2c_isr_process: EXIT: status = 0x00000001
   stm32_i2c_process: Waitdone success: CR1: 0x00000010 CR2: 0x010100d0 status: 0x00000201
   stm32_i2c_process: priv->status: 0x00000201
   stm32_i2c_process: ERROR: I2C Arbitration Lost
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] btashton commented on pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

Posted by GitBox <gi...@apache.org>.
btashton commented on pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646#issuecomment-831379917


   @yutaide can you try putting something like a 4.7k-10k pull-up resistor on each of the i2c wires. It did not look like your breakout board included them and the stm32 GPIO configuration we use does not provide any pull-up as this is usually external. This would explain the error you are seeing.
   
   Do you have a link to the breakout you are using?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] btashton commented on pull request #3646: boards/stm32f7: Add i2c and mpu60x0 support to nucleo-144 and fix bitmask bug in mpu60x0

Posted by GitBox <gi...@apache.org>.
btashton commented on pull request #3646:
URL: https://github.com/apache/incubator-nuttx/pull/3646#issuecomment-831724945


   Ah great to hear.  You will not have the compass with this code the datasheet discusses how to talk to that (it's a AK8963 on the same chip that you have to talk to via the i2c_slv0 interface on the 6050 part you are already using). If you wanted to extend the driver that would be very welcome. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org