If it's easier, this is the patch if you want to manually apply it: https://github.com/PaulStoffregen/cores/commit/c27fdcff4010d153c136e249d1b3157c134aa95a
Sorry not sure which Teensy or Library.. But will assume a Teensy 4.x or 3.x using the built in USB type including joystick?
if this is the case, there are two modes of operation, controlled by the call:...
As this thread became long, I will add to phorton1 solution above and try to summarize my final solution to both problems related with TeensyThreads (non-reentrant code and malloc/new). I hope that someone finds this...
Thanks @defragster and @jmarsh for the tips!
I will modify my code to start using the CrashReport.breadcrumb functionality to help better track the crashes.
Also, just a quick question: Is the location where...
Does PJRC publish dimensional drawings of the various Teensy's to aid in development of footprints in CAE libraries?
I'm looking for a LibrePCB Teensy component but can't seem to find it. I'm therefore contemplating...
HI all,
I'm having an issue/need help coding sys ex messages.
I am able to send sys ex without an issue.
I need help to read and analyse sys ex messages being received.
If a sys ex message is received and...
Good day everyone,
thanks a lot for all the great suggestions.
Will definitely change the pcb in the future.
But in the first step i told my colleagues to alter the case and make it bigger.
Thanks a lot to...
Hello,
I would like to add a usbC connector to the pcb I am designing around a teensy 4.1.
Where normally you might have the teensy’s usb connector on the edge of a pcb to access it through an enclosure, I’d like to...
Does the joystick library track the last known values for the buttons and analog values, so that I can blindly set the read values in every loop() and it will determine when the HID report(s) need to be sent, or do I...
the length of the time slice wont fix the basic disagreement between teensyThreads and malloc ... though I think I saw some other work arounds in previous posts, I think the one I suggested is kinda simple and elegant.
The solution I settled on to solve the teensyThreads malloc() problem was to intercept sbrk() and have it invariantly use the MSP ('main' stack pointer), rather than the current executing stack pointer. Paul made...
There is another solution, at least for stdlib functions like malloc, write, read, etc: override the locks and locking functions (all the stuff in sys/locks.h) that are built-in to newlib. That is after all what they're...
Did you read the last few messages of the thread? There are lots of things in Arduino/Teensy that are non-reentrant, so a "generic" solution is set a long time slice so that all task switches occur via yield().
Yes, the problem seems pretty obvious. new/malloc() is using TOS (which grows downwards) minus top_of_heap to determine how much unallocated space exists. It assumes TOS is above top_of_heap cuz thats the way the...
PJRC only solders the normal square pins. We can't offer other types, because the contract manufacturer that actually does the soldering has special tooling built specifically for holding those pins, and we have custom...
BTW, I suspect there may be a new version of the eyes code shortly. Adafruit has released the following new products (plus some more displays pre-announced):
Qualia ESP32-S3 for TTL RGB-666 Displays:...
Interesting @jmarsh about stack tracking update. Missed that so not sure when.
Indeed starting with CrashReport.breadcrumb(1, threadID) would be a good start.
Perhaps also/next CrashReport.breadcrumb(2, __LINE__)...
As far as I can see the only way to mount the Teensy with headers attached and have a PCB to top of Teensy dimension of less than 6mm is to mount the Teensy sub PCB top surface.
The breadcrumbs functionality seem very nice. However, I am still not sure which strategy to use to help me pinpoint unknown crashes that I have no idea where could have happened (think a 40000+ lines program that...
Hi,
I have been using this module from Adafruit in SPI mode and it works fine. I'm now looking to implement it on a custom board using it in place of the SD card on the Teensy via SDIO. I have removed the IC from the...
Hi,
I am developing a Simulink Embedded Coder Target for Teensy 3.x and 4.x. I tested the library only for Teensy 4.1.
The library uses the Simulink Embedded Coder to generate the C/C++ code for the Simulink model and...
Outrigger female headers can be on the underside of the PCB allowing lower profile: https://www.mouser.co.uk/ProductDetail/TE-Connectivity/1-147726-3?qs=yRTBpGnAb25VxMGLYRRBjQ%3D%3D
A voltage divider is for signals, and only works if unloaded, since it can't regulate voltage against changes in load.
A 100k divider would not be able to supply more than a few microamps anyway.
A 1ohm:1ohm...
Yep assuming which NANO, as they are now a family of different processors.
https://www.arduino.cc/en/hardware#nano-family
And for example recently I learned that now all Arduino UNOs are created equal... i.e. UNO...
Are you using the latest Teensyduino? There were changes a while ago to make sure the correct stack is examined in the crash handler, which would affect where the fault location is gathered from.
TeensyThreads is a unique process not widely used - so many things fail with thread switching in spite of the good work behind it to proved the feature.
CrashReport wasn't designed to work with it, it may take some...
Look at the library source code, at FreqMeasureCapture.h
Don't know which teensy you are using, but for example for Teensy 4.x I see:
#elif defined(__IMXRT1052__) || defined(__IMXRT1062__)
#define...
Thank you sir for the help. I think I encountered some "glitches" on my PC's com port. I'll try to troubleshoot what causing my teensy not connecting to the serial port of my PC.
Thank you so much for your help.
Works for me:
Although I did add a wait for the Serial port before the code ontinued:
void setup() {
Serial.begin(115200);
while (!Serial) {} // wait for Serial port
Serial.println("From The T4.1");
}
A couple of things that might be happening is that the Teensy might have completed sending your print before you can open Putty. If you change the sketch to:
void setup() {
// put your setup code here, to run once:...
I would typically use some form of external voltage regulator, maybe something like:
https://www.pololu.com/product/2831
Which one might depend on how much power you need. The one I mentioned here is 1amp, they have...
Hi,
Trying to figure out how to use this library FreqMeasure, on Arduino first and then Teesy. Example code below. Where do I tell it what input pin is used?
Ultimately trying to build a guitar tuner. I'm currently...
Hi, thank you sir for your response. I drafted a simple sketch to check the connectivity of Teensy to the PC serial port (via PuTTy).
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);...
Most guitar pedal supplies are somewhere between 9-9.5vdc. Would a simple voltage divider (100k/100k) work to power Vin without USB? That would be something in the 4.5-4.75 range.
Just a guess, but make sure there is nothing else that is using the Serial port. For example the Arduino Serial monitor.
I am assuming a windows machine as you mention PuTTy.
Other potential things. On boards...
Hi again, I'm new to Teensy boards and I almost finished migrating my program from Arduino Mega to Teensy 4.1.
My past project using Arduino is connecting the serial port of my Arduino (via USB) to my PC, reading the...
Hello all! Sorry for commenting on this old thread but I am facing a very similar issue regarding debugging a crash in a Teensy sketch that uses threads (TeensyThreads library).
I have noticed that every time the...
Ok, this has been confirmed. We used the 2MB chip on this board because we had some trouble securing the 8MB versions for some time and accidentally used the 2MB chip during population, this is where some of my...
The bootloader is supposed to detect which flash chip you have connected. The 2MB (16Mb) chip means Teensy 4.0 and the 8MB (64Mb) chip means Teensy 4.1.
You could have a Hole in your PCB and mount the Teensy 4.0 up from the bottom through the PCB.
Of course this would need the header pins to be removed and replaced with some coming up from the bottom.
I don't know...
The underside of the Teensy to the Top of the USB socket is 4.3mm. So you will have 1.7mm to achieve a socket if you remove the plastic from the headers underneath the Teensy.
The lowest profile sockets that I have been able to find are 4.6mm High, so together with the amount of plastic left from the pin header soldered onto the T4.0 they will still be too high.
I measure the underside of...
Good day everyone,
I'm currently working on a redesign of my PCB with my Teensy 4.0 on it.
At the moment I solder all the pins of my Teensy directly to the PCB.
But now I want to change the PCB so I only have to...
Teensyduino comes with a sample makefile. Your easiest path to get it to download Arduino 1.8.19 and Teensyduino 1.58. Extract Arduino, then run the installer to add all the files into the Arduino folder. Once...
Thank you for the big help.
I just got the idea from the timeTeensy3 example from File>Examples>Time>Timeteensy3
I just finished testing your suggestion about using now() function and I think it works perfectly...
You need to grab the time atomically (probably using now() ) and then extract the seconds, minutes, hours etc. from that value.
The problem is you're calling minute() and then the clock ticks over to the next minute...
I'm working on a project which uses a legacy Teensy 3.2 board for its microcontroller. I need to locate a version of GCC and relevant utilities for Linux which I can use from command-line. After reviewing available...
Hi, I'm new to Teensy Boards. I want to migrate my code from Arduino Mega to Teensy 4.1.
One component of my project is using RTC to monitor time for logging and sending data.
I learned that Teensy 4.1 has built-in...
So upon further testing and investigation, we actually designed our board according to Teensy 4.1, not 4.0. We have developed many boards in this similar way, but have yet to have to use the Wire3 bus. For some...
Hello everyone,
followed this thread but find no answer to my problem of my second audio guestbook:
my .wav-files just recording nearly the half the recordings.
Hardware is the same like audio guestbook no.1:...
Thanks so much for the reply!!
It was a bit of work, but I already started going down the path you recommended and realized the LED Feedback was sending back note messages.
So program change wasn't working for me,...
Thanks muchly for the further explanation.
Serves me right for not paying attention to the "basics", every other device working except the DX sent me on wild goose chase!.
After some rest it makes complete sense. I...
I am not an R Pi expert but isn't it possible to use I2C there for your sensors?
Why not use a USB microphone or something as input for the R Pi?
Technically it should be possible to send audio data from a Teensy...
I would check what exactly is sent as feedback from the DAW when the message from the Teensy has been sent. Print the raw data to make sure that this is really a program change message or see what it is.
It is only a...
Not knowing stuff isn't dumb, though it can lead to expensive or even dangerous mistakes!
For the benefit of future generations ... the reason you had problems is actually more to do with volts than amps. If you look...
Coming back to this as I did successfully test it last year, but stopped there.
Can I take the function configure_external_ram() as well as the smalloc.c/h and put them in my project folder and call...
Sounds potentially like one of the standard things:
Look in your code, typically in setup that looks like:
while (!Serial) {}
or
while (!Serial) ;
That says wait forever until USB Serial is ready...
If I want...
I have a teensy 4.1 connected to 4 gas sensors (with their own 12V power supply, a prht sensor (pressure, relative humidity and temp) and it sends serial data via ethernet connection. The teensy is powered through 5V...
A couple of additional points, that might help.
As mentioned, there are 8 hardware UARTS (LPUART) objects, but the number of the hardware UART does not necessarily correspond to the Serial object number.
That is...
I've added a link to this thread on the T4 bootloader page, in the footnotes under the BGA pinout diagram.
Doesn't help you now, but hopefully will help others avoid this SD_B1_05 issue on their future PCBs.
Perhaps somebody else has come up with other eyes. I didn't see any other things referring to Uncanny Eyes over at the Adafruit Learning pages, but maybe do a query over at the Adafurit forum. There are 4 main strains...
Thanks!
Yup, the DX7 is fine being controlled by other gear, a KX88, the reface, a Clavinova, my computer running MidiOX or a DAW etc. I mean i say "fine" with the usual caveats around this board! :)
I also tried...
Does the DX7 respond to MIDI from another piece of equipment? Can you control it using the Reface CP? I'm wondering if your MIDI out circuit needs a buffer, usually two hex inverters in series. Your MIDI Thru box...
You could look at HardwareSerial.cpp.
https://github.com/PaulStoffregen/cores/blob/master/teensy4/HardwareSerial.cpp
Normally you wouldn't use these interrupt directly. You just use the Serial1 to Serial8...
I appear to have narrowed it down to nothing whatsoever to do with the MIDI library!
Even with the simple "blink" example running on the Teensy, the DX7 barfs as soon as power is provided to the Teensy
If i...