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...
Rather than explain, can you fill in the rest of the code so it is a complete program any of us could run and see the behavior?
Even if the missing setup() and loop() code is trivial, it's guesswork for anyone to try...
Power-only cables are the most common problem. Make sure your USB cable really is one with data wires.
On Linux, you must install the udev rules file.
https://www.pjrc.com/teensy/00-teensy.rules
If neither of...
Looks like there is indeed a problem.
const char *longstring = "Serial.send_now() DOES return (toggling a digital Pin immediately after send_now is observable) even though my (possibly flawed) understanding is that...
There may still be a previously unknown (after all these years...) bug in the Teensy 2 USB code. But obviously a small simple program doesn't trigger it. If I should investigate, could you try this simple code and...
I tried but could not reproduce this problem.
Here is the code I tested.
const char *longstring = "Serial.send_now() DOES return (toggling a digital Pin immediately after send_now is observable) even though my...
That part must be present for Teensy 4.0 to fully power up.
But if you lose the original part, just a piece of wire or solder bridge across the pads will do. Its purpose is to prevent the DC-DC switching noise from...
Are you sure this was really wrong information? It looks like the sort of error expected if something called strlen() with a null pointer.
This got me to looking at places where we use strlen(). By far the commonly...
Those displays are cheaply made. The ones PJRC sells get 100% tested and we often find a couple bad units in each batch which we just throw away. I'm pretty sure whoever in China manufacturers them does only random...
Yes, we can be sure the linker will not ignore the compile unit with the reset vector. But moving code that requires .cpp compilation to a .c file isn't really an option.
Substantially changing how we build for...
Kurt, could you remind me what's wrong with addr2line?
I tried a few quick tests on Linux. Seems to work fine. Maybe it's only on Windows?
Can you suggest a test case?
Also works on "buster"
paul@pi4:~ $ sudo apt install libusb-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libusb-dev is already the newest version...
I've added the check for stdout, stderr so printf() can "just work".
https://github.com/PaulStoffregen/cores/commit/0bdfd22c52099831e72983c3237ad183ce51e02f
However, the "undefined reference to _write" is still an...
Kurt's big pinout chart has the easiest info
https://forum.pjrc.com/threads/66144-TEENSY-4-1-where-do-I-connect-to-use-third-SPI?p=268934&viewfull=1#post268934
Choose 2 pins with the same FlexIO peripheral (3...
If this is just test code sending dummy variables (doesn't depend on any special hardware), maybe you could post the actual code so anyone with 2 Teensy 4.1 and a solderless breadboard to quickly connect the serial...
Do you have a voltmeter? Maybe try the LED blink program. Its default is pin 13. Upload and then touch your voltmeter to GND and SCK on the top of the display, to check that pin 13 really is changing voltage...