@defragster: nice test. I was wondering why the lag time is so huge and had a look at the Teensyduino pin interrupt handler. Looks like there is only one pin interrupt for all pins. Therefore the pin interupt handler...
As mentioned above, the setPeriod functionality does not seem to work as intended (at least during my very first tests it didn't stop the period but did the same as SetNextPeriod()). I'll have a closer look on this and...
It is supposed to do the second.
However, as joepasquariello mentioned, those functions are currently not implemented for the FTM timers. As a first fix I implemented the setNextPeriod() function which changes the...
SetPeriod is supposed to change the period of a running timer, i.e. it is supposed to end the current period and start again with the new period (updatePeriod might have been a better name...)
SetNextPeriod is supposed...
Thinking a bit out of the box: You said you can't use the primary USB since you need that for uploading / debugging. So, what about using a simple USB switch like this:
...
Since you are new here, it is quite difficult to judge your experience and knowledge with that stuff. This might lead to frustrating or unsatisfying answers. But believe me, usually the guys here are very friendly and...
30MB will probably take about 2-3 minutes at 2MBaud that is not very convenient indeed.
I don't think Kurts solution will reprogram the usb host as usb slave but maybe I misunderstood it. Here...
I'd start with a simple serial connection and see if that is fast enough. Might be that the SD card is the bottle neck anyway. How large are the files you need to transmit?
Using the USB Host is kind of advanced and...
If I understand correctly, you want to transfer data from the RPi to the Teensy. RPi and Teensy are connected to a PC for programming / debugging.
If so, I'd do something like this:
On the Teensy side I'd use...
Update is an internal function. As thebigg mentioned in #2, you can simply use write(pos) to set the current encoder value. Doesn't that work?
Library Documentation:
https://www.pjrc.com/teensy/td_libs_Encoder.html...
See here https://github.com/luni64/TeensyTimerTool/wiki/Basic-Usage#finding-out-the-maximum-timer-period for information how to find out the max supported timer period for the various hard/software timers available. ...
I have not much experience with MIDI. Just wondering if it is OK to send those messages every 10ms? The encoder library will generate a lot of fast up/down counts if the encoder bounces (which is very likely). So, your...
As Kurt mentioned the usual way is to use objdump.exe.
Here an example using PlatformIO:
After compiling, go to the vsCode terminal and cd to your build directory cd .pio/build/whatever_board_you_are_compiling_for....
Yes, __has_include works nicely for the standard use case (I'm using it for the TeensyTimerTool)
#if defined __has_include
# if __has_include("optional.h")
# include "optional.h"
# else
# ...
@Kurt, I don't know if you read #4.
I also thought that this is an Arduino issue first, but it turned out (see Edit in #4) that GCC is simply ignoring the #include after the __has_include. Thus Arduino never sees the...
Question is what does "is using SD library" actually mean? IMHO, the only thing you can detect with __has_include is, if the build sytem added the corresponding -Ipath/to/the/lib directives to the compiler call? Maybe...
Google is much better than the forum search. If, for example, you search for this:
site:forum.pjrc.com joepasquariello after:2022-01-01
you'll get all your forum posts from this year.
Some time ago I summarized...
Makes sense. Did you try increasing the priority of the timer interrupt?
Also makes sense. If you look at the TimerTool config file you see that the TMR runs with the default prescaler of 128. (see here:...
Probably not. Due to the architecture of the chip the internal busses need some time to sync data. This adds some waiting time at the end of the ISR. The larger the difference of the frequency of the CPU to that of the...
Just a guess without testing: Per default the PIT runs at 24MHz only. This can generate some relatively large bus sync waiting times. So 1MHz interrupt rate together with your relatively large code in the ISR might...
I'm afraid you can't do this with the current library but tweaking it a bit could help:
I don't know anything about micro_ros but it looks like timer interrupts are handled without waiting for a time slice,...