Skip to content

OTA functionality hangs on Pico RP2040 when using FreeRTOS #275

@Tarnak-public

Description

@Tarnak-public

[UPDATE]
When FreeRTOS is enabled on Arduino RP2040 like:

#include "pico/stdlib.h"
#include "FreeRTOS.h"
#include "task.h"

Any operation which calls rp2040.idleOtherCore() hangs board:

  noInterrupts();
  rp2040.idleOtherCore();
  flash_range_erase(maxSketchSize, sectorAlignedLength);
  rp2040.resumeOtherCore();
  interrupts();

Temporary fix is to remove all **rp2040.idleOtherCore() / rp2040.resumeOtherCore() ** calls. Hard to say it's 100% bulletproof.
During further tests removing idleOtherCore() seems to only partially helps.
After I've commented noInterrupts()/interrupts() calls it makes it more stable, did ~20th updates, and it worked.

Information about issue with these calls I've found in:
earlephilhower/arduino-pico#1561

Environment:
VSCode + PioArduino with earlephilhower core 1.7-1.8

platform = https://github.com/maxgerhardt/platform-raspberrypi.git
board_build.core = earlephilhower
board_build.filesystem_size = 1.0m
board = pico

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions