Skip to content

Commit 857e731

Browse files
committed
put calibration temperature back to 130 for merging
1 parent 5dfb839 commit 857e731

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/signature.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,14 @@ impl VrefCal {
9393
}
9494

9595
/// A temperature reading taken at 30°C stored at the factory
96-
/// aka TS_CAL1
96+
/// aka TS_CAL1 in reference manual
9797
#[derive(Debug)]
9898
#[repr(C)]
9999
pub struct VtempCal30(u16);
100100
define_ptr_type!(VtempCal30, 0x1FFF_75A8);
101101

102102
impl VtempCal30 {
103-
/// TS_CAL1_TEMP
103+
/// aka TS_CAL1_TEMP in reference manual
104104
pub const TEMP_DEGREES: u16 = 30;
105105
/// Read calibration value
106106
pub fn read(&self) -> u16 {
@@ -109,16 +109,17 @@ impl VtempCal30 {
109109
}
110110

111111
/// A temperature reading taken at 130°C stored at the factory
112-
/// aka TS_CAL2
112+
/// aka TS_CAL2 in reference manual
113113
#[derive(Debug)]
114114
#[repr(C)]
115115
pub struct VtempCal130(u16);
116116
define_ptr_type!(VtempCal130, 0x1FFF_75CA);
117117

118118
impl VtempCal130 {
119-
/// TS_CAL2_TEMP
120-
/// TODO: this is 110 for L47x, 130 for L43x
121-
pub const TEMP_DEGREES: u16 = 110;
119+
/// aka TS_CAL2_TEMP in reference manual
120+
/// Feature gate Required: this is 110 for L47x/L48x, 130 for other L4s according to
121+
/// https://github.com/STMicroelectronics/STM32CubeL4/blob/5e1553e07706491bd11f4edd304e093b6e4b83a4/Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_adc.h#L352-L356
122+
pub const TEMP_DEGREES: u16 = 130;
122123
/// Read calibration value
123124
pub fn read(&self) -> u16 {
124125
self.0

0 commit comments

Comments
 (0)