Yes, this is a complete program. I copied it into Arduino and indeed it does compile.
But the nature of this program is it does several different things depending on what text it receives. Without the specific...
Each time I've looked at this over the last couple days, I also had to re-read a bunch of stuff just to figure out the build commands all over again. That's why I put the notes on msg #28. Still not 100% sure I really...
Here is a USB protocol analyzer capture of the failed USB enumeration
And for reference, here is the beginning of a successful enumeration with Teensy programmed by Arduino+Teensyduino
Tried it. Not sure if I got everything set up correctly (see below).
Building this time:
Linking CXX executable HelloWorld.elf
-- built: /tmp/mbed-ce-hello-world/build/HelloWorld.bin
-- built:...
Ok, I've rearranged the text on that page. I also added a "Software" heading.
https://www.pjrc.com/store/display_ili9341_touch.html
Hopefully having the first 2 blue links as the 2 required libraries, and then...
When using both I2S input and output, Teensy transmits 3 clocks: MCLK, BCLK, LRCLK which are routed to both ADC and DAC.
So the answer is yes, or probably yes, if your chips are I2S or something similar.
Audio...
Normally FLASHMEM is meant to be used on the function definition, the place with the function's actual source code, like I tried to show in msg #2.
For C++ classes, normally it would go on the actual member function...
For MacOS Ventura, you need 1.58-beta3.
If you wish to use the old Arduino 1.8 IDE, download it here. Get the "MacOS (Catalina to Ventura)" and of course do not get "Old MacOS (??? to Mojave)" since you have...
Even if you have the original source code, how much work is needed to get it running on a different board really depends on how it was written. If it mostly uses Arduino functions like pinMode and digitalWrite, it...
Tried it. Still get the 4-4 blinks.
Here's the build summary. Does the zero size for mbed-usb.a confirm the change worked?
Linking CXX executable HelloWorld.elf
-- built:...
For a completely blind guess, somehow I have a gut feeling at least some of the problems are going to turn out to be the TARGET_MIMXRT1050 code assuming SEMC should be configured to access SDRAM chips which are on NXP's...
Maybe this is the code doing the blinking?
https://github.com/mbed-ce/mbed-os/blob/2d7f24285093e0c5135e5518a4d8ed54ff33fd0f/platform/source/mbed_board.c#L36
If only it were to blink a stack trace in Morse code, or...
Maybe you haven't seen Arduino IDE 2.0 yet?
But to answer your original question (to the extent it's really a question), basically 3 reasons why Arduino IDE.
1: History - Most free Mac/Windows/Linux IDEs available...
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,...