Oh my... :o
This was a silly bug on the Teensy side. I was for some reason assuming that the transmitted 25kB are always synchronized with the data in the USB buffers. I fixed that and get the following result:
Max...
The app I sent in #1 is just sending that 25kB string over and over. I can do a more simplistic console application if that helps? But let me check my code first, might be some bug on my side as well.
Yes, the upload button was just a quick hack, I can fix that later today. Strange that you get transmission issues. Runs perfectly here (as long as I don't add more than 200µs delay). With or without a hub.
So, I added a background worker which delays (1ms) each second. Not much but this already generates problems.
IntervalTimer timer;
void worker()
{
// delay(1);
Serial1.println(millis());
}
@Paul: Tested with RX_NUM = 32. Speed went up from 13.5 to 13.6 but that might as well be some other effect or just by chance.
@Defragster: I cloned the core files from Pauls gitHub repo yesterday. There was some...
I can certainly try. However, my gut feeling is that download speed is currently limited by the maximum 512 byte reported by Serial.available(). Here the receiving function. (Sent text has a '\0' for EOF, buffer lives...
I did a quick Win10 app to test the serial communication speed of a T4.0 and a T3.6 under somehow real life conditions. The app continuously downloads a block of 25kB to the Teensy. The teensy copies the received data...
I finally found time to try your lib.
I tested it with count rates up to 1 MHz and randomly switching direction. I also tried phase angles as small as 10° and bounced signal transitions.
So far I didn't observe any...
I might be biased :-), but I prefer VisualTeensy over VMicro... https://github.com/luni64/VisualTeensy
Easy to use, no hidden build magic, good intellisense engine, supports Teensy.exe and tyTools for uploads. Vscode...
@Kurt, tried your sketch, it kind of uploads when uploaded from the IDE (you see the process in the verbose log) but it then breaks (timeout?) and never reboots.
Loading the same hex file directly with Teensy.exe...
Yes, because you don't use the array the compiler optimized it completely away...
Here the linker output for your changed code:
.vsteensy/build/TestProject.elf
Memory region Used Size Region Size %age...
Just wondering why that would be called? Where do you assign that function to the actual IRQ_FTM2 called by the NVIC?
Tekceleo* tekceleo;
void setup()
{
...
Would be easier to help if you could generate a minimal example which shows the error and can be compiled without hardware / libraries.
Generally:
I'd try to avoid hardware access in a constructor. If, as in your...
I tested your code and don't see a problem with acceleration.
I changed the following for my tests:
void setup()
{
while(!Serial); //<<<<<<<<<<<<<<<<<<<<<<<< Need to...
For an acceleration from 0 to 48kHz in 4s you need a setting of 48'000/4 = 12'000 stp/s^2. TeensyStep allows values from 1 to 500'000 so this should be no problem.
This is very unlikely. Can you post an -ideally...
You can also give VisualTeensy a try. https://github.com/luni64/VisualTeensy
This uses VSCode which works IMHO better than VisualStudio since it uses gcc for the intellisense analysis. Thus it doesn't need to "trick"...
I don't see your static variable "instance" defined in your cpp file. If it isn't defined in some other place you need to add
Tekceleo* Tekceleo::instance = nullptr; to your cpp file.
See also ...
Due to recent interest and for easier installation I pushed TeensySharp (upload firmware from dotNet applications, find Teensies on the bus, get com port, get notifications about added/removed Teensies...) to nuget. ...
I just did a quick experiment and changed the linker script for the T-LC to use the '_teensy_model_identifier = 0x20' as FILL byte (instead of the usual 0xFF)
...
SECTIONS
{
.text : {
. = 0;...
Just for my curiosity. What would be the advantage of connecting the ESP to those UART interface? Why not simply connecting it to the standard Teensy USB port and do the programming over that? (AFAIK there are USB libs...
That would be really great for debugging apps which have their normal communication channel (commands, data etc) to the PC via Serial. For those apps I usually connect a a USB/Serial cable to one of the hardware uarts...
@ Gremlin, I'm aware of that and fixed it already for another project. I'll port it to TeensySharp in the next release.
@Paul: It would be perfect to have a byte at a fixed memory location to identify the board type...
Any chance that you share your code to access the IPS6404? Just ordered a bunch of them for experimenting, so some working examples to start from might be useful.
That's very useful indeed. I will certainly test it with high resolution encoders as soon as I find some time.
If you want to do some performance testing I have a Teensy quadrature tester on gitHub...
TeensySharp https://github.com/luni64/TeensySharp is a c# library which you can use to upload firmware to T3.1 - T4.0. You can also use it to identify connected Teensies, get notified on plugging in / out of Teensies, ...
Great explanation. There is a small error in it which is worth correcting:
It is the other way round. Signed will be promoted to unsigned which can be quite confusing.
int a = 7;
int b = -10;
float c =...
That is correct. i++ is a post increment operator. I.e. it increments after the assignment. If you use ++i it should work.
Anyway, you probably meant i++, instead of the unusual i = i++; ?
Edit: actually it is...
Just measured the speed of this snippet with an LA on pin 11 and get some 250ns on a T4@600MHz
digitalWriteFast(11, HIGH);
volatile uint16_t value =
digitalReadFast(2) << 0 |
...
I wonder if the bit shuffling will be faster at the end as reading the pins sequentially. However, you should use digitalReadFast instead of digitalRead and it might be faster to OR the results together instead of...
The TeensyLC has an ARM controller not an AVR. So, accessing AVR registers (PORTD ...) doesn't make much sense. However, for some (portability?) reason there is emulation code in avr_emulation.h which simulates some ...
I'd use a standard 74HC575 for that. It only requires 3 wires for 8 outputs.
Here some information. https://learn.adafruit.com/adafruit-arduino-lesson-4-eight-leds/the-74hc595-shift-register
I'm afraid you won't get much faster than this and even that generates a significant load on the T4. Here https://forum.pjrc.com/threads/57959-Teensy-4-IntervalTimer-Max-Speed some information on the performance of the...
This of course only works if the Teensy has the serial interface activated. For the HID modes you need to send some magic bytes to the feature report of one of the interfaces. If you are interested here a c# snippet I...
Here a link to about 5000 rs485 receivers/drivers. https://octopart.com/electronic-parts/integrated-circuits-ics/interface-ics/rs-232-rs-422-rs-485-interface-ics
The table is very well organized, you can filter by...
RS485 should be able to do this. E.g. the SN65HVD82 http://www.ti.com/lit/ds/symlink/sn65hvd82.pdf can drive up to 256 receivers. Usage is really simple if the nodes only need to listen.
Here a quick sketch showing how to extract this information. One probably can find a more intelligent way but this is doing what you need.
#include "Arduino.h"
const char *portName(volatile void *address)
{
...
Is the timer GPT2 used for some internal tasks? Disabling it by setting GPT2_CR to zero crashes the system. GPT1 works as expected.
void setup()
{
pinMode(LED_BUILTIN, OUTPUT);
GPT1_CR = 0; // fine
GPT2_CR...
This is part of the core libraries which you can find here (win10) "Arduino/hardware/teensy/avr/cores/teensy3" or "../teensy4" for the T4. Nothing to install,just use it.
(Github:...
I think the root cause for that is that reading/writing of the peripheral registers (not tightly coupled) takes rather long and is not primarily related to F_CPU but to the speed of peripheral bus.
This test from...
Thanks for the measurments defragster. Unfortuately it does not look very good. ~40% load for having 4 interval timer toggling pins at 100kHz does somehow not fit to the otherwise very fast processor. Maybe there is...
See here for links to some tests from early this year. https://forum.pjrc.com/threads/57951-Teensy-3-x-library-for-tick-timer?p=218573&viewfull=1#post218573
I reactivated one of the test sketches from then to see if...