void tempmon_init(void);
float tempmonGetTemp(void);
void tempmon_Start();
void tempmon_Stop();
void tempmon_PwrDwn();
Thank you MichaelMeissner for these functions.The Teensy 4 has the following functions:
Code:void tempmon_init(void); float tempmonGetTemp(void); void tempmon_Start(); void tempmon_Stop(); void tempmon_PwrDwn();
TempmonGetTemp returns the temperature in Celsius.
The Teensy 4 has the following functions:
Code:void tempmon_init(void); float tempmonGetTemp(void); void tempmon_Start(); void tempmon_Stop(); void tempmon_PwrDwn();
TempmonGetTemp returns the temperature in Celsius.
Are you able to link to the API document that covers all these awesome little features I don’t know about?
Sometimes there is an API document, sometimes not. For some stuff you need to dig into the IMXRT 1062 data sheet (pages 1221 - 1230 on revision 2 of the reference manual), and the ever popular UTSL (Use the source Luke). In this case (hardware/teensy/avr/cores/teensy4/tempmon.c). Sure it would be better if there was an API document and Paul had plenty of time to update, but he seems to be stretched rather thin at times.
There is a new Teensy Wiki (https://github.com/TeensyUser/doc/wiki) that maybe you can add information as you discover it to help the next person.
asm volatile ("wfi");
That be a nice feature to add to watchdog, checking the core's temperature every refresh, and rather than have it panic, you could directly throttle it, reset it, or powerdown, your own way via callback
Using inteterrupts sometimes looks like the best solution, but that's not necessarily true, and it can lead to other problems.
Keep it easy and use polling.
One thing that I have noticed.
My Teensy 4.0 when it hits temperature above 77degree C it gets shutoff. I thought there was bug of auto shutoff fixed in latest Teensyduino release.
Is there also any way to setup this High limit something that @defragster mention HIGH temp _isr() or similar things?
Indeed, that could be a good combination.
There is a HIGH temp _isr() that can be enabled (notes on that in T4 beta thread) - but set at 85°C it is a bit late for overclocked processor as it can go south before it measures that high.
This is weird then as my Teensy 4.0 run on 600 MHz only I never went above that. Still in debug messages I see that using tempmon functions I am getting temperature above 79 degree.When running at/under 912 (?) MHz it was stable at temps up to and over 70°C with a heat sink alone.
static uint32_t highAlarmTemp = 85U;
static uint32_t panicAlarmTemp = 90U;
If you are hitting 79degrees at 600Mhz there may be another issue.
Maybe if you provided some additional info on what you are running and what you have connected someone might have some ideas.Yes, That's what I am trying to finding out. As I see temperature is rising to 79 in approx 45-50 runtime. And this is the reason I don't won't to play with the limit as it may damage Teensy board itself.
Maybe if you provided some additional info on what you are running and what you have connected someone might have some ideas.