Search results

  1. J

    Overclocking Teensy 4.1?

    Really? You could only find one thread? There are dozens. If you use the forum search bar and enter "Teensy 4.1 overclock", the first result is the thread shown below. https://forum.pjrc.com/index.php?threads/overclocking-the-teensy-4-1-and-teensy-4-0.76398/post-354155
  2. J

    Overclocking The Teensy 4.1 and Teensy 4.0

    The Teensy4 core contains the function below, which lets you set the clock and does its best to keep all of the peripherals working correctly, for example UART baud rates. It's not clear to me calling this function is 100% equivalent to setting CPU frequency via the IDE, but I have used it to...
  3. J

    Section type conflict and other memory error

    You don’t need two arrays or memcpy(). You can read directly into data[] like this: file2.readBytes( (char*)data, total*4 ); Some of your sketches have N and total the same. Others not.
  4. J

    Section type conflict and other memory error

    Your goal is to read the entire array from your LittleFS file into your PSRAM array, right? Have you tried reading the entire array with one call to readBytes(), similar to the way you write? file2.readBytes( data, total*4 );
  5. J

    Teensy 4.1 freezes if USB stick removed when reading/writing to it

    I use this method in FlasherX to do a reset after writing new firmware, and as far as I know it has always had the intended effect, with the 1062 rebooting and running the new firmware.
  6. J

    Teensy interfacing with AD7124

    The AD7124 is a rather complex 24-bit ADC, so you've got a learning curve ahead of you. The link below is to a library on github that supports this device. Instead of trying to write your own driver, you should install this library and run its example programs. Those should work right out of the...
  7. J

    Section type conflict and other memory error

    There is no way that I know of to upload data directly to your QSPI flash. Can you please tell us what you are trying to do? I thought you were trying to build a data logger, but if you need to load data into your flash, that doesn't sound like a data logger. What is in these files that you want...
  8. J

    Section type conflict and other memory error

    Use EXTMEM for PSRAM. Your write loop writes total values (916200) and then your read loop reads N values (100000). Is that what you intended? Why do you #include the file that you read/write within the program?
  9. J

    Section type conflict and other memory error

    Have you tried running the example datalogger program for the LittleFS library? I ask this again because it seems like it does more or less what you want, and if you read the code you might get a better understanding of how LittleFS works and how to use it. In particular, it shows how to erase...
  10. J

    Help needed: 'processSerialEventsList' is not a member of 'HardwareSerial'

    Oops. URL misfire! https://forum.pjrc.com/index.php?threads/teensyduino-1-59-released.74436/
  11. J

    Help needed: 'processSerialEventsList' is not a member of 'HardwareSerial'

    An important change in 1.59 was to update to C++17. I'm just guessing, but perhaps it is less lenient in terms of allowing multiple definitions. The link below is for the 1.59 release in the Announcements forum. https://forum.pjrc.com/index.php?threads/teensyduino-1-59-released.74436/
  12. J

    Section type conflict and other memory error

    Not sure LittleFS supports opening and reading from a file that is still open for writing. Please start from the LittleFS example program LittleFS_QSPI_Simple_Datalogger.ino
  13. J

    Trying to implement FOTA on Teensy 4.0

    @thebigg is correct, and that string *should* be in the file if you build the FlasherX example sketch with no changes to the source file. Perhaps you made some changes? You'll have to tell us more for us to help you solve the issue.
  14. J

    Trying to implement FOTA on Teensy 4.0

    I'm not sure what's wrong, but can you please do a restore to factory blink program and then try to repeat the process? It looks like you may have some data in upper flash that is preventing FlasherX from creating a sufficient buffer. You can find instructions to do the factory reset on this...
  15. J

    Teensy 4.1 SD-card extension issue

    I meant you might be able to send the SPI signals further than SDIO, but maybe not that far. Hopefully more hardware-savvy folks will comment, but for T4,0, for example, what I remember seeing is usually a piggyback board, so the signal distances remain very short.
  16. J

    Teensy 4.1 SD-card extension issue

    Can you show a photo? I’m guessing it’s just not good enough for SDIO, so yes, an alternative would be an SPI SD.
  17. J

    SPI slave on teensy 4.1

    This might be useful for others if it is something you can share.
  18. J

    Optimized function for array multiplication

    Did you benchmark the new versions? I'm curious how you know they are faster. I wouldn't have expected them to be very different.
  19. J

    Can arrays in DMAMEM be initialized?

    Do you mean the time for your application to zero the memory before using it? That seems like a question only you can answer, but if you do it in your setup() or one of the pre-setup "hook" functions, would that matter in your application?
  20. J

    OTA for Teensy 4.0

    Yes, FlasherX can work with any method of transferring the new firmware to Teensy. The repository has examples for UART, serial USB, and SD, but it could also be SPI, I2C, Ethernet, etc. Regardless of the method of transfer, the concept is always the same. 1) Define/create a buffer in RAM...
  21. J

    Guidance on precise ADC sampling frequency

    The ADC library has several examples of timed ADC conversion. Those would be a good starting point. EDIT: I tried the adc_timer example on a T4.1, and it worked nicely. First, add these two lines shown below just above #ifdef ADC_USE_TIMER #define ADC_USE_TIMER #define ADC_DUAL_ADCS The...
  22. J

    Help with compile error

    Your root sketch folder seems to be: but your libraries are one level below that: Maybe Arduino searches until it finds a libraries folder, but I've always had my libraries folder in my sketches folder. In your case, that would be:
  23. J

    Voltage Divider Issue Teensy 4.1 -> SOLVED

    Be very careful. Teensy 4.x is 3.3V, and if you apply voltage > 3.3V to any pin, damage is likely.
  24. J

    Nanosecond pulse generator instability issues

    If I understand what the OP means here, it can be done by with a QTMR, interrupting on input capture and then setting an output compare some number of clocks ahead of the capture value. The output compare match can trigger the output signal high to go high, so the output rising edge would be...
  25. J

    TeensyDuino: Please add control for GPIO hardware

    You won’t find detailed documentation for everything. You have the PJRC web pages, Arduino API documentation, this forum, GitHub, google, and the reference manual. It’s sometimes better to use google even to find forum messages. Edit: Forgot to mention source code.
  26. J

    Nanosecond pulse generator instability issues

    Your question has a lot in common with this recent thread https://forum.pjrc.com/index.php?threads/frequency-doubler-for-lockin-amplifier.76234/ It shows how to trigger an interrupt on the input pin and then write the output pin from the ISR. That might actually be slower than your tight wait...
  27. J

    Frequency doubler for lockin amplifier

    Hey, that’s great! Thanks for posting the photos. I visited Groningen once and really liked it. BTW, that’s quite a well-equipped lab you have there.
  28. J

    Frequency doubler for lockin amplifier

    You're welcome. I guess you could reduce the rising edge delay a tiny bit by swapping the first two statements in onInputChange(). If the digitalWriteFast() is the first statement, the rising edge of the output will be as close as possible to the rising/falling edges of the input.
  29. J

    Frequency doubler for lockin amplifier

    I'm not sure what you're doing in your latest program with a Timer to toggle the output. The code below is based on your previous program with changes to make it faster. I haven't looked at the output with a scope or logic analyzer, but I think this will be about as good as it can get without...
  30. J

    NXP CMSIS FFT on Teensy4?

    cores\teensy4\arm_math.h
  31. J

    NXP CMSIS FFT on Teensy4?

    I don't know of any Teensy-specific documentation on FFT other than what is in the Audio tutorial, but the T4 core includes much of a somewhat old version of CMSIS DSP, including fixed-point and 32-bit float FFT. See file arm_math.h for details. I don't know how fast it is or how it would...
  32. J

    Frequency doubler for lockin amplifier

    T4 has lots of timers, and most (all?) of them have both input capture and output compare capability. I would start with GPT because it's a 32-bit timer so it's better suited to your low frequencies. QTMR is 16-bit and can be cascaded to make 32-bit or more, which would add complexity in your...
  33. J

    Next new Teensy , USB-C Please.

    If I had to guess, I’d say there will be a new Teensy someday, and it will probably have USB-C.
  34. J

    Frequency doubler for lockin amplifier

    Do you mean with a Teensy + software? You could measure the period of the output of the SR830 and generate PWM with half of that period (twice the frequency). Since you know the output of the SR830 is a square wave, you don't have to measure the high/low time, and you can always generate a...
  35. J

    questions about threads on teensy 4.1

    I agree with you, though, that his issue is not one to solve with thread fiddling.
  36. J

    questions about threads on teensy 4.1

    TeensyThreads has mutexes. I was trying to answer his questions.
  37. J

    questions about threads on teensy 4.1

    I've never used TeensyThreads, but I looked at the source code. suspend() takes an argument of a task id, and all it does is set the task state to SUSPENDED. It doesn't trigger a task switch, so I think if a task called it with its own id, the task would at least run to the end of its time...
  38. J

    questions about threads on teensy 4.1

    You could avoid the whine by adding a deadband on your output If (abs(output) < x) output = 0
  39. J

    Simple computation requires presence of Serial.print statement in for loop

    USB (Serial) communication uses (requires?) interrupts, and I’m guessing that it’s not okay to turn them and then do a ton of Serial printing.
  40. J

    Simple computation requires presence of Serial.print statement in for loop

    Rather than turn interrupts on and off, define variables that provide communication between the interrupt-level and task(loop) code. For example, when the array of ADC samples is full, the interrupt routine could set bufferfull = true, and it could stop adding to the buffer as long as bufferfull...
  41. J

    Simple computation requires presence of Serial.print statement in for loop

    Why are you turning off interrupts? If bufferdone is a flag that tells you that you have a buffer full of A/D values, you can process them just as well without turning off interrupts. When you're done with that processing you can start a new set of samples or you can try to interleave them if...
  42. J

    Low-pass filter problem

    He's saying you also need to connect the two Teensy's GND-to-GND
  43. J

    Low-pass filter problem

    Is the only connection between the two Teensy's the two PWM outputs from Teensy #1 going to analog inputs on Teensy #2? Is there some reason that needs to be an analog interface? What update rate do you need on that interface?
  44. J

    Low-pass filter problem

    Can you please try to explain this in more detail? I don't understand what you're trying to do.
  45. J

    SD logger issues

    You're welcome. Can you tell us the data rate? How many CAN messages per second?
  46. J

    SD logger issues

    Looking at your sketch a little more, RingBuf can replace all of your existing buffering. You don't need any arrays or indexes. The sketch below always opens and writes to the same file, but it shows the basics of writing to the RingBuf from an ISR and reading from the RingBuf and writing to the...
  47. J

    SD logger issues

    Your RingBuf is only 512 bytes now. Make it larger, something like 32768 or 65536, just to be sure it's not an issue. After setup(), assuming open() and preAllocate() are successful, you will have a 1GB file open and ready to write. Your state machine closes the file every time it writes and...
  48. J

    About Teensy 4.1 Operating Temperature

    I hope others reply, but that is the internal junction temperature, and from what I can see, that temperature can easily reach 30 C above ambient if running at 600 MHz. I think 0-55 ambient allows for keeping the junction temperature well below 95. You can also put a heatsync on it. The life of...
  49. J

    About Teensy 4.1 Operating Temperature

    Teensy uses the commercial temperature range chips. I think they are rated 0-55 C.
Back
Top