Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: luni

Page 1 of 10 1 2 3 4

Search: Search took 0.01 seconds.

  1. Thread: ppm of PWM timers

    by luni
    Replies
    2
    Views
    81

    All of the non RTC timers the TimerTool uses...

    All of the non RTC timers the TimerTool uses (FTM, TMR, GPT, PIT) run off the same 24MHz crystal and will share the same drift. The RTC based timers (TCK_RTC) use the built in RTC as time base which...
  2. Replies
    9
    Views
    290

    You might be interested in the TimerTool:...

    You might be interested in the TimerTool: https://github.com/luni64/TeensyTimerTool. You can use it to setup periodic and one-shot timers based on various hardware timers and/or software timers. ...
  3. Replies
    18
    Views
    487

    If you just want to use the timer, you might...

    If you just want to use the timer, you might consider using the TimerTool: https://github.com/luni64/TeensyTimerTool.



    #include "TeensyTimerTool.h"
    using namespace TeensyTimerTool;
    ...
  4. Replies
    11
    Views
    513

    I can have a look if you post a minimal example...

    I can have a look if you post a minimal example showing the effect
  5. You can simply print them out yourself: ...

    You can simply print them out yourself:



    for (int irqNr = 0; irqNr < NVIC_NUM_INTERRUPTS; irqNr++)
    {
    Serial.printf("IrqNr:%d PRIO:%d\n",irqNr, NVIC_GET_PRIORITY(irqNr));
    }
  6. Replies
    11
    Views
    586

    I also stumbled over this weird thing some time...

    I also stumbled over this weird thing some time ago. https://forum.pjrc.com/threads/65469-EncoderTool-Problems?p=264072&viewfull=1#post264072
    It could be fixed by moving the definition of _write...
  7. Replies
    5
    Views
    165

    To intialize an array of steppers you can do: ...

    To intialize an array of steppers you can do:


    Stepper steppers[] = {
    {STEPPER1_PULSE_PIN, STEPPER1_DIR_PIN},
    {STEPPER2_PULSE_PIN, STEPPER2_DIR_PIN},
    {STEPPER3_PULSE_PIN,...
  8. Replies
    137
    Views
    48,513

    Good that it works now. However, while manually...

    Good that it works now. However, while manually copying files to your source folder certainly works it should not be necessary. It should be enough to download the *.zip from Github and do a "zip...
  9. Replies
    137
    Views
    48,513

    Looks like something went wrong installing the...

    Looks like something went wrong installing the library? There is a space in your installation path: "..\libraries\TeensySte p4-main\src...".
  10. Replies
    137
    Views
    48,513

    @killacycle: Pushed a quick implementation of...

    @killacycle: Pushed a quick implementation of overrideSpeed. Can you give it a try?
  11. Replies
    1
    Views
    109

    Just added this to the repository, can you try it?

    Just added this to the repository, can you try it?
  12. Here a small thread showing how to do this in...

    Here a small thread showing how to do this in principle https://forum.pjrc.com/threads/47783-Teensy-programs-Teensy. There are a few links to other projects in this thread as well.
  13. Thread: EncoderTool

    by luni
    Replies
    24
    Views
    1,633

    I updated the callback signatures (value and...

    I updated the callback signatures (value and delta) to reflect the underlying counter type. Here an example for a 64 bit counter:


    Encoder_tpl<int64_t> spindleEnc;

    void...
  14. Replies
    137
    Views
    48,513

    overrideSpeed is not yet implemented in...

    overrideSpeed is not yet implemented in TeensyStep4. I'll see if I can do a test version. Give me a day or two.
  15. Thread: EncoderTool

    by luni
    Replies
    24
    Views
    1,633

    It usually is a good idea to git clone libraries....

    It usually is a good idea to git clone libraries. You can then switch between branches / versions without hassle.



    Good point, I need to change the callback types also. I'll update the repo as...
  16. Thread: EncoderTool

    by luni
    Replies
    24
    Views
    1,633

    I pushed an experimental version with user...

    I pushed an experimental version with user selectable counter type to the GitHub repository https://github.com/luni64/EncoderTool/tree/counterType (use the branch "counterType").

    The standard API...
  17. Replies
    9
    Views
    252

    Can you try to add the NVIC_SET_PRIORITY line in...

    Can you try to add the NVIC_SET_PRIORITY line in teensystep4.cpp as shown below?


    #pragma push_macro("abs")
    #undef abs

    #include "teensystep4.h"
    #include "timers/timerfactory.h"
    #include...
  18. Replies
    9
    Views
    252

    Ok, looks like I can reproduce that. 29573 ...

    Ok, looks like I can reproduce that.

    29573

    Every couple of 100ms something blocks for about 13ms. The sequence at 0.85s is the normal deceleration /acceleration. I'll have a closer look but it...
  19. Replies
    9
    Views
    252

    I'll have a look. Your test program works without...

    I'll have a look. Your test program works without something connected to the ethernet port, right?
  20. Replies
    9
    Views
    252

    Do you know which interrupts NativeEthernet uses?

    Do you know which interrupts NativeEthernet uses?
  21. Replies
    8
    Views
    298

    You can also buy one of those cheap ones (~10EUR)...

    You can also buy one of those cheap ones (~10EUR) ...
  22. Thread: EncoderTool

    by luni
    Replies
    24
    Views
    1,633

    Here the line which defines the type of the...

    Here the line which defines the type of the counter to 'int'
    https://github.com/luni64/EncoderTool/blob/54949842c74f4b339e773756f9778d803762c22f/src/EncoderBase.h#L63

    You can change this to int64...
  23. Thread: EncoderTool

    by luni
    Replies
    24
    Views
    1,633

    I like the idea, but the encoder tool is pretty...

    I like the idea, but the encoder tool is pretty much platform independent. So setting the counter to int64 would be quite some overhead for smaller boards. Best would be to make the counter type a...
  24. That's true. The T3.6 had 4 PIT modules with one...

    That's true. The T3.6 had 4 PIT modules with one channel each. The T4.x have 1 PIT module with 4 channels. Interrupt priorities can be assigned per module only.



    Of course the TimerTool can't...
  25. Agreed, 400kHz interrupt frequency is borderline....

    Agreed, 400kHz interrupt frequency is borderline. Just a quick idea: do you actually need the high resolution for normal turning with feed? Maybe you can readout the encoder for threading only and...
  26. Couldn't you simply get a higher resolution...

    Couldn't you simply get a higher resolution encoder?
  27. Replies
    0
    Views
    91

    Trigger Crash Report

    Is it possible to trigger a crash generating a crashreport with some information to display? I have an application which would normally throw an exception. Doing a 'controlled' crash with some...
  28. Sorry was caught in an endless meeting... You...

    Sorry was caught in an endless meeting...

    You can set the count mode in the begin function of the encoder. It defaults to countMode::quarter which is the usual setting for mechanical encoders. ...
  29. Do you mean that it ended up with wrong counts...

    Do you mean that it ended up with wrong counts (shouldn't happen) or did it rapidly count up/down on the disturbances (I would expect that). Using it in countMode::Half or countMode::quarter should...
  30. Replies
    107
    Views
    6,048

    I, personally don't like suppressing warnings by...

    I, personally don't like suppressing warnings by default.

    For the use case you mentioned (stubs for future coding), I'd simply declare the objects as [[maybe_unused]] to get rid of the warning...
  31. Got it going, I simply copied the TY stuff from a...

    Got it going, I simply copied the TY stuff from a platform.txt from an old installation to the new platform.txt in the folder you gave. Need to close the IDE, delete the folder "arduino-ide" in...
  32. Did anyone try to integrate the...

    Did anyone try to integrate the tyTools/tyCommander in the IDE2?
  33. Replies
    107
    Views
    6,048

    [[maybe_unused]] char x[128]; Works in a...

    [[maybe_unused]] char x[128];

    Works in a simple test function
  34. Thread: TeensyTimerTool

    by luni
    Replies
    354
    Views
    62,305

    I just published a new release of the...

    I just published a new release of the TeensyTimerTool (v1.0.1) .

    Two main changes:
    To be compatible with the new toolchain (1.58beta) I needed to remove the capability to enter timer periods in...
  35. Replies
    2
    Views
    262

    :-) know that feeling... My solution is to use...

    :-) know that feeling...

    My solution is to use the TyTools https://github.com/Koromix/tytools for uploading and monitoring.
    Here one of my platformio.ini files (windows, changing for other OS...
  36. Replies
    34
    Views
    1,492

    There is some news on this: I meanwhile found...

    There is some news on this:
    I meanwhile found some very interesting code in a (german) c++ forum...
  37. Replies
    9
    Views
    388

    Great, to use it more efficiently it might be...

    Great, to use it more efficiently it might be good to know that you can reserve more than one slot


    using callbackHelper_t = CallbackHelper<void(void), 10>;


    would give you 10 slots for...
  38. Replies
    9
    Views
    388

    I meanwhile switched attachInterruptEx from...

    I meanwhile switched attachInterruptEx from std::function to the CallbackHelper as well. As expected, it reduces the memory footprint massively. @Paul, unfortunately my scope is way to slow to do...
  39. Understandable...

    Understandable...
  40. Great, I'll give it a try later.

    Great, I'll give it a try later.
  41. If I compile with using std=gnu++17 instead of...

    If I compile with using std=gnu++17 instead of the standard gnu++14, Arduino.h clashes with <chrono>. Including "Arduino.h" after <chrono> fixes this. I assume the clash is related to #defining...
  42. relocation truncated

    As mentioned some 1.5 years ago in the 1.54 beta thread (https://forum.pjrc.com/threads/66357-Teensyduino-1-54-Beta-7?p=274861&viewfull=1#post274861) there is an issue compiling the following simple...
  43. Replies
    9
    Views
    388

    I also had a lot of failures and super...

    I also had a lot of failures and super complicated code until I slowly understood how that stuff works. At the end it shrank down to just a few lines to get this amazing flexibility. But that's the...
  44. Replies
    9
    Views
    388

    CallbackHelper - fun with modern callbacks

    Inspired by this Thread https://forum.pjrc.com/threads/70986-Lightweight-C-callbacks, I tried how difficult it would be to implement a more modern callback API for hardware interrupts and user...
  45. That's great. Any chance you'd switch to gnu++17...

    That's great. Any chance you'd switch to gnu++17 as well?
  46. Replies
    34
    Views
    1,492

    @PaulStoffregen In case you are still interested:...

    @PaulStoffregen In case you are still interested: I meanwhile got capturing lambdas going as well without using std::function or dynamic memory of course :-). Looks like everything possible for...
  47. Replies
    34
    Views
    1,492

    It is both, best to give it a try. IIRC the LC is...

    It is both, best to give it a try. IIRC the LC is using nanoLib instead of newLib which brings down the memory requirements significantly
  48. To get an impression how fast digitalWriteFast is...

    To get an impression how fast digitalWriteFast is on a Teensy 4.x have a look here:

    https://forum.pjrc.com/threads/57185-Teensy-4-0-Bitbang-FAST?p=212236&viewfull=1#post212236
  49. Replies
    34
    Views
    1,492

    I didn't expect much performance penalty but only...

    I didn't expect much performance penalty but only 6 cycles is impressive. It also includes the additional indirection introduced by attachInteruptEx which adds a relay function which then calls the...
  50. Replies
    34
    Views
    1,492

    Sure, I don't propose to do this on the normal...

    Sure, I don't propose to do this on the normal attachInterrupt. But in case someone needs it one can just use attachInterruptEx(). It peacefully coexists with the standard version.

    Did you find...
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4