Skip to content

Conversation

@rbuisson-invn
Copy link
Contributor

drivers: sensor: icp201xx: supports icp201xx sensors
dts: supports icp201xx invn pressure sensor
samples: sensor: pressure_polling: barometric pressure, temperature and altitude generic sample
samples: sensor: pressure_interrupt: barometric pressure sensor interrupts generic sample
module: HAL TDK module

Adds official TDK Invensense Inc. driver in TDK HAL module for icp201xx sensor.
Add generic samples supporting this driver.
Validated with custom setup: nrf52dk_nrf52832 + icp201xx EVB board
Build ok by running:
west twister -T samples\sensor\pressure_polling -T samples\sensor\pressure_interrupt -p nrf52dk/nrf52832

Signed-off-by: Remi Buisson [email protected]

@zephyrbot
Copy link

zephyrbot commented Jan 13, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff

All manifest checks OK

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@zephyrbot zephyrbot added manifest manifest-hal_tdk DNM This PR should not be merged (Do Not Merge) labels Jan 13, 2025
@rbuisson-invn rbuisson-invn force-pushed the TDK_Invensense_icp201xx_pressure_sensor branch 7 times, most recently from 92248ff to 4e866f3 Compare January 16, 2025 09:36
@zephyrbot zephyrbot removed the DNM This PR should not be merged (Do Not Merge) label Jan 16, 2025
@rbuisson-invn rbuisson-invn force-pushed the TDK_Invensense_icp201xx_pressure_sensor branch from 4e866f3 to 90baab8 Compare January 16, 2025 13:19
@rbuisson-invn
Copy link
Contributor Author

Hi @MaureenHelm ,
This PR is waiting a review for 3 weeks.
It is blocking further developments at our side.
I know it's quite a big chunk of code, but we would be very grateful if you could take a look at it.
Regards,

Comment on lines 22 to 46
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider using the dsp.h q31_t here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At some point, it requires pure floats to compute logarithm.
I don't think dsp.h provides such support.

Copy link
Contributor

@yperess yperess Feb 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it? The DSP header provide mechanism for multiplying fixed points which can be just as accurate. I'm OK with you using floats, but it does make the driver much more compute header when CONFIG_FPU=n.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't think you actually need a float, you should be able to use a fixed point API.

@rbuisson-invn rbuisson-invn force-pushed the TDK_Invensense_icp201xx_pressure_sensor branch from 90baab8 to aedacd0 Compare February 10, 2025 09:52
@rbuisson-invn rbuisson-invn force-pushed the TDK_Invensense_icp201xx_pressure_sensor branch from b6dd1a6 to a22f192 Compare April 3, 2025 08:06
teburd
teburd previously approved these changes Apr 3, 2025
ubieda
ubieda previously approved these changes Apr 3, 2025
@rbuisson-invn
Copy link
Contributor Author

rbuisson-invn commented Apr 4, 2025

@yperess, your review status is still on "request changes", could you please review my answers and approve if they make sense to you?

yperess
yperess previously approved these changes Apr 4, 2025
@rbuisson-invn
Copy link
Contributor Author

@yperess Thanks !
@MaureenHelm Could you please proceed with the merge of this PR if everything is ok for you?

MaureenHelm
MaureenHelm previously approved these changes Apr 7, 2025
icp201xx are barometric pressure and temperature sensors.
https://invensense.tdk.com/smartpressure

Signed-off-by: Remi Buisson <[email protected]>
Use official TDK Invensense driver for icp201xx sensor in tdk_hal module.

Signed-off-by: Remi Buisson <[email protected]>
Add I2C and SPI variants for icp201xx.

Signed-off-by: Remi Buisson <[email protected]>
Polls and reports pressure, temperature and altitude data

Signed-off-by: Remi Buisson <[email protected]>
Reports generic barometric sensor interrupts
* Data ready interrupt
* Pressure threshold interrupt
* Pressure changed interrupt

Signed-off-by: Remi Buisson <[email protected]>
@rbuisson-invn rbuisson-invn dismissed stale reviews from MaureenHelm, yperess, ubieda, and teburd via e7f9806 April 7, 2025 12:22
@rbuisson-invn rbuisson-invn force-pushed the TDK_Invensense_icp201xx_pressure_sensor branch from a22f192 to e7f9806 Compare April 7, 2025 12:22
@github-actions github-actions bot requested a review from sriccardi-invn April 7, 2025 12:23
@rbuisson-invn
Copy link
Contributor Author

@yperess @teburd @ubieda @MaureenHelm : This PR required a rebase after your validation, sorry to ask you again :(

@kartben kartben merged commit 6560f57 into zephyrproject-rtos:main Apr 7, 2025
24 checks passed
@rbuisson-invn
Copy link
Contributor Author

@kartben Thanks ;)

@kartben
Copy link
Contributor

kartben commented Apr 7, 2025

@kartben
Copy link
Contributor

kartben commented Apr 7, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants