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

Thread: LC: any way to get slower clocks as in T3.2?

  1. #1
    Senior Member
    Join Date
    Oct 2015
    Location
    Roma (IT, EU)
    Posts
    336

    LC: any way to get slower clocks as in T3.2?

    Hi,

    always struggling with power budget, I would like to run the LC at less than 24 MHz (I don't care about USB).

    T3.2 has 16/8/4/2 MHz, LC has not.

    It there a way to add slower speeds to the board definition?

    Thanks

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,079
    Quote Originally Posted by XFer View Post
    It there a way to add slower speeds to the board definition?
    Sure, just edit {Arduino}/hardware/teensy/avr/boards.txt

    Looks like we already have the support code in mk20dx128.c to implement those speeds. But of course that code should be considered untested.

  3. #3
    Senior Member
    Join Date
    Oct 2015
    Location
    Roma (IT, EU)
    Posts
    336
    Excellent, many thanks Paul.
    Will report back.

  4. #4
    Junior Member
    Join Date
    Nov 2019
    Posts
    14
    Teensy LC @ < 24 MHz should be an excellent MCU for low power applications (without USB serial, using battery) in active mode (and also in deepsleep mode).

    This benchmark shows i <= 2.0 mA on Teensy 3.2/3.5/3.6, so on Teensy LC it would problably run with less current.

    So, please implement Teensyduino support for Teensy LC at clock frequencies < 24 MHz, like the Teensy 3.2.

  5. #5
    Senior Member
    Join Date
    Oct 2015
    Location
    Roma (IT, EU)
    Posts
    336
    I have enabled 8 Mhz and 2 MHz in boards.txt and tried a few sketches on the LC.

    Powered at 3.3v by Vin with Vin-Vusb cut:

    Run @ 48 MHz = 11.8 mA
    Run @ 24 MHz = 9.3 mA
    Run @ 8 MHz = 4.3 mA
    Run @ 2 MHz = 1.5 mA

    Unfortunately, the Snooze library does not compile at 8 and 2 MHz:

    Code:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze\src/hal/TEENSY_LC/SnoozeUSBSerial.h: In member function 'SnoozeUSBSerial::operator bool()':
    
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Snooze\src/hal/TEENSY_LC/SnoozeUSBSerial.h:59:16: error: 'usb_configuration' was not declared in this scope
    
             return usb_configuration && ( usb_cdc_line_rtsdtr & USB_SERIAL_DTR ) && ( ( uint32_t )( systick_millis_count - usb_cdc_line_rtsdtr_millis ) >= 15 );
    so it's actually not very useful.

    Snooze builds fine with T3.2 @ 8 MHz.

    This is with Arduino IDE 1.8.12, TD 1.52, Snooze 6.3.8

Posting Permissions

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