for what it's worth, here is small T3.2 comparator sketch. I used a scope on pin 22 and pin 10 to measure latency
// comparator latency test COMP1 T3.2
// test with 1khz PWM from pin 22
// pin...
Type: Posts; User: manitou
for what it's worth, here is small T3.2 comparator sketch. I used a scope on pin 22 and pin 10 to measure latency
// comparator latency test COMP1 T3.2
// test with 1khz PWM from pin 22
// pin...
The GPT timers can have an external clock source. In the Teensy 4 ref manual search for "GPT1_CLK" to see which pins are used for each GPTx timer. Also see GPT2 external clock example at...
this DHT lib https://www.arduino.cc/reference/en/libraries/dhtlib/ says it is designed for AVR processors -- Teensy 3.2 is ARM not AVR. lib is using AVR registers for IO
// replace...
if you "got it working using just SPI", did you find the performance lacking? When I do a 1024-byte SPI.transfer() with SPI clock at 40MHz, I measure a data rate at 37.4 megabits/sec. I believe...
you could also do a reset, add this to your ISR
GPT1_CR |= GPT_CR_SWR;
GPT1_CR |= GPT_CR_CLKSRC(1); // Set clocksource to Peripheral Clock
How about trying
analogWriteFrequency(16, 8000000); // 16 and 17 max 8mhz uses TPM T3.6 only
analogWrite(16, 128);
after starting the analogWrite() you could print out the various TPM1...
Works for me too.
Here is complete example using FreqCount to measure frequency on pin 14. (For Teensy 4, gateinterval is in microseconds ! Who knew. web page documentation needs updating.) ...
see discussion on "slow PWM" for Teensy 4 using XBAR
https://forum.pjrc.com/threads/25164-2Hz-analogWriteFrequency-on-Teensy-3-1?p=247337&viewfull=1#post247337
LECTURE ON:
Using unbounded string operations results in hard-to-debug programs and programs subject to hacker exploitation. So having a max size value is the more desirable API. Kudos to Teensy....
Re: readStringUntil()
The teensy Stream library has a 2nd argument for readStringUntil(), see hardware/teensy/avr/cores/teensy4/Stream.h
String readStringUntil(char terminator, size_t max =...
I'm not sure why readStringUntil('\n') worked for you. Looking at packets from the weatherserver, there is no \n in the reply TCP packet, just the json string (last character is } ). Maybe...
I was able to get your sketch running with a T4.0 connected to adafruit WINC1500.
Starting weather connection to server...
connected to server...
FWIW:
If I use "double" instead of "float" in sketch in post #4, I don't see a superscalar speedup.
Teensy 4 @600mhz Faster
float
bench1: 0.999970, 2133434 us MFlops 224.99
bench2:...
Yes, when i use INPUT_DISABLE in the loop()
Your assignment is to produce the smallest sketch that behaves differently on your T3.2s -- and then post that sketch to this thread so others can try.
In the Knock example try adding pinMode(A10, INPUT_DISABLE); to the if statement
if (sensorReading >= threshold) {
// toggle the status of the ledPin:
ledState = !ledState;
//...
i don't think the eeprom_initalize() sets or changes any values in the EEPROM.
You might just remove all references to EEPROM.isReady() in your sketch and let the EEPROM read's and write's...
OK, i had a T.32 (batch 1805) that had never had its EEPROM used, and the sketch in post #1 hung! After running one of the T3.2 EEPROM examples, then the post #1 sketch ran. ;)
looking at eeprom.c, it looks like for read's and write's it tests if eeprom is ready, and if it is NOT, it calls eeprom_initialize(). So maybe one needs to run one of the examples from teensy...
The last line of MCU etching contains a batch production date. CTER1644B is year 2016 and week 44. ) I don't have any "recent" T3.2's. I have one with CTAD1806B. I fetched the EEPROMex library,...
I have no EEPROMex.h any where on my linux file system???
google tells me it is part of https://www.arduino.cc/reference/en/libraries/eepromex/, an AVR extension to the Arduiono EEPROM library. ...
your sketch in post #1 works for me on T4.0 with Adafruit ultimate GPS. (No 5v and no level shifters)
3v3 to GPS Vin, GND to GND, T4 pin 7 to GPS Tx, T4 pin 8 to GPS Rx
Time: 16:41:58.000
Date:...
have you tried analogWrite(16,128) on T3.6? I believe that is using TPM1 channel 0. I have some test functions for T3.6 TPM, see
https://github.com/manitou48/teensy3/blob/master/k66TPM.ino
you...
As noted on T3.2 card, backside pins 25 and 32 are PWM. So the simplest solution is to use analogWrite()
analogWriteFrequency(25,48000);
analogWrite(25,128); // 50% duty
Here is what the pin...
you should declare any external variables that are getting updated in the ISR as volatile
volatile unsigned int ISR_Cnt = 0;
here is a working example https://github.com/manitou48/teensy4/blob/master/gpt_isr.ino
I think the Everspin read/write currents refer to the power drawn by the MRAM chip on the PCB Vin and not to the current on the SPI pins.
Do you have another SPI device to confirm SPI on Teensy...
Here is a simple float/double sketch that I've run on ESP32 and Teensy 4. you can change the #if 0 to #if 1 to select float or double. Try it on your hardware.
// ll2utm
// double/float...
Looking at the source, the timeStatus values are
typedef enum {timeNotSet, timeNeedsSync, timeSet
} timeStatus_t ;
So the value of 2 is "timeSet", maybe if statement should read
if...
I think the Teensy 4 NXP SDK has examples using the ACMP comparators and DACs, see boards/evkmimxrt1060/driver_examples/cmp/polling/. The T4 "internal" DACs are only 6-bit. Here is a simple...
Just for the record, I have a SanDisk 8 GB uSD (SDHC, fat32) that has had lots of file activity. A directory listing from SD example listfiles on various Teensy 3* and 4* microSD drives (both SPI...
the examples/tutorials you are using are designed for T3*, not Teensy 4. The Teensy 4 has no alternate SPI pins, it will use pins 10-13 for SPI. Pin 13 is SPI CLK, so that'swhy LED is flashing...
Curious, what kind of microscope are you using?
The Ethernet MAC address and USB id are unique. The MCU stencil has a "batch date", me thinks, (shown in your closeup photo), but your concern is with the crystal.
That ppm is a bit high (spec 30 ppm?). My dozen or so T4's are within 10 ppm, though the Teensy4-micromod is 40 ppm, but that's a different PCB layout and different crystal (Sparkfun). Is your...
you should look at the NTP server thread. PID logic is used to discipline Teensy clock using GPS PPS and NMEA. It has software for Ethernet and NTP, but there is a post about a non-ethernet...
A bit messy. capture pins are fixed by the hardware. See page 297 of reference manual (search for ENET_1588_EVENT0_IN), there are 3 possible pins. library is using GPIO_B1_12. I don't know if the...
i have no problems with Teensy 4.1 using IDE 1.8.15/1.54 on Ubuntu 20.04. do you have the latest udev rules?
https://www.pjrc.com/teensy/00-teensy.rules
Voila, touchRead() starter sketch for LC:
#define THRESHOLD 2000
#define LEDPIN 13
void setup() {
Serial.begin(9600);
while (!Serial);
pinMode(LEDPIN, OUTPUT);
your sketch didn't compile -- spaces in "MED_SPEE D" and "VERY_HIGH_SP EED"
that ISR is firing every 11 us -- not sure what settle time is for DAC ... You might print out w_delay (with...
max PWM:
LC 24 mhz
Teensy3* F_BUS/2, e.g., 30 mhz (T3.6 pins 16, 17, TPM@16mhz. PWM 8mhz)
Teensy4 IPG clock/2 150mhz/2 = 75 mhz
Here's my guess, though I haven't done the math.
On the T4, FreqCount uses pin 9 to clock quad timer 4 (channels 2 and 3, atomic). Your signal generator is connected to pin 9. To measure the...
I've made NO changes to GPS.cpp. and you are not getting GNRMC sentences, you're getting GPRMC
confirm settings.h has
#define GPS_USES_RMC
#define GPS_BAUD 9600
#define GPS_SERIAL Serial1
#define DHCP_HOSTNAME "teensy-1"
Hmm, the simple test looks OK. What i have seen if you don't have an external antenna, when you power up the T4.1 ethernet, the adafruit GPS loses fix. With no fix, you get the web page that you...
here is minimal GPS test sketch running with T4.1 and adafruit ultimate v3 GPS
// GPS Tx to T4 pin 0 Rx, PPS to T4 pin 35, 3v3 to Vin, GND to GND
void ding() {
Serial.println("\nPPS");
}...
several T4 GPT examples at https://github.com/manitou48/teensy4
of course, Teensy interval timer allows you to call a function every second.
T4 register symbolic field names in...
info and schematic here: https://www.lectrobox.com/products/arduino_pc_game_port_joystick_shield/
or use your mutlimeter to see which DB15 pins are analog and which correspond to buttons ...
i'm using v7, CircuitPython 7.0.0 on 2021-09-20; Teensy 4.1 with IMXRT1062DVJ6A
i tested my simple sketch in post #3 on both T4.0 and T4.1. tested with scope and with LED and 470 ohm resistor
...
Your sketch worked for me (though you don't really need pinMode(A0, INPUT), harmless). if i jumper LC's 3.3v to A0 it reports 1023. if i jumper A0 to GND it reports 1. If A0 is unconnected you get...