luni
Reaction score
5

Latest activity Postings About

    • luni
      Looks like the controller has a simple serial interface (set speed by sending a byte). So, instead of an EE solution you could think of using a Teensy (or a cheap controller like a XIAO) to read in the throttle value, calculate the required speed...
    • luni
      Micros returns a 32bit result. It overflows every 2^32 µs which is every 4.295E9 µs (=4295s = 71.6min). To prolong this you can store the value in the lower 32 bits of a 64bit variable. Then look periodically (at least once every 71min) if the...
    • luni
      luni replied to the thread xenForo Improvements.
      Doesn't work here as well
    • luni
      luni reacted to defragster's post in the thread xenForo Improvements with Like Like.
      Some websites offer a 'copy button' for code blocks grabbing everything within to the clipboard. Is that an option? - rather than having to manually drag select code text start to end to copy. Note: good for the forum - my bad - just came back...
    • luni
      Because the two GPT timers have dedicated interrupts (which you requested) and are 32bit as the IntervalTimer (PIT) you originally used. Notation means: (modules x channels), modules share one interrupt. -> GPT has two modules, one channel per...
    • luni
      Here a biased :) and not necessarily complete list of advantages / drawbacks + covers PIT (1x4), GPT(2x1), TMR(4x4), RTC(1x1) and software timers, (TCK32 and TCK64 1x20) with exactly the same API + provides periodic and one-shot functionality...
    • luni
      Each of the channels generates the same interrupt. But the channels maintain ther own interrupt flags. In the ISR one checks which interrupt flag was set and invokes the corresponding callback. See here for the relevant code...
    • luni
      IIRC (I don't use the Arduino IDE a lot) it used to change the build location only at startup but this might have changed. Of course your dislike of Microsoft is none of my business. I just want to mention that vsCode is open source...
    • luni
      A few notes: What happens without the --delegate? Do you actually need the IDE to upload? Once TyCommander has the hex file accociated, you can upload from there. It remembers the accociation even if you restart it. So compile with the IDE and...
    • luni
      At least I'm not aware of any issues. Have a close look at the other libraries (if any) you are using. Or better, just try... Edit: just saw in #1 that you have troubles. Can you describe what doesn't work? Some code?
    • luni
      Yes, if you need PWM (analogWrite), you need to make sure not to use one of the timers which generate the PWM signal for this pin. Here some information and a list of which timer generates the PWM for which pin...
    • luni
      Here how your example would look like using the TimerTool: #include "TeensyTimerTool.h" using namespace TeensyTimerTool; volatile bool pauseInterruptPrints = false; PeriodicTimer timer1(GPT1); PeriodicTimer timer2(GPT2); void spam(){ if...
    • luni
      Have a look at the TeensyTimerTool. It has a WIKI with a lot of usage examples (https://github.com/luni64/TeensyTimerTool/wiki) Please use v1.3.0. Later versions require the Teensyduino beta version (1.59beta)
    • luni
      On a T4.x all four interval timers generate the same interrupt and thus have the same priority. Setting priority for one sets it for all. So you can't interrupt a intervalTimer ISR by another one. You could use the GPT timers instead if you need...
    • luni
      luni replied to the thread xenForo Improvements.
      This seems to be meant for inline code. Like when you say: "Don't forget to put while(!Serial){} into setup()" The other one is meant for dedicated code blocks. I like the extra input box since it has a monospaced font which makes code editing...
    • luni
      Yes, you can switch the GPT to 150MHz. Here the relevant code from the TeensyTimerTool if (USE_GPT_PIT_150MHz) // timer clock setting from config.h CCM_CSCMR1 &= ~CCM_CSCMR1_PERCLK_CLK_SEL; // use F_BUS as...
    • luni
      luni reacted to snowsh's post in the thread test thread with Like Like.
      Glad to see the forum back up!
  • Loading…
  • Loading…
Back
Top