Heads up regarding SerialTransfer. The library as-is has max payload of 254 bytes per message, so it would work for the short messages you described, but not for very large ones.
So, for every 1-ms control cycle, the master sends 36 bytes to each slave and receives 92 bytes. It's at least 10-bits per byte, so that is 1,280,000 bps. If the communication is half duplex, you'll need at least 2M baud. Are you just...
T4 has a data co-processor (DCP) to support various encryption, etc. I don't know of any easy-to-use library, but the link below is to a sketch by user @manitou from the early days of T4 beta testing. It does CRC32 calculation and reports...
I typed "stereo recording" into the search bar and found a lot of links. This one looks helpful
https://forum.pjrc.com/index.php?threads/record-while-playing-a-stereo-wav-file.74866/post-342160
I don't use PIO, so I'm guessing, but your DMAMEM array leaves 0 bytes free in RAM2, and perhaps there is something different about the linker script in PIO that results in some of those bytes being used. Have you tried testing with a smaller...
If you can't use QuadEncoder, you should just go ahead and use Encoder. The T4.1 is so fast that it can handle quite high interrupts rates. What is the PPR of your encoder and the highest expected RPM?
Let's say your have a 1024-PPR encoder and...
If you only have one pin, you can count edges, but you can't determine direction, so your "position" will not be meaningful. In this application, it's hard to imagine any two pins being more important than these two. Perhaps you can find a way to...
This is my favourite approach (parts 1 & 2):
https://hackaday.com/2015/12/09/embed-with-elliot-debounce-your-noisy-buttons-part-i/
https://hackaday.com/2015/12/10/embed-with-elliot-debounce-your-noisy-buttons-part-ii/
If you're interested in another method, I'm attaching a cooperative OS and example sketch. I call it an "OS" rather than a scheduler because it includes a timer tick for a non-blocking os_delay(), and also has inter-task communication via...
As @jmarsh says, yield() is called once per loop() because Arduino's main() looks something like this:
void main(void) {
setup();
while(1) {
loop();
yield();
}
}
If you search the forum for "CCD", you will find posts by @DrM, who has built systems with CCD sensors and shared much of his designs and code. A lot of his work has to do with high-speed ADC interfaces. I'm not sure exactly what you mean about...
If your 5V DC-DC converter is reasonably clean, it should work OK to power the Teensy 4.1. I run the Teensy 4.1 on most of my boards directly from a DC-DC converter.
It is always best to power the Teensy 4.1 using 5V on the VIN/5V pin or you...
Okay, thanks very much. That's clear. I wonder if this was a consideration in Arduino's decision to use the setup/loop construct, which I'll never get used to...
@jmarsh, I'm sure you have a better understanding of this than I do, so can you please correct me where I'm wrong in my thinking? I thought volatile was needed because these are globals that are written in the ISR, but read in loop(), and without...
I just released v0.31.0. Here's the changelog:
## [0.31.0]
### Added
* Added `qnethernet_hal_fill_entropy(buf, size)` for filling a buffer with
random values.
* Added `EthernetClient::setConnectionTimeoutEnabled(flag)` to enable or disable...
Seems like it shouldn't be necessary for both the fields of a struct and the struct itself to be volatile. Making the whole struct volatile seems cleaner.
Here's an example program that computes execution time in microseconds for an IntervalTimer handler. The timer is configured for 1 kHz. Execution time is computed using the ARM cycle counter and converting to microseconds for printing.
#include...
@mborgerson, the code below is your (excellent) program from message #45 in this thread, with two changes:
use SdFat's built-in RingBuf for buffering the ADC data
avoid SD blocking via 512-byte writes and use of (file).isBusy()
Max SD write...
There is also a working program from a different thread (link below). This one does not use DMA, but rather simply uses the ADC's internal timer. It also optionally logs the data to a file on SD, which can handle quite high logging rates and very...
@BriComp is correct. FlasherX will not overwrite existing firmware unless the new firmware contains a text constant from header file FlashTxx.h. The idea is that FlasherX will only install new firmware that was built for the target. For Teensy...
Regarding the use of GPS for accurate timestamps, that is the essence of the T4.1 NTP server at the github and forum links below. The period of the PPS signal is measured via timer input capture. The measurements are filtered via PID to compute a...
Strange and confusing that they use the term "frequency of operation (fop)" rather than using f(SCK).
There are questions on the NXP community forum about this, and the NXP response is that the limit is 30 MHz, with no explanation regarding the...