Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 9 of 9

Thread: Teensy 4.0 Low Power

  1. #1
    Senior Member duff's Avatar
    Join Date
    Jan 2013
    Location
    Las Vegas
    Posts
    999

    Teensy 4.0 Low Power

    Hi All, just wanted to gauge the priority of low power operation of the Teeny 4.0? I have worked on it for Snooze off and on for a bit now and it's not exactly an easy thing to implement since it is much different than Kinetis M micro's (T3x/LC). So post here if you need this and if enough people want it I will work on it now. Also if anyone wants to help please do and follow-up on this thread.

  2. #2
    Junior Member
    Join Date
    Jan 2019
    Posts
    15
    Dear duff, thank you for your Snooze library. T4 is currently useless to me compared to T3.5/6 because of the vastly inferior 24mhz power consumption vs the T3.5/6 at 24mhz. It isn't even the same: it is actually worse than T3.5/6, when the processor datasheets' indications of mhz v. ma would have you believe it should be better (actually, vastly better).

    I am holding off on further T4 purchases until I can get a power optimization, not a power worsening, from it compared to T3.5/6. See this thread for further info:
    https://forum.pjrc.com/threads/57450...compared-to-3x

  3. #3
    Member
    Join Date
    Aug 2019
    Location
    southwest USA
    Posts
    50
    Quote Originally Posted by duff View Post
    Hi All, just wanted to gauge the priority of low power operation of the Teeny 4.0? I have worked on it for Snooze off and on for a bit now and it's not exactly an easy thing to implement since it is much different than Kinetis M micro's (T3x/LC). So post here if you need this and if enough people want it I will work on it now. Also if anyone wants to help please do and follow-up on this thread.
    your Snooze library is fantastic!

    it will certainly be welcome when it happens for Teensy4. i have been compiling and running on Teensy4 for 3 weeks now and have become at least a little
    familiar with it. have been using Teensylc and Teensy3.6 and Arduino and Teensyduino for not quite 3 years. i am not a real programmer but have been doing
    assembly and c for embedded for several decades as a circuit designer and hack programmer and i have a complete test equipment bench. i have a small
    collection of Teensylc and Teensy3.6 programs that use the Snooze library to go slow or hibernate that i could compile, run, and test (or send to you).

    please let me know if i can be of help.

  4. #4
    Senior Member duff's Avatar
    Join Date
    Jan 2013
    Location
    Las Vegas
    Posts
    999
    Ok I'll work on this again, it's going to be a slow slog though, there are so many things with the M7 processor that you have consider that you didn't in the arm M0/M4!

  5. #5
    Member
    Join Date
    Aug 2019
    Location
    southwest USA
    Posts
    50
    Quote Originally Posted by duff View Post
    Ok I'll work on this again, it's going to be a slow slog though, there are so many things with the M7 processor that you have consider that you didn't in the arm M0/M4!
    when you say this just after my post it makes me feel guilty!

  6. #6
    Junior Member
    Join Date
    Mar 2020
    Posts
    2
    Hi Duff,

    I am wondering how is your with Snooze library going for Teensy 4.0. I am thinking about upgrading my project, but I need a current draw of less than 200uA in hibernate mode (standalone). Is it possible?

    Thank you,

    Peter

  7. #7
    Senior Member duff's Avatar
    Join Date
    Jan 2013
    Location
    Las Vegas
    Posts
    999
    Quote Originally Posted by piotrek View Post
    Hi Duff,

    I am wondering how is your with Snooze library going for Teensy 4.0. I am thinking about upgrading my project, but I need a current draw of less than 200uA in hibernate mode (standalone). Is it possible?

    Thank you,

    Peter
    Currently I only have System Idle(sleep) mode working, next will be LowPower Idle (deepSleep) then Suspend (hibernate). Actually Low Power Idle is coded just haven't tested it yet.
    Current wakeup modules are digital, timer and working on compare then rtc.

    Have not measured any current draw yet either so can not really tell what the numbers will be.

  8. #8
    Member
    Join Date
    Feb 2018
    Location
    Corvallis, OR
    Posts
    58
    I ran across the need for speed vs power issue on a logger in about 2005. I needed an ARM chip to do a bunch of cubic spline fits about once per minute. That would take a second or so. The rest of the time I wanted to collect that data with minimum power consumption. The solution I came up with was to use an Atmel ARM chip to do the number crunching and an MSP430 to do the data collection. The Atmel chip had the advantage of totally static internal operations, so you could stop the external clock input and the chip would go into low-power sleep. Start the clock again and the ARM chip took up where it left off. The MSP430 controlled the Atmel external clock generator and provided all the timing signals. It sent data and received results with serial ports at 115KB.

    The T4 has the capability to do much the same thing---but all the hardware is on the same chip. The shutdown process is complicated by the phase-locked loops that generate a lot of the peripheral clocks---and there are a lot more peripherals than on that 2005 ARM chip.

    That historic digression leads to my real point: There are at least two types of 'low power operation:
    There is the type that the snooze library tackles: You want the T4 to go into low-power sleep, then wake up intermittently and do some useful work. (The case I tackled with my 2005 multi-processor system).
    There is the type that Paul M. wants where the Teensy is awake and running at a reduced clock rate with the minimum possible power consumption. This requires some code to shut down the clocks to unused peripherals to eliminate their power drain.

    The best I've done on that is to figure out how to put the SD Card into idle mode between writes at a saving of about 30mA. For most logging operations, I don't need USB, most UARTS, audio, ethernet, the pixel pipeline, PWM, etc. etc. I think, but I'm not sure, that the T4 startup code starts up the clocks to most peripherals, whether they will be used or not. This would seem to be in line with the Arduino philosophy of doing most startup code before getting to the setup() function and having most peripherals ready to go with minimal startup code. This also eliminates the time lag an unlocked peripheral would experience on starting the clock and waiting for a PLL to stabilize.

    I think there is still a lot of work to be done to get the T4.0 to match the low-power continuous operation capability of the T3.6. i've been able to get the T3.6 to log 3 analog channels and a time stamp to SD card at 400 samples per second using less than 10mA average current. To do this, I have to run the T3.6 at 8MHz and make sure to put the SD card into idle mode after each write.

  9. #9
    Senior Member duff's Avatar
    Join Date
    Jan 2013
    Location
    Las Vegas
    Posts
    999
    The T4 has lots of clocks that you have to deal with when trying to lower the RUN mode power draw. For low power modes Low Power Idle (sleep) has the Arm CPU lowered down to 132MHz (arm pll) before shutting down all the PLL's and gating all the peripheral clocks for the myriad of functional blocks like serial, i2c etc except the ones needed for wakeup. The T4 inherits some of the peripherals from the IMX6 and some from the kinetis chips so it's challenge to do all the steps needed to keep the power down. One thing is clear is the change to the application processor design makes the low power sequence much more complicated from the rather easy low power design of the kinetis. There are so many clocks that you can use for each wakeup source it's been a hard to find the right one to use and in the upcoming Snooze T4 beta will probably use not the most power efficient clocks but it's what I had to do to make forward progress. Right now struggling to implement the xbar for the comparator (acmp) to bring out a few channels to top side pins. Might put that on the next beta since it's not a widely used wakeup form anyways.

Posting Permissions

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