I have recently been playing around learning about ftm timers and
have been using a piece of code that was published by TelephoneBill here
to get me going.https://forum.pjrc.com/threads/29421-Teensy3-1-and-Flextimer(s-)?p=81068&viewfull=1#post81068
At first it seemed all well behaved just as advertised,
and then after a few reboots the serial console started playing up
ie not printing messages properly,if at all.
So after all sorts of searching around, adding serial flushes etc
and thinking it might be some kind of interference between the FTM timer and USB
I discovered I can reproduce a similar effect with a slightly modified Blink Sketch
see below
I am using MacBookPro OSX el Capitan
Arduino 1.6.9 teensy loader 1.29 teensy 3.2
( have just tried 1.613 and teensyduino 1.32, no difference)
Can anyone help explain why this kind of thing is happening
judging by the correspondence on the forum, there seem to be quite few issues of this nature,
but no discussion that I can find there quite relates to the problems I seem to be experiencing
which should write to the serial console once every sec
I get occasional writes sometime a whole serial.println() message,
sometimes only partial
and seemingly at more or less random intervals
here is an example
If I turn everything off and restart, I can usually get it to behave for a while,
but once getting into rebooting or recompile and upload these symptoms reappear.
regards
Harry Harrison
have been using a piece of code that was published by TelephoneBill here
to get me going.https://forum.pjrc.com/threads/29421-Teensy3-1-and-Flextimer(s-)?p=81068&viewfull=1#post81068
At first it seemed all well behaved just as advertised,
and then after a few reboots the serial console started playing up
ie not printing messages properly,if at all.
So after all sorts of searching around, adding serial flushes etc
and thinking it might be some kind of interference between the FTM timer and USB
I discovered I can reproduce a similar effect with a slightly modified Blink Sketch
see below
I am using MacBookPro OSX el Capitan
Arduino 1.6.9 teensy loader 1.29 teensy 3.2
( have just tried 1.613 and teensyduino 1.32, no difference)
Can anyone help explain why this kind of thing is happening
judging by the correspondence on the forum, there seem to be quite few issues of this nature,
but no discussion that I can find there quite relates to the problems I seem to be experiencing
Code:
/*
Blink_with_Println()
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
// Pin 13 has an LED connected on most Arduino boards.
// Pin 11 has the LED on Teensy 2.0
// Pin 6 has the LED on Teensy++ 2.0
// Pin 13 has the LED on Teensy 3.0
// give it a name:
int led = 13;
// the setup routine runs once when you press reset:
void setup() {
Serial.begin(115200);
while (!Serial);
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
Serial.println("Blink on");
delay(1000); // wait for a second
digitalWrite(led, LOW);
Serial.println("Blink off");
// turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
which should write to the serial console once every sec
I get occasional writes sometime a whole serial.println() message,
sometimes only partial
and seemingly at more or less random intervals
here is an example
If I turn everything off and restart, I can usually get it to behave for a while,
but once getting into rebooting or recompile and upload these symptoms reappear.
regards
Harry Harrison