I have uploaded the following sketch Code: void setup() { Serial.begin(9600); pinMode(13, OUTPUT); } void loop() { Serial.println("LED ON"); digitalWrite(13, HIGH); delay(1000); Serial.println("LED OFF"); digitalWrite(13, LOW); delay(1000); } I noticed that the LED was blinking really slow (turning on for 4 seconds, turning off for 4 seconds). As soon as I start monitoring /dev/ttyMMC the LED startss blinking normally (turning on for 1 second, turning off for 1 second) Code: sudo cat /dev/ttyMCC LED ON LED OFF LED ON LED OFF LED ON LED OFF LED ON LED OFF As soon as I stop the cat, it again goes very slowly..... Any idea why it's behaving like this ?
I noticed this myself. Apparently (see this post) the M4 implements the Arduino emulation on top of Freescale MQX real time OS API calls. I wouldn't pretend to know for sure but I would guess the implementation of Serial using the MQX API is responsible for this. I hope someone more knowledgeable could help us understand if there is a way to avoid this.
Dear @ddewaele, we've seen you modified the kernel. https://github.com/UDOOboard/linux_kernel/issues/14 We only support our kernel, even if we share images made by the community.
I'll check with the default image that can be downloaded from the site and will get back to you. Don't think it should have influenced the sketch behavior but I'll double check.