FelipeMdeO commented on code in PR #20231:
URL: https://github.com/apache/nuttx/pull/20231#discussion_r4072907001


##########
drivers/sensors/lsm6ds3trc_uorb.c:
##########
@@ -1583,6 +1672,88 @@ int lsm6ds3trc_register(FAR struct i2c_master_s *i2c, 
uint8_t addr,
       goto unreg_gyro;
     }
 
+  /* Put the sensor into its power-on register state before anything else
+   * touches it, and in particular before the interrupt is attached.
+   *
+   * The LSM6DS3TR-C has its own supply and its own reset: an MCU reset
+   * (watchdog, RTS pin, esptool, `reboot`) does not reset the sensor, so
+   * it comes up still holding whatever the previous session configured.
+   * For this driver that means INT1_CTRL.INT1_FTH still set and a FIFO
+   * still over its watermark -- i.e. INT1 asserted high, immediately, at
+   * registration time.
+   *
+   * INT1 is level-triggered (ONHIGH; see the comment in

Review Comment:
   You're right, my mistake -- this comment leaked ESP32S3-specific things 
(esptool/RTS-pin wording, a literal path to a specific board file, and the 
espressif-arch `esp_gpioirqenable()`) into otherwise generic driver code. Fixed 
in #20242, reworded around the actual generic mechanism this driver uses 
(`config->attach()`) and dropped the board-specific bring-up anecdote entirely.



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

Reply via email to