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 registers to see how...
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.) Jumper pin 9 to pin...
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.
LECTURE OFF:
...
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 = 120);
So the default...
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 semantics of adafruit lib...
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: 0.999982 1.999964,...
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;
// update the LED pin...
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 fall through to the...
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 eeprom lib to initialize...
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, and your sketch...
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. So i wonder if it has...
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: 25/3/2022
Fix: 1...
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 have to configure the...