2017-06-14 06:07:15 -04:00
|
|
|
#include "unity.h"
|
|
|
|
#include "esp_system.h"
|
|
|
|
#include "freertos/FreeRTOS.h"
|
|
|
|
#include "freertos/task.h"
|
|
|
|
|
|
|
|
|
2017-09-20 05:17:51 -04:00
|
|
|
TEST_CASE("restart from PRO CPU", "[restart][reset=SW_CPU_RESET]")
|
2017-06-14 06:07:15 -04:00
|
|
|
{
|
|
|
|
esp_restart();
|
|
|
|
}
|
|
|
|
|
2017-09-20 05:17:51 -04:00
|
|
|
static void restart_task(void *arg)
|
2017-06-14 06:07:15 -04:00
|
|
|
{
|
|
|
|
esp_restart();
|
|
|
|
}
|
|
|
|
|
2017-11-10 04:53:59 -05:00
|
|
|
#ifndef CONFIG_FREERTOS_UNICORE
|
2017-09-20 05:17:51 -04:00
|
|
|
TEST_CASE("restart from APP CPU", "[restart][reset=SW_CPU_RESET]")
|
2017-06-14 06:07:15 -04:00
|
|
|
{
|
|
|
|
xTaskCreatePinnedToCore(&restart_task, "restart", 2048, NULL, 5, NULL, 1);
|
2017-09-20 05:17:51 -04:00
|
|
|
while (true) {
|
2017-06-14 06:07:15 -04:00
|
|
|
;
|
|
|
|
}
|
|
|
|
}
|
2017-11-10 04:53:59 -05:00
|
|
|
#endif
|