Ok, by just moving that code around inside startup_MIMXRT1052.S, I pretty quickly found this is the part that's crashing.
#ifdef __STARTUP_INITIALIZE_NONCACHEDATA
ldr r2, =__noncachedata_start__
ldr ...
I can confirm the code is starting up, before something goes wrong.
Added this to mbed-ce-hello-world/mbed-os/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT1050/device/TOOLCHAIN_GCC_ARM/startup_MIMXRT1052.S...
I can confirm the csf section is only needed if you run the teensy_secure program which creates the .ehex file from the .hex file. Everything else just ignores it.
Any more specific suggestions on how I should rearrange the info on that page to make it clearer?
Somehow I suspect @donperryjm's suggestion to move the link much farther down the page, to just after the pinout table...
Was going to wait until Jamie chimes in again before looking at this code again, but since you mentioned it...
__attribute__ ((section(".boot_hdr.boot_data"), used))
const uint32_t BootData = {
...
I glanced at the linker script and generated code. Can't see anything obviously wrong.
I noticed you have a .csf section. Are you supporting code signing and BEE on-the-fly decryption? Of the many developments on...
Tried it here. Same result, doesn't work. Same 8 blink error.
It printed this at the end of the build process
Linking CXX executable HelloWorld.elf
-- built: /tmp/mbed-ce-hello-world/build/HelloWorld.bin
--...
My first question for all PlatformIO issues is whether the same problem happens when using Arduino IDE.
Going to skip another PIO rant, but please understand PIO is not a consistent software install we can easily...
Trying again the answer these questions as clearly as I can.
For SDIO used on Teensy 4.1's built in SD socket, there is only 1 way to initialize. Unlike SPI where you can choose various options, you don't get...
This error means you don't have the 00-teensy.rules file.
Maybe you downloaded it to a different directory. In that case, you'd need to use "cd" to change to that directory. Or add the pathname to that directory to...
Of course it won't work if you use a SD library published by Adafruit.
These are the libraries Teensy uses:
https://github.com/PaulStoffregen/SD
https://github.com/PaulStoffregen/SdFat
Now here is the part...
Yeah, the native pin labels are almost like someone at NXP tried to make the most confusing error-prone naming scheme possible. FWIW, I got them mixed up many times in the early days (in 2018) while designing Teensy...
3 blinks means the flash chip didn't respond. The blink codes are documented at the bottom of the T4 bootloader chip page.
https://www.pjrc.com/store/ic_mkl02_t4.html
"Why" is a much harder question to answer...
If you want to test only the I2S part of the audio shield, create a do-nothing program with an instance of I2S input, so cause Teensy to transmit the 3 clock signals, and use I2C to enable the SGTL5000 chip. Then just...
Looks like you copied everything that was inside the original MTP_Teensy folder to the Documents/Arduino/libraries folder. But you should have copied the MTP_Teensy folder (with all of its contents) to...
If you find MTP_Teensy inside a "libraries" folder, don't make the mistake of dragging that libraries onto the libraries inside Documents/Arduino. Doing so will result a libraries folder inside the libraries folder. ...
This error from msg #16 (edit: and now also msg #24) means you're still missing files that need to be installed on your PC.
Hopefully now that you have experienced the way Arduino IDE and Teensy Loader...
If you really want to pour more time into it, you could remove the NCV8186AMN330TAG and then try externally applying 3.3V. Best to use a current limited lab bench power supply with a limit around 150mA. Even if you...
If you want to attempt replacing the NCV8186AMN330TAG regulator anyway, I'll be happy to give you a spare part at no charge when you order a replacement Teensy 4.1. Just mention this forum thread in the "additional...
Looked at the alternate functions on all 12 signals which connect to the ethernet chip. None of them have I2C functionality.
My understanding of the ethernet chip is it's supposed to remain in a low power mode until...
Yeah, could solder wires, but really not excited to work with #36 enameled wire needed to make this work at 0.5mm pitch. I've done that a few time when really necessary and urgent, and every time it's been very...
Yes, more or less, except those "while" loops. Probably more like this:
Wire.requestFrom(0x6B, 2);
if (Wire.available() == 2) {
dataBuffer = Wire.read();
dataBuffer = Wire.read();
}
Wire.endTransmission();
How exactly depends on the specific I2C chip. Many of them are similar, there is no standard. In fact, I2C standard doesn't require any sort of register-based access model. But most chips do have that sort of access...
Blackmagic measures only sequential access speed.
For playing multiple files without large buffering, the random access read performance matters. Use a benchmark program which measures random access without queue...
No. "Error compiling" means Arduino IDE could not use the files on your PC.
It didn't even try to talk to Teensy, because the code on your PC is not correct. This is the way the Arduino software works. It compiles...
Same problem as msg #9, the last essential part of the program was deleted by mistake.
Hopefully this picture can make it clearer?
Please find the original code. Scroll to the end of the Arduino window and...
I looked at Digikey. Says they have 5 of this chip.
https://www.digikey.com/en/products/detail/analog-devices-inc/LTC2453CTS8-TRMPBF/1931289
But when I try to buy 1 of those 5, says it's backordered. :(
Looks like you accidentally deleted the last part of the program, while trying to get rid of the extra junk that was at the end.
Recommend finding the original code again. Probably best to just open a new Arduino...
Please remember, we can't see your screen. Showing us the error messages is good, but not enough. We also need to see the code that was in the Arduino window.
When posting the code, in Arduino type CTRL-A to select...
It's not finding the SerialFlash library.
Simplest solution is the run the Teensyduino installer again. On the screen for which optional libraries to install, best to just install them all. SerialFlash is one of...
Don't use that old extram and SPIFFS_t4 stuff. It's outdated stuff from 3 years ago, the earliest experiments before LittleFS and proper PSRAM support were added.
Use LittleFS to access the flash memory. LittleFS...
Looks like you're using a bunch of stuff that depends on interrupts. Leaving interrupts turned off is a pretty sure way for 1 or more of those things to get stuck.
Ok, will look at this again for LTO. Yesterday I tested only with the 5 optimization levels we're currently offering in the Arduino menu, which doesn't (yet) have LTO.
Any chance you could show the code for one of those simpler projects? Or if it's already shown anywhere, give me a link to it?
I need to have a way to reproduce the problem to have any hope of investigating and...
Very mysterious. They exactly the same hardware even made in the same production batches, except the ethernet chip is not placed on the _NE boards.
Can you show us the hardware you're using for testing? Is it 2...
To confirm Wire2 really does work on Teensy 4.1, I connected a SSD1306 OLED display to pins 24 & 25 on Teensy 4.1 and ran the Adafruit_SSD1306 library "ssd1306_128x64_i2c" example. I edited the code to "Wire2" and...
Committed a fix for this startup with other optimizations levels.
https://github.com/PaulStoffregen/cores/commit/3f95c8e6f632d76ca20210cd5edef92fa791191d
Hopefully this covers all the cases?
Without any way to see, let alone reproduce the problem, can only really guess about the problem.
But it is pretty well known that access to the card from both audio library and main program isn't safe. My best...
Welcome back Nantonos! Good to see you again. :)
If you're using the ordinary SPI library and analogRead(), odds are pretty good it will "just work".
You could set Tools > CPU Speed for 396 or 150 MHz to get...
3 peripherals have SPI capability: LPSPI, FlexIO, FlexSPI
LPSPI is the normal SPI ports. Officially the datasheet says 30 MHz is the maximum, on page 67. Anything over 30 MHz is considered overclocking. Many...
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...