Search results

  1. D

    Porting Teensy 3 library to Teensy 4

    So I just want let you know I haven't abandoned this project it's that I found out two weeks after getting my new Teensy's that I am moving again and have all my equipment in storage now. I hope this is the last time I have to move but I just don't have a lot of time or equipment to work on this...
  2. D

    getting fatal error: teensy4/teensy.h: No such file or directory when running code below

    The more I learn about these large language models (LLM) used in "AI" the more I think they are huge sink holes for other peoples intellectual property that get spit out the backend in a somewhat coherent form but not necessarily anything useful. I use Google's NotebookLM language model to query...
  3. D

    Porting Teensy 3 library to Teensy 4

    Hi all, another update, things moving slowly but progress has been made. I have the break-marking sequence mostly working and the receiver code able to get the data back from the "virtual" sensor which is a Teensy taking the place of a SDI12 sensor. The break-marking sequence is done in hardware...
  4. D

    Porting Teensy 3 library to Teensy 4

    I found an issue with inverted serial and half duplex mode where the current serial setup configures the pin for pull-up which causes an issue when you change the TX pin to RX by TXDIR bit in LPUART ctrl register. Using the sketch below and looking at the trace picture below you can see that...
  5. D

    Porting Teensy 3 library to Teensy 4

    So I finally got some time to work on this and will have an update soon.
  6. D

    Porting Teensy 3 library to Teensy 4

    I just got my Teensy's ordered! Was looking at the ref manual and see that at least some of the lp-uarts have the "single-wire mode" that we need for SDI12 communications, so that is a good start. I haven't really dug into the T4's serial code in the core yet but it looks promising we can get a...
  7. D

    Porting Teensy 3 library to Teensy 4

    Hi all, yes it's been a little bit. So I guess I lost my Teensy 4's, lol, so I'l order a 4 and 4.1 soon.
  8. D

    Porting Teensy 3 library to Teensy 4

    Hmmm, I have been thinking about trying to port this library over to the T4 for a project on monitoring the soil moisture using the a couple of decagon SDI12 soil moisture, EC and temp senors I have. Maybe now is good time to try to do this but I have been out of the programming game for a...
  9. D

    Teensy 4.1 deep sleep and watchdog

    Most likely Snooze is turning off the enables for the watchdog clock. Watchdog is not something I took into account when writing the T4 sleep code. I'm sure there are other things that are getting in the way with these two libraries. Also the system clocks that get activated in sleep modes are...
  10. D

    Linux on Teensy 3/4?

    If anyone wants to see the incredibly difficult bring-up of the linux kernel on a new architecture have a look at this current bring-up: and and Marcan is the lead on this port to...
  11. D

    Teensy 4.0 freezes using Snooze and EEPROM.put

    All is as good, thanks. I'll check it out.
  12. D

    Teensy 4.0 freezes using Snooze and EEPROM.put

    Does it fail with deepSleep or hibernate too? Low power in the Teensy 4.0 is much more complicated than T3.x's, so getting Snooze to be solid for the 4.0 is going to take some more work on my end. As far as why the EEPROM is failing I have know idea at the moment but I'll figure something out.
  13. D

    Snooze Wake-up Recovery Times

    Can you post the sketch(s) you used to get the times for the teensy 4? The T4 requires a lot of stages to get it any of the sleep modes so these times don't seem that off to me but I would have to look into more to see why.
  14. D

    Apple's new M1 (ARM based) Macintosh

    Not yet but will get one when the MBP 16" M1 comes out.
  15. D

    Does Snooze work with teensy 4.1

    Not timeline yet but it shouldn't be any issues porting the 4.0 to 4.1 since both are same chip.
  16. D

    Does Snooze work with teensy 4.1

    Not yet, it's in the works :)
  17. D

    Unable to wake Teensy LC using Snooze

    Yep, your right, (PTD2) pin 7 is not a wake up pin while in deepSleep or hibernate. I'll update the example to reflect this, thanks!
  18. D

    Unable to wake Teensy LC using Snooze

    @PaulS I'll take a look at that sketch with T-LC tonight. It worked when I was testing all the different Teensy's, does just a simple pin wakeup work?
  19. D

    Problem with Snooze library - USB Program mode

    What Teensy are you using? If not T4.0/1 then not currently but it will in the next update. There will be an option to wakeup from a reset with hibernate. I'm going to try to work on the library in the next week if I can get time and energy :).
  20. D

    Snooze: Calling a function on a pin interrupt?

    Ya I know it seems to get harder not easier now a days... It will only go back to sleep when you call any of the Snooze sleep functions, i.e. "sleep", "deepSleep" or "hibernate". There are some house keeping to get out of sleep mode that is handled by the library so it will have some latency...
  21. D

    T35 Low power difficulties / Snooze library example does not compile and unexplained

    Yes it is not implemented yet, I'll try to work on this soon.
  22. D

    Snooze: Calling a function on a pin interrupt?

    Yes you can do this but realize that as soon as the Teensy wakes up your attachInterrupt callback interrupt is activated again and your callback function could be called by that interrupt anytime even if you are manually calling that callback function in user code. I would disable interrupts...
  23. D

    Snooze: Calling a function on a pin interrupt?

    To answer my own question I do already have something for this as with the example SkeletonDriverClass in which you could rewrite any of the Drivers to better match what you are trying to do and use it like any other driver. Just make sure you name it something that doesn't conflict with any...
  24. D

    Snooze: Calling a function on a pin interrupt?

    Yes that's how it should work, your attached callback should work as normal after waking up and returned to the users code. So you should only have to call attachInterrupt only once in the setup function and thats it.
  25. D

    Snooze: Calling a function on a pin interrupt?

    Sorry for absence, but a extended family member has covid so I'm dealing with that now. This was a bad attempt at trying to explain how the internal function of the Low Power mode wakeup for Digital Pins works and not how you go about using it. To wakeup from sleep, deepSleep or hibernate on...
  26. D

    Teensy 4.0 Low Power

    FYI, 'hibernate' sleep should work it just wakes with a reset. I'm not surprised by those numbers, thanks for posting. Currently I'm doing a huge home automation project so I'm not going to look at Low Power stuff anytime soon but I hope to revisit this to work on better power numbers...
  27. D

    need help with audio latency and noteFreq object

    @emmanuel63 noteFreq works better than I thought it would for your application:)
  28. D

    Teensyduino 1.52 Beta #3

    No I haven't looked into that at all. I tried to make sure all the examples worked :) One caveat is that hibernate wakes through a reset currently.
  29. D

    Teensyduino 1.52 Beta #3

    Did you try to download the latest Snooze beta for T4 support? Just clone it or download the zip file I haven't updated the releases since I want to get any bugs squashed first.
  30. D

    Teensy 3.6 RTC not continues time in hibernation

    A couple of things that stand out is that you do not need the Timer driver just the Alarm driver. In the included sketch I also use the USBSerial driver to aid with printing to the Arduino Serial Monitor. You have to call setSyncProvider(getTeensy3Time) after waking. I tested it and it works...
  31. D

    Adrift in a sea of #ifdefs

    This is exactly why I refactored my Snooze library into different HALs for the different Teensies even if 90% of the code base is the same. It was getting to the point that I couldn't follow my own code anymore before refactoring.
  32. D

    need help with audio latency and noteFreq object

    Do you do any filtering before feeding it to notFreq? That could help if the mic is picking up a lot of outside or internal noise. Also I found in my guitar tuning application I got better results if I low passed the signal close to the frequencies I was looking for, so for guitar tuning I set...
  33. D

    Teensy 4.1 Beta Test

    Oh cool, I just pushed an update to Snooze for T4.0 support. I guess I'll have to add T4.1 support now too:) I'm considering T4 support beta now but it seems to work for me, haven't looked at any current measurements yet will do that in next few days.
  34. D

    need help with audio latency and noteFreq object

    Not sure what you mean, so the latency is good but when the player is double timing it the algorithm can't keep up? Have you tried adjusting the threshold value? A smaller value will make the algorithm more precise and more selective in what it considers a valid result. Do small adjustments like...
  35. D

    need help with audio latency and noteFreq object

    What teensy are you using? What is the lowest frequency you are expecting to measure? How many AUDIO_GUITARTUNER_BLOCKS do you use?
  36. D

    noteFreq object - frequency detection speed ?

    Using a faster Teensy won't make the algorithm process faster, it works by processing half the number plus one of the audio blocks (AUDIO_GUITARTUNER_BLOCKS) and then spits out the fundamental frequency. So the less "Audio Blocks" used the faster it will give you answer but then you lose the...
  37. D

    Teensy 4.0 Low Power

    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...
  38. D

    Teensy 4.0 Low Power

    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...
  39. D

    Broken on Mac: both Teensyduino and Arduino + Teensy

    Had to do the same thing here on my 10.13.6 MacBook Pro Mid 2012.
  40. D

    COVID-19: A thread to share some thoughts and events

    Here is something you can do with spare compute power to help with the folding of proteins to help unlock treatments for COVID-19.
  41. D

    Teensy 4.0 Schematic Question

    I think it's for reverse polarity protection, also the mosfet design has a lower voltage drop than a diode and would have less wasted heat and more voltage for the USB controller on the T4.
  42. D

    Disappointing and inexplicable Teensy 4.0 24mhz high power consumption compared to 3x

    The Teensy 4 can run with somewhat useable USB down to 1MHz AHB/IPG core clocks using the 24MHZ OSC as the root. OSC get divided down to the target frequency with the CLK2/AHB PDOF's. As long as sw-PLL3 is enabled and running at 480 MHz (default) the AHB/IPG can be clocked down to 1MHz and the...
  43. D

    ADC async clock generation Teensy 4.0

    If ADCx_CFG[ADHSC] registor is 0 then it's 10MHz if it's 1 then it's 20MHz. ref:
  44. D

    Dynamic clock change issues on T3.6

    I'd do number 1, thats what I did. By coping the Interval Timer code and making a new library named IntervalTimer_LP you can make all compile time constants reflect whatever cpu speed you want to use. Since you are only going from F_CPU, F_BUS and F_MEM to a new speed (8MHz) you can replace them...
  45. D

    Teensy 4.0 Clock speed influences delay and SPI

    I think the IPG_PERCLK_ROOT (peripheral clock) can be derived from either the IPG_CLK_ROOT or the OSC_CLK at 24MHz. Out of reset if you look at the register CCM_CSCMR1[PERCLK_CLK_SEL] the IPG_PERCLK_ROOT is derived from the OSC_CKL so that where your 24 MHz comes from and register...
  46. D

    Disappointing and inexplicable Teensy 4.0 24mhz high power consumption compared to 3x

    Questions about 24MHz operation and clockspeed.c: Looking at clockspeed.c and when changing the clock speed to 24MHz is the BUS clock running 12MHz? I can't tell yet. Are we using the RC OSC 24M used instead of the XTAL OSC 24M? Looks like the USB PLL has to be disabled to truly run off the RC...
  47. D

    Teensyduino 1.50 Released

    So it looks like I have the same problem that @neurofun has with the Catalina version. When I try to open the it says it needs 10.14: Got it to work when I copied the 1.50 from another Arduino install I did. I'll try to download the Catalina version again now. edit...
  48. D

    Snooze.h not working with Arduino 1.8.11 and Teensyduino 1.50

    I'm hoping to have an update today on my GitHub. The changes are to make Snooze's main class decoupled from the underlying HAL for each Teensy chip. This broke a lot of things so I had to rewrite a lot of how things for Snooze to work again, this is why it has taken so long.
  49. D

    Serial Print Not Working After Snooze deepSleep

    Did you look at the 'deepSleep_usb_serial' example?
  50. D

    LittleVGL on Teensy

    I wrote library that interfaces the ILI9341 and XPT2046 to littleVGL, it has a novel 5 point touch calibration method that corrects scaling factors and mechanical misalignment of the screen using least squares algorithm to get the solution. This technique is much more robust than using the...