diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2020-05-18 16:46:41 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2020-05-18 16:46:41 -0700 |
| commit | cf690bd390bf5e970bdc0712063c8ea32d3b6b5a (patch) | |
| tree | 6f6e8d7a98d65ce54322c06c7d5d665f001bcb90 /ports/mimxrt10xx/common-hal/microcontroller/Processor.c | |
| parent | a57da6b808b53e1a23aff327710a0e365ecc6acc (diff) | |
| parent | 32617d5f2fb051d3adf55bf0f4f00f10cc5d74aa (diff) | |
Merge remote-tracking branch 'adafruit/master' into esp32s2
Diffstat (limited to 'ports/mimxrt10xx/common-hal/microcontroller/Processor.c')
| -rw-r--r-- | ports/mimxrt10xx/common-hal/microcontroller/Processor.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ports/mimxrt10xx/common-hal/microcontroller/Processor.c b/ports/mimxrt10xx/common-hal/microcontroller/Processor.c index 0c8131ef4..f3a578014 100644 --- a/ports/mimxrt10xx/common-hal/microcontroller/Processor.c +++ b/ports/mimxrt10xx/common-hal/microcontroller/Processor.c @@ -37,11 +37,13 @@ float common_hal_mcu_processor_get_temperature(void) { tempmon_config_t config; TEMPMON_GetDefaultConfig(&config); + OCOTP_Init(OCOTP, CLOCK_GetFreq(kCLOCK_IpgClk)); TEMPMON_Init(TEMPMON, &config); TEMPMON_StartMeasure(TEMPMON); const float temp = TEMPMON_GetCurrentTemperature(TEMPMON); TEMPMON_Deinit(TEMPMON); + OCOTP_Deinit(OCOTP); return temp; } |
