zephyr icon indicating copy to clipboard operation
zephyr copied to clipboard

STM32 die temperature sensor driver rework

Open mathieuchopstm opened this issue 1 year ago • 2 comments

This PR is a rework of the STM32 die temperature sensor driver.

The main reason for this PR is the upcoming introduction of STM32WB0 series, which has a few differences from other series (calibration data is 32-bit, formula is different, sensor is always enabled) - with this reworked driver, the main differences are factored out, so the series can be easily integrated.

While at it, the driver and bindings have been heavily documented, and modified to follow the Reference Manuals more closely.

This PR also fixes errors in certain SoCs' DTSI (STM32030/STM32070 and STM32100 lines, STM32F2 series) and a few MISRA Rule 20.9 violations (using #if xxx on potentially undefined macros, instead of #if defined(xxx)).

mathieuchopstm avatar Aug 27 '24 09:08 mathieuchopstm

CI failure is due to mistake in patch (dietemp for STM32F100 lines is not placed properly), will fix in V2.

mathieuchopstm avatar Aug 27 '24 14:08 mathieuchopstm

Patch v2:

  • fixes all points raised in comments
    • Properties are made required in dedicated commit (message explains why DTSI modification is not needed)
    • Use snake case everywhere
    • Split mixed modifications to different commits
  • fixes CI failure
    • move dietemp node in proper place in stm32f100Xb.dtsi binding
  • regroups avgslope property in a single binding
  • reworks all descriptions in bindings
    • also removes ultraverbose listings in descriptions...

mathieuchopstm avatar Aug 28 '24 12:08 mathieuchopstm

CI failures unrelated to PR content (twister failure caused by Renesas board, Compliance Checks seems to just be broken...)

mathieuchopstm avatar Aug 28 '24 15:08 mathieuchopstm

Commits 1~3 are minor bugfixes that I think are eligible for backport to 3.7 - should they be dropped from this PR and contributed by a separate PR for this purpose, if applicable?

mathieuchopstm avatar Sep 03 '24 15:09 mathieuchopstm

@MaureenHelm Would you mind having a look ?

erwango avatar Sep 16 '24 15:09 erwango

@MaureenHelm Kind reminder

erwango avatar Oct 01 '24 08:10 erwango