mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
9353666cc1
This fixes a bug introduced by !848, where APP CPU would not be reset during esp_restart, if esp_restart was called from a task running on APP CPU, and wouldn’t be reset by PRO CPU on startup. This change replaces stalling APP CPU with resetting it. Also adds a non-automated esp_restart tests.
27 lines
417 B
C
27 lines
417 B
C
#include "unity.h"
|
|
#include "esp_system.h"
|
|
#include "freertos/FreeRTOS.h"
|
|
#include "freertos/task.h"
|
|
|
|
|
|
TEST_CASE("restart from PRO CPU", "[restart][ignore]")
|
|
{
|
|
esp_restart();
|
|
}
|
|
|
|
static void restart_task(void* arg)
|
|
{
|
|
esp_restart();
|
|
}
|
|
|
|
TEST_CASE("restart from APP CPU", "[restart][ignore]")
|
|
{
|
|
xTaskCreatePinnedToCore(&restart_task, "restart", 2048, NULL, 5, NULL, 1);
|
|
|
|
while(true) {
|
|
;
|
|
}
|
|
}
|
|
|
|
|