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...
I have tried multiple ways of uploading to a Teensy 4.1 headlessly from a Raspberry Pi using the Arduino IDE over VNC, arduino-cli & teensy_loader_cli.
This is the command I use with teensy_loader_cli to upload (.hex...
Yes, the i2c interface cant work without Pull-Up's. It's an Open-Drain bus structure
It's due to the fact, no output will ever pull the given wire (SCL/SDA) HIGH, only LOW, so to be able to ever go HIGH a pull up is...
And this is exactly the reason why I'm trying to hammer it through the Arduino devs to promote these in the Tools menu and promote board vendors implement them.
It's really easy to do but the Arduino people need to...
I tried this approach using the for loop, and while for some fairly light graphics it works, when lvgl animations are triggered, this is where you can really see the for loops hanging the CPU. IF dma could do the...
I am trying to use my Teensy 3.2 /4.0 as webserver. I would like to use teensy 3.2/4.0 instead of 4.1. Unlike the esp32 teensy don't have built in wifi so I have been thinking of using a xbee to connect to a wifi. I...
Hey all,
I have two buttons on my teensy 4.1 project that I'd like to merge to one. I got it mostly working, but I am having an issue I will detail below. First, here's their functionality:
Button 1: This is a...
All my warnings, like iso C++, unused variables are fixed and all of ILI9341_t3n issues are resolved. Thanks to all for your help.
Only thing left generating issues are EncoderTool and TeensyTimerTool. The new...
Is there anything wrong with supporting a dedicated or user managed paradigm alongside of the multiple device paradigm?
After all, an MCU on a few centimeters of embedded pcb, is not a desktop. Should so much...
Whoops. Compiler optimizations got me. The actual results are transfer16() = 465 cycles (775 ns) and specialtransfer16() = 404 cycles (673 ns), so the savings is 100 ns. The additional savings from reducing the CCR...
Might depend on the device - the 'generic' device following the protocol versus some other?
@tonton81 did a SPI Master/Slave Teensy to Teensy library with err check and other control elements where he could program...
Hmm. Ok.
It seems in fillRect, the arguments are int16_t x, int16_t y, int16_t w, int16_t h, whereas w and h in getTextBounds are uint16_t. Guess I have to roll with it. Doesn't feel consistent, but that's me.
P/S Really, in a dedicated system with one device, even more so that it transfers in blocks, it hardly makes sense to have to save, set, transfer and restore every word.
And for a small MCU system like the...
@joepasquariello Fantastic!!! Thank you so much. So then the hypothesis was right, the setup for 16 bits takes a big part of the 150 nsecs.
BTW those times are from the call to the start of the transfer, yes? ...
Another Teensy dead. This time I pressed the Program button and it was one long red, on and off. Reconnected it and now it's no LEDs, totally dark, dead and Windows says "USB device has malfunctioned."
I'm grounding...
I am making a split keyboard with a pair of 4.0s and I am unable to get a basic master read sample working. Do I need pull up resistors for this scenario? I'm using a common ground and pins 18 and 19. Any tips would be...
Paul I created separately thread for my project.
It is here https://forum.pjrc.com/threads/72019-Realtime-pitch-shifter-flange-chorus-and-modulator-MULTI-FX-Project
Hi everyone,
Finally I got to work SGTL 5000 in way what I want and now Im able to writing own effect codes :D
Still I have little issues witch my code because I used queues. I know that will be better if I going to...
I cleaned up my test code and ran some tests:
DTCM(RAM1) to DTCM, DMAMEM or EXTMEM rotates properly for square buffers.
DTCM source is showing issues with rectangular buffers for all destinations. I suspect this...
Guessing that you used older compiler and maybe either did not see the warnings or maybe did not generate them.
Yes there are three of them:
void getTextBounds(const uint8_t *buffer, uint16_t len, int16_t x,...
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...
I wasn’t aware the other 4 buffers were broken, good to know in the future though. Sounds like you’re more familiar with it than I am so I can only help so much.
However I don’t think the PXP rotation is going to...
That got things in the menu on the IDE working. My test sketch compiles. Just got to get it debugging. Do I need to launch gdb nanually in this environmen? I am more used to Platformio.
Attached is my sample rotation app that works well so far
FlexIO actually has 4 buffers, so that would be 8 pixels per shift command until the buffers are empty. (Data sheet says 8, but many people here have had no...
Production Teensy 4.x's ship with fuses locked that ensure long happy unbricked life.
The 1062 MCU is the same Production or Locked, the diff is the Fuse settings.
Looking at the ic_mkl02_t4.html link text it...
Odd, I haven't even been using Teensy that long... I only started 1 May 2022. I downloaded a zip file. Maybe the zip file was old?
Been a lot of confusion lately. So how does one use this? Minimal example? ...
I’m curious, since you are using FlexIO, if it wouldn’t be beneficial to make use of its buffers rather than maintaining 2 complete buffers for the screen. Since each FlexIO has 8 32 bit shift registers it can buffer 16...
So I actually used some of your sample code in the beginning of the post and got the rotation to work!
Source buffer is in RAM1 and destination is in RAM2.
Takes about 3ms to rotate 90/270 degrees and 13ms to transfer...
Yes updating to new compiler that checks things more... can get you lots of warnings.
I did a quick look of the github source for the header file and the blame view says that the api changed 2 years ago.
Note some...
Note: The IDE already has the preferences settings for warning levels.
It is just that the Teensy install does not use them. Possible changes and the like mentioned over in the Arduino forum in the post:...
There's a note in the illustration on page 1923 of the reference manual in the section about PXP rotation:
I believe that the PXP fetches and stores using direct memory access and will not benefit from caches for...
My old code used the following construct:
uint16_t x1, y1, w, h;
oldZval = Zval;
String newstr = "XXXXXXXXXXXX";
tft.setFont(DroidSansMono_18);
tft.setTextColor(ILI9341_GREEN, thisGREY);
...
Hello Paul,
Thank you for your quick response.
I understand now how to identify which version it is.
But I am a bit confused now.
Are there any hardware chip differences? Eg needs a different RT1062? or it...
I've seen a Teensy developer having problems with warnings stopping their compile sessions trying to move from Arduino v1.8.x to Arduino IDE v2.0.3.
While I added in-circuit debugging to the STM32 platform for IDE v2,...
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...
Assuming you are still trying to use SPI...
I could be wrong, but not sure the special transfer16, will gain you a whole lot. Maybe the save, set, restore eats some cycles, but as compared to the rest of the stuff...
...
Now I realize the challenge that comes with loading programs from an SD card... It's basically forcing you to make an executable format from scratch and that isn't easy lol.
As per documentation, conversion (sync) clock can go high during clocking-out of data, so length is not an issue, as long is is longer than 1 bit clock.
@joepasquariello So.... my shower thought this morning.... three new calls for the API, set16bit(), specialtransfer() and restore(). What do you think?
The other thought is that what I should do first is time...
@WMXYZ That is interesting.
One issue is the 710-750nsecs for conversion. readout commences on the first clock after the convert pin is low.
So maybe that is enough. Sync with the clock in code, clear convert...
Just back from a few days away.
I've put CrashReport in, but its not recording anything. I tried sending it to the serial monitor at next start up and sending it to SD card , but neither shows up. I forced a crash...
"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,...
Made local.txt changes and they were also ignored.
There are cached settings - there is a folder that needs to be removed with IDE 2 closed - See item #4 this post: Arduino-CLI-And-IDE-now-Released-Teensy-Supported!...
So after much testing I decided to pass through the image without rotating to see what comes out.
The image is passed though fine, but with noise in the first 20-30 lines. Also, trying to rotate does nothing, as I...
If the chip is wired as in datasheet or in similar fashion
why do you bother with SPI? use I2S it is easier and runs continuously.
I have done that with other chips with similar SPI-type connection
Note, it says...
I see that isn't 'Windows'. I've made at least one IDE 2 .local. edit that worked - under Windows using "that path".
Though IDE 2 does some caching for those .txt files - not sure if that is causing trouble seeing...
The location of the boards.txt and platform.txt files is here.
roger@dragon:~/.arduino15/packages/teensy/hardware/avr/1.57.2$ ls
boards.local.txt boards.txt cores installed.json keywords.txt libraries ...
Thanks, this is exactly what I was looking for!
Detecting the transfer size isn't required for me as I will always just send 512 byte packets,
the PC App I am using automatically fills unused bytes with 0s.
Just...
You are on the good road of trying to fix warnings because they are potential sources of bugs in the code :) You can even use a compiler flag to report warnings as errors ("-Werror" for GCC) to enforce fixing warnings....
Hello,
Can you please help us out how what we are doing wrong?
Please find attached the picture.
Also we are not sure if we have a teensy 4.1 with lock or not? How can we check that?
I interpreted that "It's a big project consisting of a lot of files, but I can start with the stuff below." as that he just threw together what he thought is important but its not really the code he is working with...
I tried this code also with Teensy audio shield and get much better sound quality, clicks go away, and latency between input and output is smaller.
Tomorrow I will share it with another effect code.
Thank you so much for your patient explanation. It helps.
All that I do with the char arrays is pass them to a function which displays the array. At no time do I change the contents of the char array. Makes sense...
Yeah it is perfect solution, i tried it but so far without success and I used queue option. Still I didn’t understand exactly some things with Audio library.
I have some other effects pitch shifters, reverbs,...
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...
Paul thank you for suggestions, I got it to work almost everything working like I except, good quality of sound.
I have still small problem with my code.
1. Latency between input and output is around half second, is...
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...
Paul, as you might surmise by now, I'm a terrible programmer, with a bare grasp of C. My calling code is always using the same way of doing it, as shown in the very first post. Sometimes I need to pass a two element...
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...
How much buffer is "enough" is always likely to be application-dependent. If you have a fairly benign one that exits loop() or calls yield() or delay() often, then the EventResponder will have frequent opportunities to...
Yes, it is. The compiler is warning you that you have an IMPLICIT cast of const char* to char*. You can do that two ways. Either make everything const char*, or use an EXPLICIT cast to char* as in Kurt's second...
Find the location where the boards.txt and platform.txt are located. Copy the .local. files there and restart the IDE and it should work.
On Windows this opens the folder holding the installed board 0.58.3 {for Beta...
I don't think it is an AI since chatGPT does not reach you this code that Ñeñe_Kinich shared with me and he was right (Y).... You CANNOT know the % of CPU usage but you can calculate the available one and depending of...
Please include a minimal but Complete sketch. Without that assuming the SD Card is wired to the T_4.0 Underside for SDIO demo.
Also on desk here is a T_4.0 with an SD card well mounted and tested (thanks to...
The warning vanishes from that line, but a new warning comes when doing the displayRoundedTextBox function. Is that because I have char *text1 in the argument list? Should it then be const char *text1 ? I use this...
Sorry, maybe I am missing something here...
But with this code, it looks like a lot of the classes are on the stack as part of setup?
So they disappear once setup completes?
What do you mean by not responding? Is...
Since your code ran successfully on the T3.6 and not on the T4.1, and you only changed the resistor you may want to check your external hardware.
Fastest test is probably using the RMS object to see whether any audio...
Any time you pass or use a string like: "ABCD"
and pass it to somewhere as a char* if will give you this type of warning, as doing somghing like
const char*sz = "ABCD";
*sz = 'Z';
will fault the processor as you...
Made another SDpiano test with inHeap and only 16KB buffers. Always with 8 notes, so 8 stereo samples, and it still works fine.
Do you think 16KB isn't enough ? That means refill above 8KB.
Of course with...