Skip to content

Commit

Permalink
tests: arm: zero latency irqs: fix the derivation of free NVIC line
Browse files Browse the repository at this point in the history
The commit fixes the way we determine an available
NVIC IRQ line to perform the zero-latency IRQ test.
The test can now run properly on SOCs that do not
have a continous set of implemented NVIC IRQ lines.

Signed-off-by: Ioannis Glaropoulos <[email protected]>
  • Loading branch information
ioannisg committed Aug 25, 2019
1 parent 79b49a7 commit 3486709
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions tests/arch/arm/arm_zero_latency_irqs/src/arm_zero_latency_irqs.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,19 @@ void test_arm_zero_latency_irqs(void)
* Interrupts configured statically with IRQ_CONNECT(.)
* are automatically enabled. NVIC_GetEnableIRQ()
* returning false, here, implies that the IRQ line is
* not enabled, thus, currently not in use by Zephyr.
* either not implemented or it is not enabled, thus,
* currently not in use by Zephyr.
*/
break;

/* Set the NVIC line to pending. */
NVIC_SetPendingIRQ(i);

if (NVIC_GetPendingIRQ(i)) {
/* If the NVIC line is pending, it is
* guaranteed that it is implemented.
*/
break;
}
}
}

Expand Down

0 comments on commit 3486709

Please sign in to comment.