ulp-fsm: fixed potential sleep tests failures

If the ULP sent the wake-up signal before the main CPU went to sleep,
then the test case would get stuck in sleep.

Increased delay before sending the wake-up signal.
This commit is contained in:
Marius Vikhammer 2023-03-22 11:36:20 +08:00
parent c77b5752ef
commit b7fcf1c139

View File

@ -162,7 +162,7 @@ TEST_CASE("ULP FSM light-sleep wakeup test", "[ulp]")
const ulp_insn_t program[] = {
I_MOVI(R1, 1024), // r1 = 1024
M_LABEL(1), // define label 1
I_DELAY(32000), // add a delay (NOP for 32000 cycles)
I_DELAY(64000), // add a delay (NOP for 64000 cycles)
I_SUBI(R1, R1, 1), // r1 = r1 - 1
M_BXZ(3), // branch to label 3 if ALU value is 0. (r1 = 0)
I_RSHI(R3, R1, 5), // r3 = r1 / 32
@ -204,7 +204,7 @@ TEST_CASE("ULP FSM deep-sleep wakeup test", "[ulp][ulp_deep_sleep_wakeup]")
const ulp_insn_t program[] = {
I_MOVI(R1, 1024), // r1 = 1024
M_LABEL(1), // define label 1
I_DELAY(32000), // add a delay (NOP for 32000 cycles)
I_DELAY(64000), // add a delay (NOP for 64000 cycles)
I_SUBI(R1, R1, 1), // r1 = r1 - 1
M_BXZ(3), // branch to label 3 if ALU value is 0. (r1 = 0)
I_RSHI(R3, R1, 5), // r3 = r1 / 32