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

Thread: Teensy 3.6 can not write to EEPROM memory when running faster than 120 MHz

  1. #1
    Junior Member
    Join Date
    May 2017
    Posts
    8

    Teensy 3.6 can not write to EEPROM memory when running faster than 120 MHz

    Hi All,

    I read that:
    Teensy 3.6 can not write to EEPROM memory when running faster than 120 MHz
    https://www.pjrc.com/teensy/td_libs_EEPROM.html

    But I also read:
    •Fix EEPROM on Teensy 3.6 with CPU speed > 120 MHz (special thanks Defragster)
    at here
    https://www.kickstarter.com/projects.../posts/1718838

    Can some body confirm if Teensy 3.6 can read/write EEPROM at speed > 120Mhz?

    Many thanks

    Jsmchiang

  2. #2
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,565
    yes, works.

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,914
    Quote Originally Posted by jsmchiang View Post
    Can some body confirm if Teensy 3.6 can read/write EEPROM at speed > 120Mhz?
    The situation is exactly as that page documents:

    Teensy 3.6 can not write to EEPROM memory when running faster than 120 MHz. The EEPROM library will automatically reduce the processor's speed during the time EEPROM data is written. If using Serial1 or Serial2, communication may be disrupted due to baud rate changes. Other serial ports are not affected by the temporary speed change during EEPROM writing.
    If you are running at 180 MHz and attempt to write to EEPROM, Teensy 3.6 will briefly drop to a slower speed while performing the EEPROM write.

    So the answer to your question really depends on the context. If you're asking about whether you can use the EEPROM library to write to the EEPROM memory, then yes, you can. But it does have a minor side effect which usually is only observable if using fast baud rates on Serial1 or Serial2. For most practical purposes, writing to EEPROM works fine when running at 180 or 240 MHz.

    If you're asking about the actual underlying hardware capability, then no, writing to non-volatile memory is impossible when in HSRUN mode (which is used for speeds over 120 MHz).

  4. #4
    Junior Member
    Join Date
    May 2017
    Posts
    8
    Thanks Paul,
    If my Serial 1 and 2 are running at 115200 baud rate (fast baud rate?), would the writing to EEPROM affect the communication? Also, if I drop the Teensy 3.6 speed to 120Mhz, then there will be no more issues to the Serial1/2 during writing to the EEPROM, right?

  5. #5
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,320
    Correct - if compiled at 120 MHz (or lower)- there will be no need to change the clock speed for EEPROM write and system operation continues at speed with no clock changes.

    If Serial 1 or 2 Rx or Tx happen during the clock change when dropped down to 120 MHz for EEPROM write that may affect those bytes.
    Last edited by defragster; 04-10-2019 at 04:48 AM.

Posting Permissions

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