-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Settings not persisted to EEPROM for Teensy 3.6 #8
Comments
Thanks for filing this. Your guess that QMK doesn’t understand how to use the Teensy 3.6 EEPROM sounds the most likely to me, too. I’ll try and take a look at what would need to be changed in the next few days as time permits. |
Perhaps we need to reduce CPU speed from 180MHz to 120MHz for this to work reliably. related to kinx-project/kint#10 related to kinx-project/kint#8
Can you update your branch so that commit kinx-project/qmk_firmware@1f84198 is included and try again? For me, this looks like it might be enough to make the EEPROM work, but I have only done a very quick test. |
For me it made the controller not boot up. None of the keys were responding, and even the ON led on the teensy was off. |
Can you try it with these changes please (changing CPU speed from 180MHz to 120MHz)? modified keyboards/kinesis/kint36/mcuconf.h
@@ -28,12 +28,12 @@
/* PEE mode - 180 MHz system clock driving by 16 MHz xtal */
#define KINETIS_MCG_MODE KINETIS_MCG_MODE_PEE
-#define KINETIS_PLLCLK_FREQUENCY 180000000UL // 180 MHz (HSRUN)
-//#define KINETIS_PLLCLK_FREQUENCY 120000000UL // 120 MHz (RUN)
+//#define KINETIS_PLLCLK_FREQUENCY 180000000UL // 180 MHz (HSRUN)
+#define KINETIS_PLLCLK_FREQUENCY 120000000UL // 120 MHz (RUN)
#define KINETIS_SYSCLK_FREQUENCY KINETIS_PLLCLK_FREQUENCY
#define KINETIS_BUSCLK_FREQUENCY 60000000UL
-#define KINETIS_FLASHCLK_FREQUENCY 28000000UL // 28 MHz (HSRUN)
-//#define KINETIS_FLASHCLK_FREQUENCY 24000000UL // 24 MHz (RUN)
+//#define KINETIS_FLASHCLK_FREQUENCY 28000000UL // 28 MHz (HSRUN)
+#define KINETIS_FLASHCLK_FREQUENCY 24000000UL // 24 MHz (RUN)
#if KINETIS_PLLCLK_FREQUENCY == 180000000UL
# define KINETIS_CLKDIV1_OUTDIV1 1 // -> 0 |
Tried with those changes, same behavior. Are there any debug prints I can provide that might help you see what the MCU is doing? |
Not that I know of :-/ One thing you can try is whether the example EEPROM programs that come with https://www.pjrc.com/teensy/td_download.html work on your device. Specifically Maybe one needs to run these first before the EEPROM starts working? Worth a try. |
Tried running both examples, both passed and I saw success prints in the serial monitor after the _get sample. Also it seems to have changed something in my teensy: now when I flash a firmware built with this commit, the keyboard boots up and keys work. However, EEPROM still doesn't seem to be working at either frequency (layout isn't persisted across reboots) and some other funkiness happens, e.g. my |
Thanks for confirming. I have read that EEPROM partitioning might be a step that leaves behind a persistent change, but will need to read up on what exactly that means for us here.
I wonder if this means that writing to the EEPROM doesn’t work yet, or if it’s something else entirely.
Weird! Not sure why that is yet. |
After reading the docs for the MK66FX1M0VMD18 and FlexMemory application notes, I've been wondering if it may make more sense in the context of the keyboard controller to use the FlexNVM module in the default D-Flash mode instead of partitioning it into EEE ("enhanced EEPROM") when servicing the QMK EEPROM r/w routines. It's all the same flash memory; from what I gather applications in E-Flash mode are for very frequently changing data where the EEE state machine will spread out the memory's finite number of read/write cycles over a larger area (such as using 256k of of flash as a smaller 4k EEPROM block). When instead used in D-Flash mode, one can leverage the entire capacity of the chip and not have to partition it beyond the default (unless somebody has already partitioned their Teensy, at least). I doubt keyboard users will need the up to 100 million write cycles spec'd for the EEE config.. I'm looking to see if I can bring up the Via feature for QMK on the Teensy 3.6, which lets you update the keymap without having to recompile all the time (as the stock Kinesis fw nicely allows). Via also uses the QMK EEPROM abstractions and could benefit from having more memory available. Seems to me the routines to write to EEPROM in QMK really mean "write to some sort of persistence on the chip" rather than "write to something the chip calls EEPROM literally", meaning the EEPROM r/w calls could equally be implemented againt D-Flash for the board. Thoughts? |
Thanks very much for investigating and weighing in! What you write makes sense to me—any persistence should do, yes. Please give your approach a try and share what you learn :) |
This commit updates QMK’s copy of the the teensy3 Arduino core code with the necessary changes to make the Teensy 3.6 work. Aside from different values for the partitioning, HSRUN mode must be left temporarily while using the EEPROM. fixes kinx-project/kint#8 related to kinx-project/kint#10
I have pushed branch https://github.com/stapelberg/qmk_firmware/commits/kint36-eeprom which makes the EEPROM work. In case anyone wants to try it out and confirm that it works for them, that’d be much appreciated! |
This commit updates QMK’s copy of the the teensy3 Arduino core code with the necessary changes to make the Teensy 3.6 work. Aside from different values for the partitioning, HSRUN mode must be left temporarily while using the EEPROM. fixes kinx-project/kint#8 related to kinx-project/kint#10
This commit updates QMK’s copy of the the teensy3 Arduino core code with the necessary changes to make the Teensy 3.6 work. Aside from different values for the partitioning, HSRUN mode must be left temporarily while using the EEPROM. fixes kinx-project/kint#8 related to kinx-project/kint#10
This commit updates QMK’s copy of the the teensy3 Arduino core code with the necessary changes to make the Teensy 3.6 work. Aside from different values for the partitioning, HSRUN mode must be left temporarily while using the EEPROM. fixes kinx-project/kint#8 related to kinx-project/kint#10
I've been using the
set_single_persistent_default_layer
function to switch base layers but the changes aren't persisted to EEPROM. I've also wired up a small LED strip and my understanding is that changes to RGB lights are persisted to EEPROM by QMK, but that's not working either. I believe QMK doesn't understand how to use the Teensy 3.6's EEPROM.The text was updated successfully, but these errors were encountered: