This temperature sensor uses a ring oscillator connected to a counter to determine the number of cycles within a clock period. The numbers of cycles are averaged across 4 samples, using a simple 2-bit right shift, and then sent through UART as well as the standard I/O pins. As a ring oscillator’s frequency is related to the temperature, we can then use this output to determine the temperature vs frequency characteristic.
After reset and enable are set, the ring oscillator should start. You can then use the UART rx channel to send the START code, which will kick-start the data-sending module. This module will start outputting the average of the last 4 samples of the ring oscillator to the UART tx channel. These samples are taken every clock cycle, which you can adjust by providing an external clock through the external clock pin, and then using the selector pin to switch to it. We suggest using a clock around 1MHz, as otherwise the counter may either be too fast or too slow. Additionally, you can send a REG code to adjust the registers used by the hysteresis module, allowing you to set the upper threshold, and then the lower threshold, through transmission from the tx channel.