ci(ulp_test): fix fake sleep of the maincore in ulp pytest cases

This commit is contained in:
wuzhenghui 2023-10-30 11:17:12 +08:00
parent 61bb3fb67f
commit 4e73c23e98
2 changed files with 4 additions and 1 deletions

View File

@ -217,7 +217,7 @@ TEST_CASE("ULP-RISC-V can be reloaded with a good fimware after a crash", "[ulp]
/* Verify that main CPU wakes up by a COCPU trap signal trigger */
esp_sleep_wakeup_cause_t cause = esp_sleep_get_wakeup_cause();
TEST_ASSERT(cause != ESP_SLEEP_WAKEUP_COCPU);
TEST_ASSERT(cause == ESP_SLEEP_WAKEUP_COCPU_TRAP_TRIG);
printf("Resetting the ULP\n");
ulp_riscv_reset();

View File

@ -6,9 +6,12 @@
#include <stdio.h>
#include <stdint.h>
#include "ulp_riscv_utils.h"
int main (void)
{
// Wait for the main core in the test case to enter lightsleep
ulp_riscv_delay_cycles(100 * ULP_RISCV_CYCLES_PER_MS);
/* Make sure ULP core crashes by doing a NULL pointer access */
uint32_t *null_ptr = NULL;
*null_ptr = 1;