Skip to content

add digital temperature sensor to health packet - #2414

Merged
probablyanasian merged 9 commits into
masterfrom
dts
Jul 27, 2026
Merged

add digital temperature sensor to health packet#2414
probablyanasian merged 9 commits into
masterfrom
dts

Conversation

@probablyanasian

Copy link
Copy Markdown
Contributor

No description provided.

@probablyanasian
probablyanasian marked this pull request as ready for review July 20, 2026 17:33
@probablyanasian
probablyanasian marked this pull request as draft July 20, 2026 17:45
@probablyanasian
probablyanasian marked this pull request as ready for review July 20, 2026 21:18
Comment thread python/__init__.py Outdated
"sbu2_voltage_mV": a[23],
"som_reset_triggered": a[24],
"sound_output_level": a[25],
"temperature_c": a[26],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i wouldn't put C here, we generally don't include units if it's the SI unit

Comment thread board/stm32h7/lldts.h Outdated
#define DTS_HSREF_DIV 64U // calibration counter must run below 1MHz

void dts_init(void) {
RCC->APB4ENR |= RCC_APB4ENR_DTSEN;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this should go in peripherals.h

Comment thread board/stm32h7/lldts.h Outdated
// continuous measurements w/ sw trigger
register_set_bits(&(DTS->CFGR1), DTS_CFGR1_TS1_START);

print(" DTS cal: T0VALR1 0x"); puth(DTS->T0VALR1); print(", RAMPVALR 0x"); puth(DTS->RAMPVALR); print("\n");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

remove this

Comment thread board/sys/power_saving.h
register_clear_bits(&(DTS->CFGR1), DTS_CFGR1_TS1_START);
register_clear_bits(&(DTS->CFGR1), DTS_CFGR1_TS1_EN);
register_set(&(DTS->CFGR1), 0U, (DTS_CFGR1_TS1_SMP_TIME_Msk | DTS_CFGR1_REFCLK_SEL_Msk | DTS_CFGR1_Q_MEAS_OPT_Msk | DTS_CFGR1_HSREF_CLK_DIV_Msk | DTS_CFGR1_TS1_INTRIG_SEL_Msk));
RCC->APB4ENR &= ~(RCC_APB4ENR_DTSEN);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we just clear all the APB peripherals together? @elkoled

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yes that is fine

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@probablyanasian can you make a separate PR for that and we merge that first?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Table 31 of RM0468 says that in stop mode (VOS5), all peripheral clocks are OFF. Since all the other APB peripherals are clocks, I don't think anything else needs to be explicitly turned off.

@adeebshihadeh

Copy link
Copy Markdown
Contributor

Also why are the HITL tests failing?

@probablyanasian

Copy link
Copy Markdown
Contributor Author

Someone moved stuff and inadvertently unplugged the jungle.

@adeebshihadeh

Copy link
Copy Markdown
Contributor

LGTM once HITL CI passes

@probablyanasian
probablyanasian merged commit dd8a5b3 into master Jul 27, 2026
5 checks passed
@probablyanasian
probablyanasian deleted the dts branch July 27, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants