You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Implement hwCPUTemperature for NRF5 chip
Get temperature via NRF_TEMP->TEMP
* Fix hwCPUTemperature
Change Temperature type to int32_t
* Implement address anomalies
* Replace wait with delay
NRF_TEMP->TASKS_START = 1; /** Start the temperature measurement. */
533
+
534
+
/* Busy wait while temperature measurement is not finished, you can skip waiting if you enable interrupt for DATARDY event and read the result in the interrupt. */
535
+
/*lint -e{845} // A zero has been given as right argument to operator '|'" */
536
+
while (NRF_TEMP->EVENTS_DATARDY == 0) {
537
+
// Do nothing.
538
+
}
539
+
540
+
NRF_TEMP->EVENTS_DATARDY = 0;
541
+
542
+
/**@note Workaround for PAN_028 rev2.0A anomaly 29 - TEMP: Stop task clears the TEMP register. */
543
+
Temperature += nrf_temp_read();
544
+
545
+
/**@note Workaround for PAN_028 rev2.0A anomaly 30 - TEMP: Temp module analog front end does not power down when DATARDY event occurs. */
546
+
NRF_TEMP->TASKS_STOP = 1; /** Stop the temperature measurement. */
0 commit comments