Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: manitou

Page 1 of 10 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    8
    Views
    230

    the .cpp file you attached looks to be the...

    the .cpp file you attached looks to be the original from the github site ??

    I added a scope snapshot to post #5 showing LC pins 2,14,7
  2. Replies
    8
    Views
    230

    Hmmm, If the FTM timer is ticking at 4 MHz, then...

    Hmmm, If the FTM timer is ticking at 4 MHz, then to generate a data pulse will require a tick to generate a HIGH bit and then a tick for a LOW bit, so the data rate for galvanometer data will be 2...
  3. See follow-up thread...

    See follow-up thread
  4. Replies
    8
    Views
    230

    Re: a better fix? A better solution is to...

    Re: a better fix?

    A better solution is to remove the if(txPing & 2) logic from the isr in the library, so the dma.sourceBuffer() is executed on every DMA ISR.

    // if(txPing & 2) {
    // txPing...
  5. Replies
    8
    Views
    230

    here is sketch that demonstrates using TPM2/DMA...

    here is sketch that demonstrates using TPM2/DMA to set the lower 8 PORTD bits on Teensy LC (tested with scope on PORTD pins)

    // PORTD pins 2 14 7 8 6 20 21 5 TPM2

    #include <DMAChannel.h>
    ...
  6. for what it's worth, here is small T3.2...

    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...
  7. The GPT timers can have an external clock source....

    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...
  8. this DHT lib...

    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...
  9. if you "got it working using just SPI", did you ...

    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...
  10. Replies
    3
    Views
    81

    you could also do a reset, add this to your ISR ...

    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
  11. How about trying analogWriteFrequency(16,...

    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...
  12. Works for me too. Here is complete example...

    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.) ...
  13. see discussion on "slow PWM" for Teensy 4 using...

    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
  14. LECTURE ON: Using unbounded string operations...

    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....
  15. Re: readStringUntil() The teensy Stream...

    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 =...
  16. I'm not sure why readStringUntil('\n') worked...

    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...
  17. I was able to get your sketch running with a T4.0...

    I was able to get your sketch running with a T4.0 connected to adafruit WINC1500.

    Starting weather connection to server...
    connected to server...
  18. Replies
    8
    Views
    624

    FWIW: If I use "double" instead of "float" in...

    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:...
  19. Replies
    91
    Views
    26,431

    Yes, when i use INPUT_DISABLE in the loop()

    Yes, when i use INPUT_DISABLE in the loop()
  20. Replies
    14
    Views
    404

    Your assignment is to produce the smallest sketch...

    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.
  21. Replies
    91
    Views
    26,431

    In the Knock example try adding pinMode(A10,...

    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;
    //...
  22. Replies
    24
    Views
    491

    i don't think the eeprom_initalize() sets or...

    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...
  23. Replies
    24
    Views
    491

    OK, i had a T.32 (batch 1805) that had never had...

    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. ;)
  24. Replies
    24
    Views
    491

    looking at eeprom.c, it looks like for read's and...

    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...
  25. Replies
    24
    Views
    491

    The last line of MCU etching contains a batch...

    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,...
  26. Replies
    24
    Views
    491

    I have no EEPROMex.h any where on my linux file...

    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. ...
  27. Replies
    7
    Views
    601

    your sketch in post #1 works for me on T4.0 with...

    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:...
  28. Replies
    12
    Views
    353

    have you tried analogWrite(16,128) on T3.6? I...

    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...
  29. As noted on T3.2 card, backside pins 25 and 32...

    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...
  30. Replies
    10
    Views
    221

    you should declare any external variables that...

    you should declare any external variables that are getting updated in the ISR as volatile
    volatile unsigned int ISR_Cnt = 0;
  31. Replies
    10
    Views
    221

    here is a working example ...

    here is a working example https://github.com/manitou48/teensy4/blob/master/gpt_isr.ino
  32. I think the Everspin read/write currents refer to...

    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...
  33. Replies
    11
    Views
    397

    Here is a simple float/double sketch that I've...

    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...
  34. Replies
    2
    Views
    230

    Looking at the source, the timeStatus values are...

    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...
  35. Replies
    567
    Views
    134,326

    I think the Teensy 4 NXP SDK has examples using...

    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...
  36. Replies
    1
    Views
    276

    SD directory listing anomaly

    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...
  37. the examples/tutorials you are using are designed...

    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...
  38. Replies
    93
    Views
    19,175

    Curious, what kind of microscope are you using?

    Curious, what kind of microscope are you using?
  39. Replies
    93
    Views
    19,175

    The Ethernet MAC address and USB id are unique. ...

    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.
  40. Replies
    93
    Views
    19,175

    That ppm is a bit high (spec 30 ppm?). My dozen...

    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...
  41. Replies
    2
    Views
    510

    you should look at the NTP server thread...

    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...
  42. Replies
    93
    Views
    19,175

    A bit messy. capture pins are fixed by the...

    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...
  43. Replies
    3
    Views
    479

    i have no problems with Teensy 4.1 using IDE...

    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
  44. Replies
    5
    Views
    435

    Voila, touchRead() starter sketch for LC: ...

    Voila, touchRead() starter sketch for LC:


    #define THRESHOLD 2000
    #define LEDPIN 13

    void setup() {
    Serial.begin(9600);
    while (!Serial);
    pinMode(LEDPIN, OUTPUT);
  45. Replies
    4
    Views
    464

    your sketch didn't compile -- spaces in...

    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...
  46. max PWM: LC 24 mhz Teensy3* F_BUS/2, ...

    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
  47. Here's my guess, though I haven't done the math....

    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...
  48. Replies
    93
    Views
    19,175

    I've made NO changes to GPS.cpp. and you are...

    I've made NO changes to GPS.cpp. and you are not getting GNRMC sentences, you're getting GPRMC
  49. Replies
    93
    Views
    19,175

    confirm settings.h has #define GPS_USES_RMC ...

    confirm settings.h has

    #define GPS_USES_RMC

    #define GPS_BAUD 9600
    #define GPS_SERIAL Serial1

    #define DHCP_HOSTNAME "teensy-1"
  50. Replies
    93
    Views
    19,175

    Hmm, the simple test looks OK. What i have seen...

    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...
Results 1 to 50 of 500
Page 1 of 10 1 2 3 4