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.02 seconds.

  1. Replies
    147
    Views
    30,847

    Wouldn't that only work if you can guarantee that...

    Wouldn't that only work if you can guarantee that the config header is ALWAYS included before the library header? Can get quite messy when you have a large lib with a lot of mutually dependent...
  2. Replies
    147
    Views
    30,847

    Here the worked out config pattern (files...

    Here the worked out config pattern (files attached)

    main sketch:



    #include "config.h"

    void setup()
    {
  3. Replies
    147
    Views
    30,847

    Thanks a lot. Hope I didn't start an argument...

    Thanks a lot. Hope I didn't start an argument about build systems with my remark...


    I fully agree, I also try to avoid this but sometimes its difficult. I recently stumbled over the...
  4. Replies
    147
    Views
    30,847

    Thanks, I have my libs local to the project...

    Thanks, I have my libs local to the project anyway, so that should be no issue. It shows SdFat V2.0.0-beta.7 is this the right one?
  5. Replies
    147
    Views
    30,847

    Just tried it with a T3.6. and the built in SD...

    Just tried it with a T3.6. and the built in SD slot, VisualTeensy & current clone of TD-core

    - Installed SDFatBeta
    - had to rename the sdfat.h to sdfat-beta.h in the SDFat.
    - in MTP_config.h I...
  6. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    Fixed this and added information on how to use...

    Fixed this and added information on how to use the error handling system to the readme (https://github.com/luni64/TeensyTimerTool#error-handling)
  7. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    Sorry, the usual issue with filenames not case...

    Sorry, the usual issue with filenames not case sensitive in Windows.... I'll fix that later today. Let me know if there are more of those bugs :-)
  8. Replies
    12
    Views
    89

    Here the results for the TMR/QUAD @150MHz ...

    Here the results for the TMR/QUAD @150MHz



    reload MHz Ás
    200 0.75 1.33
    100 1.5 0.67
    50 3 0.33
    25 3.86 0.26
    10 4.03 0.25
  9. Replies
    12
    Views
    89

    Changing that to 150MHz would be great for me if...

    Changing that to 150MHz would be great for me if it doesn't have other effects. The GPTs are also running on 24Mhz... However you can write more thight code since they have a seperate interrupt. I...
  10. Replies
    12
    Views
    89

    @Kurt: here the link to the beta thread when...

    @Kurt: here the link to the beta thread when Frank did experiments with the changed clock https://forum.pjrc.com/threads/54711-Teensy-4-0-First-Beta-Test?p=196569&viewfull=1#post196569 Might be...
  11. Replies
    12
    Views
    89

    No, it is done for the IMXRT. It is pretty...

    No, it is done for the IMXRT. It is pretty efficient now. I don't think that you can get much more out of it without changing the clock.

    Did another experiment to quickly check the load. With 4...
  12. Replies
    12
    Views
    89

    I also did some experiments. Changed the code...

    I also did some experiments.
    Changed the code in intervaltimer to ignore the limit and printout the calculated ldval. Get the following



    LDVAL measured period
    1 0.5
    11 0.5
    21 ...
  13. Replies
    12
    Views
    89

    I'm afraid simply setting a smaller reload value...

    I'm afraid simply setting a smaller reload value won't help. Here a link to some discussions about that issue ...
  14. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    Thanks! Originally I thought enabling more...

    Thanks!



    Originally I thought enabling more than 1MHz would be a good idea, but did you ever look at the load this will generate? Last time I checked I got this result (4 PITs)


    f:100.0 kHz...
  15. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    Read that multicore is the main use case for it....

    Read that multicore is the main use case for it. Wondering if in that case fiddling around on machine instruction level is a good idea? Probably better to use proven higher level approaches like...
  16. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    Checked it with 32ms which should give a even...

    Checked it with 32ms which should give a even tick count. It still creeps a little bit. I found that the calculated reload ticks are off by one, fixed it, now it gives exactly the right frequency....
  17. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    Regarding the "creeping" count with TMR and TCK ...

    Regarding the "creeping" count with TMR and TCK


    The GPT uses the 24Mhz clock which gives exactly 600'000 ticks per 25ms
    The TMR uses 150MHz with a 1/128 prescaler -> 25'000 * (150.0 /...
  18. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    Cool, just did some tests on your code as well....

    Cool, just did some tests on your code as well. To be honest I don't understand how you use the ldrex/strex (but that is probably my ignorance) From what I understood from stackexchange you'd use it...
  19. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    Thanks! Unfortunately I didn't find a way to...

    Thanks!

    Unfortunately I didn't find a way to check if a timer module is in use. If you have some idea how to identify a used timer I could try to implement it. But at least I tried to only touch...
  20. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    Yes, but beware, looking at the STL code with...

    Yes, but beware, looking at the STL code with unprotected eyes may cause serious injury as they say :-))
  21. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    TMR & std::atomic 833188 TMR &...

    TMR & std::atomic 833188
    TMR & disabled interrupts 1153647

    GPT & disabled interrupts 1153644
    GPT & std::atomic 833184

    Direct Register version ...
  22. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    @mjs513: The example in #41 uses a tight while(1)...

    @mjs513: The example in #41 uses a tight while(1) loop to increment the counter. This will be much quicker of course than doing it in loop. To compare performance it might be best to do the tests...
  23. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    Yes, that seems to be very useful. Would be...

    Yes, that seems to be very useful. Would be interesting to see if there is a performance penalty. Good thing is that it works locally and doesn't stop the whole interrupt system if it needs to wait...
  24. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    I would say, you should not attempt to do a non...

    I would say, you should not attempt to do a non atomic change of a variable in the main code when you access the same variable in an ISR. Disabling interrupts or using an 'atomic variable' (see #41)...
  25. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    While reading up what that __LDREXW is supposed...

    While reading up what that __LDREXW is supposed to do (__LDREXW seems to be made for multitasking stuff?), I stumbled over the standard c++ 'atomic' header which seems to be more suitable. With this...
  26. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    So, since this is sorted out, here the...

    So, since this is sorted out, here the TeensyTimerTool way to do it. (more or less back to #3 where the discussion started).
    Tested it for TCK, TMR1 and GPT1, works without issues now.


    ...
  27. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    You probably meant to say 'The problem is the...

    You probably meant to say 'The problem is the non-atomic INCREMENT... in the while

    Because, fortunately, this seems to be the reason. The problem is not the ISR at all, it does what it is supposed...
  28. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    Can confirm this (err... no... sometimes it...

    Can confirm this (err... no... sometimes it helps, sometimes not

    I give up for today and get me some beer :-)
  29. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    Here the disassembly of the isr. Doesn't look...

    Here the disassembly of the isr. Doesn't look suspicious at a first glance...



    void isr()
    {
    TMR1_CSCTRL0 &= ~TMR_CSCTRL_TCF1; // clear the timer flag
    60: ldr r2, [pc, #28] ; (80...
  30. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    I'll check tomorrow, I stumbled over this when...

    I'll check tomorrow, I stumbled over this when adding the dsb, didn't do a lot of experiments with dsb on the others.
  31. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    Yes :-) just tried it. Did we find a bug in the...

    Yes :-) just tried it. Did we find a bug in the Chip? What about that ARM addendum you mentioned in the morning?
  32. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    .. commenting out all eventtimer stuff and...

    .. commenting out all eventtimer stuff and removing it from systick also didn't work...


    Edit: also compiling with gcc-arm-none-eabi-9-2019-q4 doesn't change anything
  33. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    Unfortunately, adding dsb does not work reliably....

    Unfortunately, adding dsb does not work reliably. By resetting or power cycling the board a few times it can be brought into the same state as without the dsb. To exclude any bugs in TeensyTimerTool...
  34. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    Looks like you use an old Teesyduino. A couple of...

    Looks like you use an old Teesyduino. A couple of those CCM_CCGR1_... defines changed names in the current version.


    Just checked the IntervalTimer, looks like it doesn't implement a DSB at the...
  35. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    Thanks, still needs some work....

    Thanks, still needs some work....
  36. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    Currently the Tick Timer has a hard wired...

    Currently the Tick Timer has a hard wired override of yield(). (see Teensy/TCK/TCK.cpp, line12 if you want to play) That of course needs to be configurable in the future.


    Why? Get the same...
  37. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    Silly me... now it gives consistent results :-)

    Silly me... now it gives consistent results :-)
  38. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    Here the result for the good old IntervalTimer ...

    Here the result for the good old IntervalTimer



    unsigned loopCnt = 0;

    void callback()
    {
    Serial.print("loop()/sec=");
    Serial.print(loopCnt);
  39. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    Found time to add some more timers for T3.0 -...

    Found time to add some more timers for T3.0 - T3.6. to the TeensyTimerTool. So, currently the library supports the following hard- and software timers.


    T4.0: GPT1-GPT2(2 x 32bit channel...
  40. .... or set it up to exclude the build folders....

    .... or set it up to exclude the build folders. (Which is a good idea in any case)

    Anyway, I still don't see why you want to torture the compiler when Gibbedy has already shown in #4 that there...
  41. I assume that the preprocessor has a hard time...

    I assume that the preprocessor has a hard time generating those 160000 lines of code. Any reason why you don't pack one 'multiExe100' into a large for loop? The overhead for the loop can definitely...
  42. Found some time to try your sketch with a T3.2...

    Found some time to try your sketch with a T3.2 and a T-LC. It works in both cases without problems. I don't observe any restarts and it stays responsive 'for ever'
  43. Thread: TeensyTimerTool

    by luni
    Replies
    71
    Views
    892

    TeensyTimerTool

    TeensyTimerTool - Easy to use interface to the Teensy Timers

    I just published TeensyTimerTool on GitHub https://github.com/luni64/TeensyTimerTool. The library provides an easy to use interface to...
  44. My gut feeling is that it has nothing to do with...

    My gut feeling is that it has nothing to do with serial. To me this looks like some buffer overruns or similar. Depending on adding / removing parts of the code they will generate issues or not. But...
  45. As Paul already wrote, the timer peripherals are...

    As Paul already wrote, the timer peripherals are only loosely coupled to the ARM core, thus there is significant time required to synchronize the busses. Writing is cached, so this is fast in...
  46. I played a bit with it and saw the following...

    I played a bit with it and saw the following (T-LC):


    Switching between sketches always works if you have a switch to the null sketch in between. I.e. n -> f -> n -> c -> n -> ....
    Switching...
  47. Replies
    0
    Views
    28

    Teensy Type Reporting in BCD_DEVICE

    I noticed that for some of the MIDI and the FLIGHTSIM_JOYSTICK usb configurations the Teensy type is not reported in the BCD_DEVICE field like for all other configurations. I'm wondering if there is...
  48. Nice, I did a similar exercise a couple of years...

    Nice, I did a similar exercise a couple of years ago. .https://github.com/luni64/pins Quite amazing what can be done with modern c++ :-)
  49. Replies
    21
    Views
    745

    A lot of mechanical encoders produce two or more...

    A lot of mechanical encoders produce two or more increments/decrements per detent by design. I assume this is because they can keep the switch part of the encoder and only change the detent "wheel"...
  50. Replies
    26
    Views
    993

    @Paul: in case you still read this thread: Would...

    @Paul: in case you still read this thread: Would you accept a pull request to add weak definitions of the __throw_bad_XXX functions in the core?
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4