Closed
Description
Hello everyone,
The example provided in this section 'Programming Both Cores With Just One Sketch' does not work on the M4 when the core version is 4.0.10 or 4.1.1. However, it works well with previous versions ≤ 4.0.8.
Sketch:
int myLED;
void setup() {
randomSeed(analogRead(0));
#ifdef CORE_CM7
bootM4();
myLED = LEDB; // built-in blue LED
#endif
#ifdef CORE_CM4
myLED = LEDG; // built-in greeen LED
#endif
pinMode(myLED, OUTPUT);
}
void loop() {
digitalWrite(myLED, LOW); // turn the LED on
delay(200);
digitalWrite(myLED, HIGH); // turn the LED off
delay(rand() % 2000 + 1000); // wait for a random amount of time between 1 and 3 seconds.
}
After uploading the sketch to the M7, the LEDB blinks perfectly.
Then, after uploading the sketch to the M4, the LEDG does not respond. However, if the classic Blink sketch is uploaded to the M4 it works. So the M4 boots properly via the bootM4();
but it doesn't seem to respond to:
#ifdef CORE_CM4
myLED = LEDG;
#endif
Metadata
Metadata
Assignees
Labels
No labels