Onboard Temperature from nRF52840

Feature request:Onboard Temperature from nRF52840

I know the nRF52840 has a really accurate onboard temperature sensor. It would be great if we could get the temperature of the MCU.
When combined with plenty of sleep cycles (keep the MCU cold) I’ve found these temperatures to be within a few degrees of atmosphere.
Here are the registry details for the MCU

I don’t really know much about the particle core but this should be an easy feature to implement.

This should work on all Gen 3 devices (Argon, Boron, Xenon, B Series SoM):

#include "Particle.h"

// Optional:

SerialLogHandler logHandler;

void setup() {

void loop() {
	// Get die temperature in 0.25 degrees Celsius.  Takes 50 us to complete.
	int32_t temp;
	uint32_t res = sd_temp_get(&temp);
	if (res == NRF_SUCCESS) {
		float tempC = (float)temp / 4;
		float tempF = tempC * 9 / 5 + 32;
		Log.info("tempC=%.1f tempF=%.1f", tempC, tempF);
	else {
		Log.error("failed to get temperature");



0000011269 [app] INFO: tempC=29.8 tempF=85.6
0000013271 [app] INFO: tempC=29.8 tempF=85.6

Killer. Got it working right off the bat.
Would be great if this was a system call or advanced I/O.