Please provide a complete/short example showing incorrect function.
If usage was in error forum may help clarify, if the code really is in Error then it needs to be corrected.
Hi,
Firstly, I love the Teensy 4.1.
Although using EEPRPOM.put and EEPROM.get don't throw errors, they do not seem to work correctly.
I've had to use the old EEPROM.write and EEPROM.read methods, with the old...
Thanks, Defragster.
After some thought, I came to a similar conclusion. It looks like my code made frequent, unnecessary passes through this code and timing could well have made the difference. (There were many tests...
If I use 0x483, and recompile, Teensy Loader shows the following:
$ ./prog_teensy41.sh
Teensy Loader, Command Line, Version 2.2
Read "blink_slow_Teensy41.hex": 22528 bytes, 0.3% usage
Found HalfKay Bootloader...
Setting this seems essential: InChar = 0; // Added to fix crash after updating to IDE 1.8.19
When called without any Serial.available() if the prior exit was with:: if (InChar == 10)
It will enter that...
At @KurtE's suggestion I changed line 234 or so to <10 so it should look like this
void Intuos5Controller::hid_input_end() {
if (debugPrint_) Serial.printf("$HIE\n");
if (hid_input_begin_count_) {
// now lets go...
Built the teensy_loader_cli and not sure if I am quite invoking it correctly.
./teensy_loader_cli --mcu=TEENSY41 -wv blink_slow_Teensy41.hex
Unfortunately something is set up wrong in the vm. All I get is a...
still no side buttons. also i don't see my stylus buttons reported anymore in the flood of data...
question: do you also get a huge amount of serial data when you don't touch the tablet at all? mine is sending out...
ok, i have finger tablet to serial interaction :)
here is the output on serial monitor, when i touch it with my fingers:
HPID(64): 02 04 02 90 A1 FA 62 03 5A 00 03 94 78 EA A9 03 6A 00 04 90 B5 DF 7B 04 62 00 06...
Thanks Kurt. I've solved the problem but it leaves behind a puzzle as to why my code ran, bug free, when compiled with 1.8.10. I've greatly simplified the culprit procedure below. Adding the final statement, InChar = 0,...
Opps - I hesitated asking the obvious ... are there any interrupt functions involved that should not be in FLASHMEM.
The Teensy's 1062 has 32KB code cache - so maybe it can get away with it for some time if it stays...
Hey everyone, I am trying to get 4 PWM channels (2 sets of complimentary signals, with one pair phase shifted dynamically.
Below is my current code, it is built from code I found here, as I cannot find any...
Can't get the usb to stay connected in the vm. The changing modes of usb during programming are confusing the QEMU/KVM. I keep seeing the usb device disappearing.
Do I use a) Teensy Ports /dev/ttyACM0 Serial...
Now I am feeling very stupid. After I was adding more unrelated code (for the PDP1) more functions in the Vectrex menu part started to freeze. So I decided to remove the FLASHMEM on all functions in this module. While...
I hope you can understand nobody can say specifically what the problem is with an unseen PCB. The best we can do to help you is offer some suggestions of tests to perform and explain what the technical meaning of those...
The Program signal was High before pushing it in my previous measurements but now after you asked me I checked again and the Program signal is low (tens of mV) before pushing it.
what could be the problem?
malloc() will report that no memory is available if the requested allocation will collide with the stack, as defined by the value of the stack pointer at the time of the call to malloc(). With TeensyThreads, each thread...
Set up an Ubuntu 20.04 VM. Looking to attach the USB port. In $ lsusb, I see something showing up as Van Ooijen Technische Informatica Teensyduino Serial. Hoping that is the correct device to connect to.
$ lsusb...
Here are the forks:
https://github.com/01-BlackHawk-11/lis3mdl-Teensy-I2C
https://github.com/01-BlackHawk-11/lsm6-arduino-Teensy-I2C
What I had in mind was adding a variable that stores the wire address like...
Are these the sensor libraries you're really using?
https://github.com/pololu/lsm6-arduino
https://github.com/pololu/lis3mdl-arduino
If anyone is going to go to the trouble of editing these to properly allow...
Quick note on the above: The inputs are coming from two different interfaces.
I am pretty sure the long ones are coming from Interface 1: Here is my dumping of that Descriptor,
HID Report Descriptor (0x20009c90)...
Well, I'm happy to hear that we're not alone, but sad to hear that this issue is not isolated to us.
Would you be able to run the the test sketch I posted on each of those working boards to see if you have full pin...
Unfortunately, no. The addresses I have are (probably) meant to be private.
I sent an email around the time I wrote msg #4. So far, no reply. But it's only been 2 full business days. Remind me later this week and...
Maybe the Linux version of teensy_post_compile should check if the udev rules are installed?
Until recently, this program was only delivered by the Teensyduino installer which checks if the udev file is present and...
I'm in the same boat with the MicroMods. I ordered 4 test boards and an ATP back in October and have been using them since. I completed a MicroMod version of a product I've been developing on the Teensy 4.0 for some...
Hard to say: Note the data I am showing is how do I put it encoded... That is Wacom tablet, plus I am getting some interesting HID parsing stuff, that I don't understand yet...
Note It is not significantly changed...
Thank you for the reply, Paul. I've always been impressed how active you are here, and how much you stand behind what you've created.
Which, btw, I absolutely love this platform. Thank you for creating it.
I...
The order doesn't matter with the WS2811 protocol. Each LED effectively works by "taking one signal and passing the rest on", so what you are planning to do will work no problem. Yes, you will have to reconnect all the...
it seems the D108 value is part of the pressure of the stylus. normally the range would be 0-2048 here i only get 8bit of info, so i am guessing it is spread among two bytes and this is the high bit part.
when i plug...
ok output changed, i get this when i move the stylus. still no side buttons/touchpad functionality.
begin, usage=D0000
type= 2
min= 0
max= 255
reportcount=9
usage count=0...
We do use the SDIO interface to communicate with the card, so I will take on your suggestion to use SD.mediaPresent to check if it's still there, and I'll reserve the card detect pin for later if it ever needs to be...
WORKING - back on Windows 11!
Now Com18 instead of COM6.
Found a BLUETOOTH ??? device also on COM6
Device Mgr remove of the Com6 devices didn't do it.
Used RegEdit to search "COM6" ignored Bluetooth ......
Yes, I tested it. Works nicely.
However, the board from the GitHub repo has a missing GND connection (need to fix that some time...).
If you are using a T4.x make sure to wait some time after switching rows, the...
This is one of the functions I needed to remove the FLASHMEM to avoid the freeze. As a sidenode it although worked after reducing*the input checks from 12 to only 3. Therefore I assumed that it might be an issue with...
This is indeed the default (no threads) behavior for Teensy 2 and 3.
On Teensy 4, the default has the stack start at the top of ITCM (RAM1) memory, and the heap is located in RAM2 memory.
I am making some progress... But still more to go:
I am doing some hacking to try to support different output page:
Note I have removed some comments out of here...
Also, would be nice to do this elsewhere. But...
Thanks Paul for the suggestion as it allowed me to go much further but not to the final destination. Now the arduino-cli board list looks good
pi@openplotter:~/Arduino/Nmea_Controller $ arduino-cli board list
Port ...
Thanks for everyone's suggestions. Think I will try a virtual machine and the teensy loader. I'm hoping that the vm crashes, not my laptop. Ultimately, it would seem that using the cli would eliminate any gui as a...
Yes, TeensyThreads uses "new", which maps directly to malloc(). But there is also the option to provide an already existing buffer to serve as stack for the newly created thread. In my full code, I am already doing...
Hello all. I'm new to the world of Teensy and have a pretty basic question. I searched the forum first before asking this and saw where the question was asked but there were zero replies. Hopefully, someone can help me...
Looking at TeensyThreads.cpp, no malloc - just :
threadp = new ThreadInfo();
stack = new uint8_t;
Added threads get default 1K or specified Stack and Thread0 main loop() gets 10K.
Not sure what...
Malloc seems to have the idea there is one HEAP - but each Thread seems to have some reserved space from RAM - how that is allocated would be shown in TeensyThreads? Does it do malloc() for the requested Stack space?
...
Please correct me if I am wrong, but my understanding is: the heap and the main thread stack are placed at opposite ends of the memory. The heap grows up and the stack grows down. We don't even know if the stack and...
First, install Teensyduino 1.57. Version 1.56 and earlier had MSQ output, which is basically PWM but with extra noise shaping stuff. Versions 1.57 adds PWM output for Teensy 4. But you still might prefer to use MSQ. ...
Maybe run commands to uninstall and reinstall the teensy board package? Maybe if run with the verbose flag, info about *why* arduino_cli didn't install teensy-discovery might be shown?
Opps - too long since then. Thanks for detail reminder
Suppose 15s Wipe was working - but prior times Loader was open with code to reinstall
Still have to go back to Win 11 and see if it can get cleared to work...
This is expected behavior. The 15 sec button press only wipes the flash memory on Teensy 3.5 & 3.6.
Teensy 4.0 & 4.1 added the "restore program" which is written into the flash after fully erase. But the older...
Fun Update - On the porch with Win 10 Laptop that probably hasn't seen the old T_3.5
OLD_T_3.5 seems to work NORMALLY here
Tried three 15s Restores - finally wiped the code - but not running factory Blink
Next...
I'm not aware of any production flaws or problems. I can tell you every board was tested with a sine wave diving a 10 ohm resistor in the test fixture, though the test lasts only about 1 second.
If you believe it's...
I saw similar funny # for Remains
This MIGHT be a work around - but it might just give way to another issue later on.
The malloc code uses those fixed points for REF and it isn't clear they are valid when...
That's a very interesting take! So a "quick and dirty" workaround for the issue would be to allocate "X" bytes of RAM using malloc in the main thread before adding any new thread, which will initialize some internal...
Exactly! I have performed some of those tests myself and also couldn't find any clear relationship between the stack size of the threads and how many bytes could be allocated using malloc() inside the thread before...
Mjs513, that's correct. The issue of memory leakage, calling malloc() without calling free() would crash the sketch anyway under any circumstance. My ideia was just to show that malloc() fails after I allocated around 5...
BTW: In testing I made a LARGE Flash code test and that worked. So, it has to be some specific problem code that runs from Flash when it conflicts
That code github.com/Defragster/T4LockBeta/tree/main/Code4Code was...
thanks, had a chance to play with it now. here your new version has the same output as the version yesterday. only "mouselike" output from the stylus, no absolute coordinates, side buttons are not working (no serial...
Also - OLD_T_3.5 is ignoring the 15 second Restore as that was timed and tried about 6 times. with timer at 14,15,16 seconds.
It seems 'something failed' on OLD_T_3.5 - except it worked when I went to DUAL Serial, so...
I want to modify those libraries in order to pass other I2C buses (Wire1 or Wire2) instead of the default Wire. The libraries are LIS3MDL and LSM6. I use the Teensy 4.1 I2C library as well by Richard Gemmell. I would...
Yes, many pitfalls. It seems like dynamic allocation will work only if it is limited to the main thread, where the stack pointer is the system stack pointer. Probably a good idea to also limit Strings and printing to...
I am playing some more with the older Intuos tablet and looking at some of the Linux stuff more there lower-level Input project...
I included the current version, that at least is showing some data...
Note: With T3.6 you do run into issues of having to hit the program button at times. I tried it with IDE2...
But did not lose output.
The interesting thing is, that if you start from a fresh Teensy, when I...
Sorry, I have no idea.
But if you have some examples of a functions that when run from FLASH that causes it to hang/crash, that you can post, maybe something might
give us hints on what is happening.
@defragster,
I am not sure I understand. Probably I have not had enough coffee yet :D
With this are you doing this with TyCommander? and/or are you doing it with the Serial Monitor stuff of Teensyduino?
If...
I don't know of any such guide for using the SD library, there may be one for the SDFat library that SD is now a simple wrapper of.
SD.begin() - I typically only call once. Now I know some have stated that if you...
At this point not sure what to tell you.
If you have something like:
KeyboardController kb1;
KeyboardController kb2;
...
void setup() {
...
kb1.attachPress(OnPress);
kb2.attachPress(OnPress);
...
Some of the answers may be found in the original thread started by @ftrias: https://forum.pjrc.com/threads/41504-Teensy-3-x-multithreading-library-first-release. Going through it I did find where he gave an explanation...
Pulled out a T_3.5 - used quite a bit in past for past testing - not used in Months++
- Once cut VIN<>VUSB - now soldered again
- Top side Female headers in place
- No problems when last used
>> This is Win 11...
Thought that might be the case - and if it isn't auto restarting then CrashReport code may not get called in this case.
And if the Button won't go into Program mode it seems the MCU is 'offline'?
If there is a...
Is there any guide on best practices for using the SD library?
For example, should I call SD.begin() each time I want to write to the card?
Or, what's the best route of logic to handle card insert/remove? (I have a...
I didn't post the code - but the p#9 alloc_func() was just called from setup() in the existing code - then it no longer acted the same when called from the Thread.
The malloc code has some dependencies that may not...
So far the only way I found to get it out of this state is a full power cycle. Therefore I cannot get a crash report. I haven't tried adding a watchdog yet.
malloc() works as expected in the main thread (loop), but not in the thread created via addThread(). Something to do with that thread's stack having been allocated from the heap?
Firstly, it's truly wonderful I can use the audio library in the LC.
I'm hearing a weird behavior when trying to mix the noise synth with an oscillator. (two oscillators in this example)
The noise generator seems...
Indeed, the malloc() code does do something on first call with regard to finding and using a HEAP to build on?
Adding this to setup before starting the thread - whatever is allocated here is then available for alloc...