# FreeRTOS works on old NANO but not new ones

**URL:** <https://forum.arduino.cc/t/freertos-works-on-old-nano-but-not-new-ones/1442913>\
**Category:** Classic Nano\
**Created:** [May 6, 2026, 3:43pm UTC](https://forum.arduino.cc/t/freertos-works-on-old-nano-but-not-new-ones/1442913 "2026-05-06T15:43:51Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![zardoz991](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/zardoz991/32/1202467_2.png) [@zardoz991](https://forum.arduino.cc/u/zardoz991)\
**Post date:** [May 6, 2026, 3:43pm UTC](https://forum.arduino.cc/t/freertos-works-on-old-nano-but-not-new-ones/1442913/1 "2026-05-06T15:43:51Z")

</div>

I have tried different bootloaders with no luck. FreeRTOS does not work on 5 new Nano boards but it works on one I bought 6+ years ago.  
Any suggestions?

Thanks Kurt

---

<div class="post-metadata">

**Author:** ![camsysca](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/camsysca/32/1015228_2.png) [@camsysca](https://forum.arduino.cc/u/camsysca)\
**Post date:** [May 6, 2026, 4:09pm UTC](https://forum.arduino.cc/t/freertos-works-on-old-nano-but-not-new-ones/1442913/2 "2026-05-06T16:09:09Z")

</div>

Check very carefully - do your new Nanos have the ATMEGA328PB chip? A picture might help us help you.

---

<div class="post-metadata">

**Author:** ![zardoz991](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/zardoz991/32/1202467_2.png) [@zardoz991](https://forum.arduino.cc/u/zardoz991)\
**Post date:** [May 6, 2026, 4:31pm UTC](https://forum.arduino.cc/t/freertos-works-on-old-nano-but-not-new-ones/1442913/3 "2026-05-06T16:31:20Z")

</div>

![1000018988](https://europe1.discourse-cdn.com/arduino/original/4X/9/6/b/96bd9165fce8960a5a933b3ae6326c7d6d33a122.jpeg)

Picture attached

Kurt

---

<div class="post-metadata">

**Author:** ![van\_der\_decken](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/van_der_decken/32/1006976_2.png) [@van\_der\_decken](https://forum.arduino.cc/u/van_der_decken)\
**Post date:** [May 6, 2026, 4:33pm UTC](https://forum.arduino.cc/t/freertos-works-on-old-nano-but-not-new-ones/1442913/4 "2026-05-06T16:33:26Z")

</div>

> [@zardoz991](#):
>
> FreeRTOS does not work on 5 new Nano boards

Does not work, how, exactly?

---

<div class="post-metadata">

**Author:** ![GolamMostafa](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/golammostafa/32/239011_2.png) [@GolamMostafa](https://forum.arduino.cc/u/GolamMostafa)\
**Post date:** [May 6, 2026, 4:56pm UTC](https://forum.arduino.cc/t/freertos-works-on-old-nano-but-not-new-ones/1442913/5 "2026-05-06T16:56:15Z")

</div>

> [@zardoz991](#):
>
> FreeRTOS does not work on 5 new Nano boards

Have you tried simple example from IDE?

Post a sketch to blink two leds concurrently at different rates using `Arduino_FreeRTOS.h` library and your Arduino NANO.

---

<div class="post-metadata">

**Author:** ![zardoz991](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/zardoz991/32/1202467_2.png) [@zardoz991](https://forum.arduino.cc/u/zardoz991)\
**Post date:** [May 6, 2026, 5:10pm UTC](https://forum.arduino.cc/t/freertos-works-on-old-nano-but-not-new-ones/1442913/6 "2026-05-06T17:10:25Z")

</div>

I run one of the FreeRTOS examples using ArduinoIDE and nothing happens. The old one works. It also works on the UNO I have.  
Very strange.

#include \<Arduino\_FreeRTOS.h\>

void TaskBlink(void \*pvParameters);  
void TaskSerial(void \*pvParameters);

void setup() {  
xTaskCreate(TaskBlink, "LED Blink", 256, NULL, 2, NULL);  
xTaskCreate(TaskSerial, "Serial Print", 256, NULL, 1, NULL);  
}

void loop() {  
// Not used when FreeRTOS is running  
}

void TaskBlink(void \*pvParameters) {  
pinMode(LED\_BUILTIN, OUTPUT);

while (1) {  
digitalWrite(LED\_BUILTIN, HIGH);  
vTaskDelay(500 / portTICK\_PERIOD\_MS);

```
digitalWrite(LED_BUILTIN, LOW);
vTaskDelay(500 / portTICK_PERIOD_MS);

```

}  
}

void TaskSerial(void \*pvParameters) {  
Serial.begin(9600);  
vTaskDelay(500 / portTICK\_PERIOD\_MS);  
while (1) {  
Serial.println("FreeRTOS");

```
vTaskDelay(700 / portTICK_PERIOD_MS);

```

}  
}

Thanks Kurt

---

<div class="post-metadata">

**Author:** ![van\_der\_decken](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/van_der_decken/32/1006976_2.png) [@van\_der\_decken](https://forum.arduino.cc/u/van_der_decken)\
**Post date:** [May 6, 2026, 5:28pm UTC](https://forum.arduino.cc/t/freertos-works-on-old-nano-but-not-new-ones/1442913/7 "2026-05-06T17:28:32Z")

</div>

It's a whole lot easier reading code when you enclose it in a code block with the `<CODE/>` tool.

```arduino
#include <Arduino_FreeRTOS.h>

void TaskBlink(void *pvParameters);
void TaskSerial(void *pvParameters);

void setup() {
   xTaskCreate(TaskBlink, "LED Blink", 256, NULL, 2, NULL);
   xTaskCreate(TaskSerial, "Serial Print", 256, NULL, 1, NULL);
}

void loop() {
   // Not used when FreeRTOS is running
}

void TaskBlink(void *pvParameters) {
   pinMode(LED_BUILTIN, OUTPUT);

   while( 1 ) {
      digitalWrite(LED_BUILTIN, HIGH);
      vTaskDelay(500 / portTICK_PERIOD_MS);

      digitalWrite(LED_BUILTIN, LOW);
      vTaskDelay(500 / portTICK_PERIOD_MS);
   }
}

void TaskSerial(void *pvParameters) {
   Serial.begin(115200);
   vTaskDelay(500 / portTICK_PERIOD_MS);
   while( 1 ) {
      Serial.println("FreeRTOS");

      vTaskDelay(700 / portTICK_PERIOD_MS);
   }
}

```

All I can say is that it worked for me when I uploaded it on a reasonably new Nano.

---

<div class="post-metadata">

**Author:** ![zardoz991](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/zardoz991/32/1202467_2.png) [@zardoz991](https://forum.arduino.cc/u/zardoz991)\
**Post date:** [May 6, 2026, 5:33pm UTC](https://forum.arduino.cc/t/freertos-works-on-old-nano-but-not-new-ones/1442913/8 "2026-05-06T17:33:52Z")

</div>

Sorry about the code block thing. This is my first time here.

---

<div class="post-metadata">

**Author:** ![sonofcy](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sonofcy/32/1283617_2.png) [@sonofcy](https://forum.arduino.cc/u/sonofcy)\
**Post date:** [May 6, 2026, 6:11pm UTC](https://forum.arduino.cc/t/freertos-works-on-old-nano-but-not-new-ones/1442913/9 "2026-05-06T18:11:22Z")

</div>

Good time to read the pinned post re 'How to get the most from the forum'.

---

<div class="post-metadata">

**Author:** ![GolamMostafa](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/golammostafa/32/239011_2.png) [@GolamMostafa](https://forum.arduino.cc/u/GolamMostafa)\
**Post date:** [May 7, 2026, 7:05am UTC](https://forum.arduino.cc/t/freertos-works-on-old-nano-but-not-new-ones/1442913/11 "2026-05-07T07:05:27Z")

</div>

> [@van\_der\_decken](#):
>
> ```arduino
> void loop() {
> // Not used when FreeRTOS is running
> }
> 
> ```

Why not? If I wish, I can place code in the` loop()` function to blink an external led at DPin-2.

---

<div class="post-metadata">

**Author:** ![Dave\_Lowther](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/dave_lowther/32/1092885_2.png) [@Dave\_Lowther](https://forum.arduino.cc/u/Dave_Lowther)\
**Post date:** [May 7, 2026, 9:12am UTC](https://forum.arduino.cc/t/freertos-works-on-old-nano-but-not-new-ones/1442913/12 "2026-05-07T09:12:44Z")

</div>

loop() is hooked to the idle task. So code in loop() will run whenever there is no other code that's ready to run.

---

<div class="post-metadata">

**Author:** ![6v6gt](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/6v6gt/32/225488_2.png) [@6v6gt](https://forum.arduino.cc/u/6v6gt)\
**Post date:** [May 7, 2026, 9:55am UTC](https://forum.arduino.cc/t/freertos-works-on-old-nano-but-not-new-ones/1442913/13 "2026-05-07T09:55:41Z")

</div>

Do simple sketches work on the "bad" Nano ? The classis Blink sketch for example but maybe change the timings to ensure that it is really a newly installed sketch that is being used.

Have you enabled verbose output during upload via the IDE preferences options ?

> [@zardoz991](#):
>
> I have tried different bootloaders with no luck.

Do you mean that you have tried both the "old" and the "new" bootloader from the IDE selection menu or do you mean that you have installed a different bootloader on the Nano ? If it is the latter then say how you did this because it is possible to either have fuse setting which do not match the bootloader or it is also possible to erase the freshly installed bootloader if a programmer is installed on the ICSP header when the first test sketch is uploaded.

---

<div class="post-metadata">

**Author:** ![zardoz991](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/zardoz991/32/1202467_2.png) [@zardoz991](https://forum.arduino.cc/u/zardoz991)\
**Post date:** [May 7, 2026, 2:35pm UTC](https://forum.arduino.cc/t/freertos-works-on-old-nano-but-not-new-ones/1442913/14 "2026-05-07T14:35:55Z")

</div>

Yes simple sketches work.  
I tried loading an old bootloader from the IDE (using an UNO) but it didn't make a difference.

---

<div class="post-metadata">

**Author:** ![Dave\_Lowther](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/dave_lowther/32/1092885_2.png) [@Dave\_Lowther](https://forum.arduino.cc/u/Dave_Lowther)\
**Post date:** [May 7, 2026, 3:00pm UTC](https://forum.arduino.cc/t/freertos-works-on-old-nano-but-not-new-ones/1442913/15 "2026-05-07T15:00:25Z")

</div>

> [@6v6gt](#):
>
> Do simple sketches work on the "bad" Nano ? The classis Blink sketch for example

> [@zardoz991](#):
>
> Yes simple sketches work.

Can you confirm that the blink example works?  
If it does, then you know it's not a problem with the built in LED.  
Perhaps add Serial.begin(115200) and some Serial.println()s in setup() to see whether the code runs at all.

---

<div class="post-metadata">

**Author:** ![zardoz991](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/zardoz991/32/1202467_2.png) [@zardoz991](https://forum.arduino.cc/u/zardoz991)\
**Post date:** [May 7, 2026, 6:59pm UTC](https://forum.arduino.cc/t/freertos-works-on-old-nano-but-not-new-ones/1442913/16 "2026-05-07T18:59:27Z")

</div>

I tried this. Nothing prints.  
After loading with "9716 bytes of flash verified" the only thing that happens is the onboard LED flashes 2 seconds on 2 seconds off. I tried changing the delays and the blinking is the same.  
Now I am getting FLASH errors. I may be wrong but I think these chips are counterfeit.  
Kurt

```arduino
#include <Arduino_FreeRTOS.h>

//void TaskBlink(void *pvParameters);
//void TaskSerial(void *pvParameters);

void setup() {
  Serial.begin(9600);
  pinMode(LED_BUILTIN, OUTPUT);
  delay(1000);
  for (int i = 0; i <= 30; i++) {
    Serial.print("Test before-");
    Serial.println(i);
    delay(500);
  }
  //xTaskCreate(TaskBlink, "LED Blink",128, NULL, 1, NULL);
  //xTaskCreate(TaskSerial, "Serial Print", 128, NULL, 1, NULL);
}

void loop() {
  // Not used when FreeRTOS is running
}

void TaskBlink(void *pvParameters) {
  while (1) {
    digitalWrite(LED_BUILTIN, HIGH);
    vTaskDelay(800 / portTICK_PERIOD_MS); 
    digitalWrite(LED_BUILTIN, LOW);
    vTaskDelay(100 / portTICK_PERIOD_MS);
    
  }
}

void TaskSerial(void *pvParameters) {

  while(1){
    Serial.println("Test in task");
    vTaskDelay(100 / portTICK_PERIOD_MS);
    
   }
}

```

---

<div class="post-metadata">

**Author:** ![zardoz991](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/zardoz991/32/1202467_2.png) [@zardoz991](https://forum.arduino.cc/u/zardoz991)\
**Post date:** [May 7, 2026, 7:02pm UTC](https://forum.arduino.cc/t/freertos-works-on-old-nano-but-not-new-ones/1442913/17 "2026-05-07T19:02:00Z")

</div>

I forgot to says yes simple sketches work all the time, Blink etc

---

<div class="post-metadata">

**Author:** ![6v6gt](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/6v6gt/32/225488_2.png) [@6v6gt](https://forum.arduino.cc/u/6v6gt)\
**Post date:** [May 7, 2026, 7:17pm UTC](https://forum.arduino.cc/t/freertos-works-on-old-nano-but-not-new-ones/1442913/18 "2026-05-07T19:17:45Z")

</div>

> [@zardoz991](#):
>
> Now I am getting FLASH errors.

If you get such errors, then post these. Ensure that you show us the verbose output.

> [@zardoz991](#):
>
> The old one works. It also works on the UNO I have.

You can "convert" a Nano to a Uno simply by declaring the target Nano as a Uno when installing the bootloader. You then free an extra 1.5k of flash memory. With all future operations on such a converted Nano, you declare it to the IDE as a Uno.

---

<div class="post-metadata">

**Author:** ![zardoz991](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/zardoz991/32/1202467_2.png) [@zardoz991](https://forum.arduino.cc/u/zardoz991)\
**Post date:** [May 7, 2026, 7:18pm UTC](https://forum.arduino.cc/t/freertos-works-on-old-nano-but-not-new-ones/1442913/19 "2026-05-07T19:18:45Z")

</div>

This is interesting  
If I include "Arduino\_FreeRTOS.h" this doesn't run at all. If I comment it out it runs fine.  
Note: with include out there are no Flash errors , in I get them sometimes.

```arduino
//#include <Arduino_FreeRTOS.h>

void setup() {
  Serial.begin(9600);
  pinMode(LED_BUILTIN, OUTPUT);
  delay(1000);
  for (int i = 0; i <= 10; i++) {
    Serial.print("Test before-");
    Serial.println(i);
    delay(500);
  } 
}
void loop() {
   for (int i = 0; i <= 30; i++) {
    Serial.print("Test in loop-");
    Serial.println(i);
    delay(500);  
   }  
}
 

```

---

<div class="post-metadata">

**Author:** ![van\_der\_decken](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/van_der_decken/32/1006976_2.png) [@van\_der\_decken](https://forum.arduino.cc/u/van_der_decken)\
**Post date:** [May 7, 2026, 7:25pm UTC](https://forum.arduino.cc/t/freertos-works-on-old-nano-but-not-new-ones/1442913/20 "2026-05-07T19:25:40Z")

</div>

> [@zardoz991](#):
>
> I think these chips are counterfeit.

That could be, but it might not be the show stopper. I looked through my Nanos and found one where the G in MEGA matched yours, with both a horizontal and vertical line in the lower right, rather than just the horizontal line that was on most of the rest. Running a [counterfeit 328P test](https://www.microfarad.de/blog/counterfeit-atmega328p/), it indicated that that one was indeed a "free enterprise" one. So I loaded your FreeRTOS test into that one... and it still worked.

---

<div class="post-metadata">

**Author:** ![zardoz991](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/zardoz991/32/1202467_2.png) [@zardoz991](https://forum.arduino.cc/u/zardoz991)\
**Post date:** [May 7, 2026, 7:36pm UTC](https://forum.arduino.cc/t/freertos-works-on-old-nano-but-not-new-ones/1442913/21 "2026-05-07T19:36:15Z")

</div>

RE counterfeit test , interesting  
Here is a Flash failure dump

```arduino
vrdude version 8.0-arduino.1
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS

System wide configuration file is C:\Users\Kurt\AppData\Local\Arduino15\packages\arduino\tools\avrdude\8.0.0-arduino1\etc\avrdude.conf

Using port : COM5
Using programmer : arduino
Setting baud rate : 115200
AVR part : ATmega328P
Programming modes : SPM, ISP, HVPP, debugWIRE
Programmer type : Arduino
Description : Arduino bootloader using STK500 v1 protocol
HW Version : 3
FW Version : 4.4

AVR device initialized and ready to accept instructions
Device signature = 1E 95 0F (ATmega328P, ATA6614Q, LGT8F328P)
Reading 9914 bytes for flash from input file Simple_print.ino.hex
in 1 section [0, 0x26b9]: 78 pages and 70 pad bytes
Writing 9914 bytes to flash
Writing | ################################################## | 100% 1.44s
Reading | ################################################## | 100% 1.19s
Warning: flash verification mismatch
  device 0xc0 != input 0xa6 at addr 0x17ae (error)
  device 0xd7 != input 0x99 at addr 0x262e (error)
Error: flash verification mismatch

Avrdude done. Thank you.
Failed uploading: uploading error: exit status 1

```

[Next page](https://forum.arduino.cc/t/freertos-works-on-old-nano-but-not-new-ones/1442913.md?page=2)
