Should work. There is certainly no hardware resource conflict.
But to access the SPI2 signals, you will need to solder wires to the pins normally used for PSRAM. It can be done, as you can see in the photos when I...
Built in SD card on Teensy 4.1 uses SDIO. It does not use SPI2. Those pins do also have SPI2 function, but SPI2 alternate function is not assigned to the correct pins. Only SDIO can be used for the build in SD card...
Yes, more or less. Mostly less. Teensy 4.1 doesn't have quite the analog performance of Teensy 3.2. As a general rule for analog features embedded inside mostly digital chips, improvements in silicon process that...
Here is the info you seek, including some important details about powerup sequence if you remove U2.
https://forum.pjrc.com/threads/71167-4-1-latest-schematics?p=313400&viewfull=1#post313400
If you can't get it solved, maybe best to ask for help on Arduino's forum, as this really sounds like a IDE software issue (probably) not specific to Teensy.
https://forum.arduino.cc/c/software/arduino-ide-2-0/93
...
Yes, Teensy uses a special SD library which is really just a thin wrapper for SdFat. Teensy also uses a customized copy of SdFat. Normally these are supposed to come automatically with the platform, at least when...
As a first troubleshooting step, try running Teensy from a battery or "floating" power supply. Make sure the USB cable is unplugged and no other wires apart from the MQS output connect it to any grounds on other...
memcpy() is widely used by non-driver libraries and programs. Killing the huge benefits of caching for all normal uses would have a terrible performance hit.
Yes, exactly.
Rev D2 audio shields are in stock. They shipped to most distributors this week. Most should have it in stock soon.
If you just want to get sound output, MQS is probably your best option. It's basically PWM with...
In today's market you're probably not going to find many of the older pre-USB3 hub chips from major semiconductor companies like Texas Instruments. Even though the parts are still shown on their websites as if they...
No, that's not correct for SdFat.
Setting the CS pin to BUILTIN_SDCARD is only for the SD library SD.begin(). It is a SD library convention which does not apply to SdFat.
When you use SdFat functions, either...
First part answered on another thread where you asked the same question.
https://forum.pjrc.com/threads/72029-hardware-essentials
The audio library has this tone detection.
...
That diagram is missing 3 of the 4 wires you need for the SD card on the audio shield to work, and 1 of the 4 wires appear to be shown connected to the wrong place.
The 4 connections you need are:
pin 10 to SDCS -...
In the audio tutorial material, almost all of it works if you use Teensy 4.0 and the Rev D or D2 audio shield (the one meant for Teensy 4.0).
https://www.pjrc.com/store/audio_tutorial_kit.html
As far as I know,...
Just a completely blind guess, but if the keyboard is arranged in a row-column requiring scanning to read out all the keys, often extra delay is needed between driving the rows and reading the columns.
Have you tried deleting "PROGMEM" from all the places with "error: section attribute not allowed"? Seems like the easy and obvious first step.
Looking only briefly at your code, I see you have a "lib" folder where...
You really should use real pullup resistors, between 1K to 4.7K. But if you omit them, if using the Wire library on Teensy 4.0, the weak internal pullup resistors are activated. They result in a weak / slow pullup...
As for what went wrong, almost impossible to guess from only this info. Just a defective board doesn't make sense if 2 have failed. Likewise for ESD, unless you have a really horrible environment (you would know as...
To start troubleshooting, first get a DC voltmeter. Measure the voltage between VIN and GND. It should be 5 volts, from USB. Next measure the voltage from 3.3V to GND. If Teensy powered up, it should be 3.3V.
If...
If you build your own PCB using the T4 bootloader chip, it will work as lockable Teensy.
If you want your custom board to work as standard Teensy, do not run the LockSecureMode sketch, and run the small program shown...
If you really want to do this, maybe you're now ready for that linker scripts rabbit hole (as mentioned in the last paragraph of msg #2).
To avoid the need for a dynamic loading process that re-writes all the...
"Error: Secure mode can not be set" means you have standard Teensy.
Aside from this error message, here are a few ways you can tell which Teensy type you have.
1: The printing on the anti-static bag is different,...
To understand, "const char *" and "char *" are both pointers to characters. Having "const" means you will only read the character. Normal "char *" can read or write.
A string literal is a read-only group of...
Best way is to build your code as audio library classes.
https://www.pjrc.com/teensy/td_libs_AudioNewObjects.html
Using the queues is possible, but they are designed to automatically buffer (queue) audio blocks if...
This isn't enough. Nobody can see the problem, let alone reproduce it, by such a short code fragment.
The best I can tell you from only that code fragment is I and countless other people have successfully written to...
Let me answer with another question...
Will the calling code ever use a string constant (just using string in double quotes rather than a variable, or "string literal" in C language jargon)?
If so, then the...
1.58-beta3 is called "0.58.3" in IDE2's Boards Manager. Just click the drop-down list to select it and click "Install".
The betas are numbered this way to prevent IDE2 from prompting every running the latest stable...
Maybe this advice will come too late, but IDE 1.x has a feature called "portable mode". You create a folder named "portable", which causes that copy of the IDE to be completely self contained. The Teensyduino...
The ADC input is supported by the latest audio library.
https://www.pjrc.com/teensy/gui/?info=AudioInputAnalog
Reading it this way with the ADC library is pretty much impossible to get the sample rate to closely...
No CAD schematic exists. I don't use CAD schematics. None exists in Eagle, Kicad or any other format.
For layout, I use an ancient version of Pads. I also follow a pretty unconventional process (no CAD schematic)...
I'm pretty sure "error: 'AudioPlaySdWavX' does not name a type" means this project has other files you also need to copy.
Like the main code, and all software source code, attention to detail is important. This is a...
Looks like something went wrong when you copied this code into Arduino.
Here is a portion of the code shown in msg #1:
// variables for writing to WAV file
unsigned long ChunkSize = 0L;
Partly inertia, none of the examples were deleted in the move to SdFat wrapper.
But also partly for testing and maintaining compatibility. My perl script that checks if all examples compile won't be able to tell if...
Maybe the diagram and photo on this message can help?
https://forum.pjrc.com/threads/57167-Teensy-4-0-I2S-Support?p=212481#post212481
If you wired it up and it's not working, don't be shy, show us photos of your...
Yes, but with a deprecated warning.
https://github.com/PaulStoffregen/SD/commit/3f44f07339f2d67e7e92913869cf4fd85bbe80fc
To explain a bit further, SdVolume is certainly not the intended public API to access the SD...
Oh, now I see where things are going wrong.
Those lines are commented out because "Sd2Card" and "SdVolume" are just compatibility classes to allow programs which depend on some APIs from the ancient Arduino SD...
The code in msg #1 is part of the SdFat library. It's not meant to be compiled automatically by the Arduino IDE when your program includes either SD.h or SdFat.h.
Maybe you copied all this code into the Arduino IDE...
I need to speak carefully. PJRC signed a NDA with NXP. The finer details of the IMXRT security are NXP confidential.
This capability might not actually work on standard Teensy, because of the way the lock bits...
Those early gcc commands are with "-E", which gcc documents as "Preprocess only; do not compile, assemble or link". Arduino uses this to discover which libraries are actually needed. Old versions of Arduino only...
The address will (probably) change as you make any edits to your program. All the files you've created on SD cards that are position dependent code will need to be rebuilt every time the buffer address changes. Maybe...
The answer is yes, you can. But a few important caveats exist.
The easy part is the array must be 16 bit aligned. That's why it's an array of uint16_t in the core library, not an array of char as in msg #10.
By...
Yes, that is the concept, though it's really only a recommendation based on testing at room temperature with free air exposure.
If you continuously draw 250 mA and ethernet is on and a SD card is regularly writing...
You can find an example here:
https://github.com/PaulStoffregen/cores/blob/6d6c215501509ee49cdd222992d1f788ab66a341/teensy3/eeprom.c#L133
Scroll up to line 116 for the array initialization, and scroll down to line...
Since Teensyduino 1.54, everything is SdFat. The SD.h library for Teensy is just inline functions that actually use SdFat.
I'm guessing you probably saw advice online that SdFat is efficient and the old SD library...
Quick answers:
Recommend starting with File > Examples > SD > SdFat_Usage. This gives compatibility with programs written for SD.h but you can access all the SdFat functions if you really want.
Overclocking SDIO...
First, go to /users/justin/documents/arduino/libraries and delete anything you copied there. That "libraries" folder is a special location. Putting normal program there could cause problems. So before you go any...
As with ordinary computers, overclocking Teensy 4 requires cooling to dissipate the extra heat, and even with the best cooling the combination of higher internal voltage and temperature can shorten the chip's life span.
Writing a serial driver from scratch like this is no easy task. So many subtle corner cases exist. We've had years of discovering and fixing extremely rare issues, like data or OR & FE status bits lingering in the...
I added digitalWriteFast() on lpuart6_tx_isr and lpuart6_rx_isr inside the library, like this
void lpuart6_rx_isr() {
digitalWriteFast(33, HIGH); // Red trace on scope
Receiver *r = rxInstances;
if (r !=...
Wow, you're right, doesn't depend on audio at all.
Was able to reproduce it with a 0.1uF capacitor from pin 0 to GND and this program using Serial1 rather than Serial3.
#include <TeensyDMX.h>
namespace...
R7 is only needed during the 15 sec restore process. If you just leave R7 as an open circuit, everything except that restore process will work fine. Holding the button for 15 seconds will give the quick blink on the...
R6, yes.
R7, no. In fact, we changed this to 470K some time ago (but schematic wasn't updated) because 100K with the newer regulators was causing startup issues at lower input voltage, like under 4 volts.
Still not sure why it's crashing, but pretty sure it's a bug somewhere in TeensyDMX.
This simple program shows Serial3 does indeed work fine with Audio running.
#include <Audio.h>
AudioOutputI2S ...
Continuing to look into this issue. Trimmed it down to smaller program which reproduces the problem (after power cycle).
#include <TeensyDMX.h>
#include <Audio.h>
namespace teensydmx = ::qindesign::teensydmx;...
Tried just now. Looks like it is getting stuck somewhere. This is what I'm seeing (this time using old IDE to view)
Here's what my scope sees on pin 14
I'm pretty sure the multiple boards problem in msg #42-43 is a long-standing known limitation with Teensy Loader. If any Teensy is running in bootloader mode, it gets used no matter which was selected in Arduino IDE. ...
About pin 15...
The audio shield connects pin 15 to a capacitor, and to the location where you could solder a thumbwheel pot. If you haven't added the pot, then pin 15 is only connected to a capacitor.
You...
I'm running it here on a Teensy 4.1 with audio shield, SD card in the audio shield, and oscilloscope connected to pin 14 (TX3).
This is what I see after uploading and opening the serial monitor.
Here is the...
Please give this copy of Boards.h a try. I ran it with StandardFirmata example talking to firmata_test on Linux. Pins 28-37, at least for outputs connected to LEDs. Didn't try other modes (yet).
100 to 120 mA is pretty typical for 100 Mbit/sec ethernet. The datasheet spec is somewhat misleading, showing only the power dissipated inside the chip. Power is also dissipated in the magnetics, some of which ends up...
Opps, I misspoke about "OctoWS2811 on Teensy 4.1 doesn't have any of these limits". Been a while since I wrote that code. The DMA channel doing the middle of each frame that actually transmits data is using chunks...
ARM Cortex-M has nested priority-based interrupt, so when a pending interrupt can run is a little more complex than just a global interrupt enable bit.
All too often Arduino will print a critical error message together with a lot of unimportant warnings or just info messages.
This this case, the critical error message is this:
This means you copied things to...
Sadly, NXP's documentation leaves quite a lot to be desired on this matter. So many finer details aren't clear (at least to me) and need to be investigated by experimentation.
Yes, that's what happens on...
Seems unlikely, since attachInterrupt() clears prior pending.
https://github.com/PaulStoffregen/cores/blob/c7e84c482ce094f4325ed20d73719036d7cd5587/teensy4/interrupt.c#L120
Please start it with a test case I...
Ah, ok then, problem solved.
I guess I misunderstood the code's purpose with msg #9 "The spacing between the two leading edges in the lower trace, or the duration of the pulse upper trace, should be roughly equal to...
I'm testing this now. Seems to be effective on Teensy 4. But Teensy 3 (where each PIT timer has a dedicated interrupt) might also need NVIC pending bit cleared.
I've updated the IntervalTimer documentation to mention this issue and advise calling end() as early as possible within the interrupt function.
https://www.pjrc.com/teensy/td_timing_IntervalTimer.html
Indeed, Defragster called it on the first issue, all the way back at msg #3.
Here is a slightly modified copy of the program which calls end() before the timer can trigger again and does the delay before manipulating...
I believe there may be 2 separate issues at play here, which makes for an extremely confusing situation. Even just diagnosing a single issue is hard enough...
IntervalTimer end() may indeed have a bug. Or maybe...