Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 2 FirstFirst 1 2
Results 26 to 40 of 40

Thread: Teensy 4.0 Internal Temperature measurement

  1. #26
    Code:
    FLASHMEM void tempmon_init(void)
    {
      // Notes:
      //    TEMPMON_TEMPSENSE0 &= ~0x2U;  Stops temp monitoring
      //    TEMPMON_TEMPSENSE0 |= 0x1U;   Powers down temp monitoring 
      uint32_t calibrationData;
      uint32_t roomCount;
      uint32_t tempCodeVal;
          
      //first power on the temperature sensor - no register change
      TEMPMON_TEMPSENSE0 &= ~0x1U;
    
      //set monitoring frequency - no register change
      TEMPMON_TEMPSENSE1 = (((uint32_t)(((uint32_t)(frequency)) << 0U)) & 0xFFFFU);
      
      //read calibration data - this works
      calibrationData = HW_OCOTP_ANA1;
        s_hotTemp = (uint32_t)(calibrationData & 0xFFU) >> 0x00U;
        s_hotCount = (uint32_t)(calibrationData & 0xFFF00U) >> 0X08U;
        roomCount = (uint32_t)(calibrationData & 0xFFF00000U) >> 0x14U;
        s_hot_ROOM = s_hotTemp - 25.0f;
        s_roomC_hotC = roomCount - s_hotCount;
    
        //time to set alarm temperatures
      //Set High Alarm Temp
      tempCodeVal = (uint32_t)(s_hotCount + (s_hotTemp - highAlarmTemp) * s_roomC_hotC / s_hot_ROOM);
        TEMPMON_TEMPSENSE0 |= (((uint32_t)(((uint32_t)(tempCodeVal)) << 20U)) & 0xFFF00000U);
      
      //Set Panic Alarm Temp
      tempCodeVal = (uint32_t)(s_hotCount + (s_hotTemp - panicAlarmTemp) * s_roomC_hotC / s_hot_ROOM);
        TEMPMON_TEMPSENSE2 |= (((uint32_t)(((uint32_t)(tempCodeVal)) << 16U)) & 0xFFF0000U);
      
      // Set Low Temp Alarm Temp
      tempCodeVal = (uint32_t)(s_hotCount + (s_hotTemp - lowAlarmTemp) * s_roomC_hotC / s_hot_ROOM);
        TEMPMON_TEMPSENSE2 |= (((uint32_t)(((uint32_t)(tempCodeVal)) << 0U)) & 0xFFFU);
      
      //Start temp monitoring
      TEMPMON_TEMPSENSE0 |= 0x2U;   //starts temp monitoring
    
      //PANIC shutdown:
      NVIC_SET_PRIORITY(IRQ_TEMPERATURE_PANIC, 0);
      attachInterruptVector(IRQ_TEMPERATURE_PANIC, &Panic_Temp_isr);
      NVIC_ENABLE_IRQ(IRQ_TEMPERATURE_PANIC);
    }
    Is Panic Temperature IRQ sets automatically even if we do not call above function from our main .ino file?

  2. #27
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    6,906
    yes, in startup.c

  3. #28
    Quote Originally Posted by Frank B View Post
    yes, in startup.c
    Thank you Frank !

  4. #29
    Sorry to revive an old thread, but I was wondering if there was any more data on the thermal performance of the Teensy 4.1?

    I have been testing a 4.1 using the native ethernet, and even when doing very little (running the UDPNtpClient example and getting NTP time once ever 10s) it seems to run hot - at a room temperature of 24C the processor T quickly jumps up to 64C. Dropping the clock speed to 396MHz helps some, but it is still reaching 58C in short order.

    We would like to switch to a 4.1 to replace a 3.6 and WizIO in an instrument system, but the system needs to run in the tropics and in low pressure environments (50 hPa), so I am a bit concerned about heat dissipation. Have others experienced thermal shutdowns using the 4.1 at 600MHz?

  5. #30
    Quote Originally Posted by Scientist View Post
    Sorry to revive an old thread, but I was wondering if there was any more data on the thermal performance of the Teensy 4.1?

    I have been testing a 4.1 using the native ethernet, and even when doing very little (running the UDPNtpClient example and getting NTP time once ever 10s) it seems to run hot - at a room temperature of 24C the processor T quickly jumps up to 64C. Dropping the clock speed to 396MHz helps some, but it is still reaching 58C in short order.

    We would like to switch to a 4.1 to replace a 3.6 and WizIO in an instrument system, but the system needs to run in the tropics and in low pressure environments (50 hPa), so I am a bit concerned about heat dissipation. Have others experienced thermal shutdowns using the 4.1 at 600MHz?
    Yes, I have seen it getting too HOT even doing some other simple tasks on Teensy 4.0 (4.1 has same chip). Yes I also have got in case where Teensy was getting Thermal shutdown if I put my 4.0 in box so for now I have to run it with open area as well as not for really long time.

    There is way to disable thermal shutdown if you wanted in case, but I would say that will damage chip eventually.

  6. #31
    Quote Originally Posted by Scientist View Post
    Sorry to revive an old thread, but I was wondering if there was any more data on the thermal performance of the Teensy 4.1?

    I have been testing a 4.1 using the native ethernet, and even when doing very little (running the UDPNtpClient example and getting NTP time once ever 10s) it seems to run hot - at a room temperature of 24C the processor T quickly jumps up to 64C. Dropping the clock speed to 396MHz helps some, but it is still reaching 58C in short order.

    We would like to switch to a 4.1 to replace a 3.6 and WizIO in an instrument system, but the system needs to run in the tropics and in low pressure environments (50 hPa), so I am a bit concerned about heat dissipation. Have others experienced thermal shutdowns using the 4.1 at 600MHz?
    Did you get any solution for this issue?

  7. #32
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    11,780
    @manitou IIRC posted power use notes on prior thread(s) - there may be more on the T_4.1 beta thread ... summary points as recalled ...

    > T_4.1 alone runs using ~100 mA
    > T_4.1 with onboard Ethernet activated runs using ~150 mA

    @Scientist - to get better docs and some details perhaps starting a new thread specific to T_4.1 and Power/Heat with/without Ethernet in use and various speeds would be useful and get some notes on the conditions leading to the need to heat sink or cool a running Teensy 4.1. Some degree of tabulated data was produced for T_4.0 - running the benchmarks and adding USB_Host with ethernet dongle was done using float tempmonGetTemp(void) to track internal temps.

    With T_4.0 beta it ran much longer and more intermediate units were delivered so internal "void tempmon_init(void)" { see ...\hardware\teensy\avr\cores\teensy4\tempmon.c } testing was done across various speeds and some testing on overclocking with heat sinks.

    T_4.1 beta was much shorter with a single unit available to a few folks so that extra time and ability to lose a unit extensive testing wasn't done that AFAIK as basic functionality evolved up to production and release.

    With larger board and MCU unit to spread heat at normal speed it ram below T_4.0 temps - so in basic operation without ethernet - the T_4.1 only seemed to be better to eliminate the 1062's heat.

    With activation of ethernet and the current draw going up ~50% from that tiny point source - and perhaps extra active MCU parts more attention to cooling and operating temps may be needed - but it hasn't been tabulated AFAIK

  8. #33
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,338
    I got curious - always a problem so I ran a few test cases:
    1. Blink with prints of temp after turning on and off.
    2. Demosauce on a ILI9488, every second
    3. OpenGL demo on a ILI9488, every second
    4. UDP with a million records (no delay)
    5 UDP with a 1000 records every second

    Used FBENCH to receive and transmit packets to the T4.1. Room temp about 23degsC. Heres the plot:
    Click image for larger version. 

Name:	Capture4.jpg 
Views:	14 
Size:	83.4 KB 
ID:	20661

    As you can see it ethernet does run a few degrees hotter than other test cases but not terribly, about 4 degrees.

    Differences between my temps and @Scientist tests is probably due to mounting of the T4.1. Mine is in my breakout board with some space under the T4.1 and the board.

    Cheers

    EDIT: At 600Mhz I have never seen a Thermal shutdown. Right now the Panic Alarm is set at 90C which for the metric challenged is 194degs F. Almost boiling.

    The only time we have run into issues with thermal shut down is if we were overclocking at over 900Mhz sometimes. Easiest solution was to add a small heatsink.

    EDIT2: Got curious again so ran the UDP case again at 912Mhz. The dip you see in temp is me putting my finger on the processor just to see what would happen - do not do this at home Most of the temp diff is due to the change in processor speed based on past testing.
    Click image for larger version. 

Name:	Capture5.jpg 
Views:	13 
Size:	78.9 KB 
ID:	20663
    Last edited by mjs513; 06-20-2020 at 04:09 PM.

  9. #34
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    11,780
    Nice work @mjs513 - we did a lot of testing like that on T_4.0 given it was new and presented more heat to touch than prior models.

    Very scientifical with plotting, ambient temp, mounting notes and colors too! Only thing missing would be a ref line for a T_4.0 - it was not uncommon common for that to hit above 50C IIRC.

  10. #35
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,338
    Quote Originally Posted by defragster View Post
    Nice work @mjs513 - we did a lot of testing like that on T_4.0 given it was new and presented more heat to touch than prior models.

    Very scientifical with plotting, ambient temp, mounting notes and colors too! Only thing missing would be a ref line for a T_4.0 - it was not uncommon common for that to hit above 50C IIRC.
    Just for you:
    Click image for larger version. 

Name:	Capture5.jpg 
Views:	18 
Size:	83.7 KB 
ID:	20666

  11. #36
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    11,780
    Quote Originally Posted by mjs513 View Post
    Just for you:
    Awesome - as expected. The T_4.1's extra mass and surface area help a great deal.

  12. #37
    Senior Member vjmuzik's Avatar
    Join Date
    Apr 2017
    Posts
    565
    I remember while I was getting my Ethernet library working I did notice it got pretty hot so I started printing the temps while I was doing it. I want to say it maxed out at about 67C for me while running, simply holding my finger to the processor dropped the temps to about 55C. I believe I did that when I was working on USB Ethernet on the T4.0 so it’s not exclusive to the built in Ethernet. I don’t think the T3.6 had a problem with it, it’s just that the higher clock speeds make the 4.0 and 4.1 run hot. If you are really worried about temps I would just place a small heat sink on it as well as a small fan and call it day.

  13. #38
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    11,780
    These chunky copper 12x13mm units were helpful : amazon.com/gp/product/B07FTPL7Q8

    They fit the outline - okay for the T_4.0 1062 and will mostly cover the 13mm 1062 on the T_4.1. Not wildly finned ( short height ) but gave some degrees drop - better with fanned air - or fan alone is better as it cools the whole board.

  14. #39
    I have not (so far) had to heatsink any of my T4.0/T4.1 projects, but I've used <these> very successfully on all of my RPi projects which are in an enclosure, with airflow available/possible, but w/o an added fan. YMMV.

    Mark J Culross
    KD5RXT

    P.S. msj513: thanks for the nice temperature graphs !!

    SHUCKS !! I noticed *after* posting that these are currently shown on Amazon as unavailable. Good thing I have a healthy stash put back !! IFF they come back in stock, I would highly recommended them (I do remove the provided adhesive pads & use a good <thermal glue> to attach them to my processors permanently). MJC

  15. #40
    Senior Member
    Join Date
    Dec 2016
    Location
    Montreal, Canada
    Posts
    3,378
    Using 4.0 in automotive environment it runs 24/7 on CAN without issues, cabin temperatures here now with summer reached high 70's celcius, no heatsink on T4, enclosed in an atmega2560 enclosure box under the dash

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •