Closed fralbo closed 2 years ago
I did a quick test of your code and the problem only occurs with Teensyduino. It seems to be an incompatibility with Teensyduino's core library. It will be fixed in the next release of this library.
As a workaround, you can test the following change to src/portable/teensy_4.cpp
: add before line 257:
_VectorsRam[0] = reinterpret_cast<void (*)()>(&_estack);
so that the whole block looks like:
/* override arduino vector table entries */
_VectorsRam[0] = reinterpret_cast<void (*)()>(&_estack);
_VectorsRam[11] = vPortSVCHandler;
_VectorsRam[14] = xPortPendSVHandler;
_VectorsRam[15] = xPortSysTickHandler;
That should resolve the problem; if not, please let me know.
Additionnaly, the orange LED is blinking 4 times every 4 sec. Don't what could it mean.
4 blinks indicate a hard fault exception. 3 blinks: a stack overflow was detected, 1 blink: assert()
was called.
Hello @tsandmann , Many thanks for your reply, I'll give a test ASAP. Just a question; Are the LED status a Teensyduino implementation?
Cool, workaround works fine!
Thanks a lot.
Just a question; Are the LED status a Teensyduino implementation?
Teensyduino had that for hard faults in an older version. Now it reboots after a few seconds in this cases and creates a crash dump.
Hello, Teensy 4.0 TeensyDuino 157 Frequency 600 MHz
I encounter a problem using PWMServo and investigating in the code, I discovered that the call to
analogWriteResolution(12)
causes the calling task to freeze and the PWM to stop. Additionnaly, the orange LED is blinking 4 times every 4 sec. Don't what could it mean.Here is my code:
I already looked for info on FreeRTOS forum without success. Any idea about what could cause this problem?