Re: [I] BMP280 first read BUG [nuttx]

2025-09-09 Thread via GitHub


linguini1 commented on issue #12421:
URL: https://github.com/apache/nuttx/issues/12421#issuecomment-3272143473

   I experience this issue as well. I might be able to help troubleshoot it 
once I am done with I2C for the Pi4B


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [I] BMP280 first read BUG [nuttx]

2024-05-29 Thread via GitHub


acassis commented on issue #12421:
URL: https://github.com/apache/nuttx/issues/12421#issuecomment-2138184338

   @raiden00pl it makes no difference.
   
   Modification:
   ```
   $ git diff
   diff --git a/drivers/sensors/bmp280_uorb.c b/drivers/sensors/bmp280_uorb.c
   index 7acdb664d9..62e195b825 100644
   --- a/drivers/sensors/bmp280_uorb.c
   +++ b/drivers/sensors/bmp280_uorb.c
   @@ -632,6 +632,8 @@ static int bmp280_fetch(FAR struct sensor_lowerhalf_s 
*lower,
  up_mdelay(6);
}

   +  up_mdelay(10);
   +
  /* Read pressure & data */

  ret = bmp280_getregs(priv, BMP280_PRESS_MSB, buf, 6);
   ```
   
   Before modification:
   
   ```
   NuttShell (NSH) NuttX-12.5.1

   nsh> dmesg
   board_bmp280_initialize: Initializing BMP280!
   bmp280_checkid: devid: 0x58
   bmp280_initialize: T1 = 27551
   bmp280_initialize: T2 = 25860
   bmp280_initialize: T3 = 50
   bmp280_initialize: P1 = 38045
   bmp280_initialize: P2 = -10494
   bmp280_initialize: P3 = 3024
   bmp280_initialize: P4 = 9513
   bmp280_initialize: P5 = -303
   bmp280_initialize: P6 = -7
   bmp280_initialize: P7 = 8588
   bmp280_initialize: P8 = -6299
   bmp280_initialize: P9 = -242
   sensor_custom_register: Registering /dev/uorb/sensor_baro0
   bmp280_register: BMP280 driver loaded successfully!
   nsh> bmp280
   Absolute pressure [hPa] = 609.820007
   Temperature [C] = 25.74
   nsh> bmp280
   Absolute pressure [hPa] = 1012.669983
   Temperature [C] = 24.13
   nsh>
   ```
   
   After modification:
   
   ```
   NuttShell (NSH) NuttX-12.5.1
   nsh> dmesg
   board_bmp280_initialize: Initializing BMP280!
   bmp280_checkid: devid: 0x58
   bmp280_initialize: T1 = 27551
   bmp280_initialize: T2 = 25860
   bmp280_initialize: T3 = 50
   bmp280_initialize: P1 = 38045
   bmp280_initialize: P2 = -10494
   bmp280_initialize: P3 = 3024
   bmp280_initialize: P4 = 9513
   bmp280_initialize: P5 = -303
   bmp280_initialize: P6 = -7
   bmp280_initialize: P7 = 8588
   bmp280_initialize: P8 = -6299
   bmp280_initialize: P9 = -242
   sensor_custom_register: Registering /dev/uorb/sensor_baro0
   bmp280_register: BMP280 driver loaded successfully!
   nsh> bmp280
   Absolute pressure [hPa] = 609.820007
   Temperature [C] = 25.74
   nsh>
   ```


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [I] BMP280 first read BUG [nuttx]

2024-05-29 Thread via GitHub


fdcavalcanti commented on issue #12421:
URL: https://github.com/apache/nuttx/issues/12421#issuecomment-2137250671

   That's odd.. I don't remember seeing that.
   I'll have a look in the datasheet.
   Maybe a quick fix would be running a read right after driver instance is 
created. But sure, we should understand the root cause.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [I] BMP280 first read BUG [nuttx]

2024-05-29 Thread via GitHub


raiden00pl commented on issue #12421:
URL: https://github.com/apache/nuttx/issues/12421#issuecomment-2136799887

   You can check if the time between changing the sensor mode and reading the 
data is correct. Try to add mdelay(10) here: 
https://github.com/apache/nuttx/blob/3cc65d5d35e779d64acc8a2a0f47fbe65b305c61/drivers/sensors/bmp280_uorb.c#L635
 


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]