tests: arm: adjust test for relocated rom
Add a memory barrier to make sure write to NVIC is completed before continuing with the test fails in scenarios where CONFIG_ROMSTART_RELOCATION_ROM is enabled for boards like MPS3 Corstone310 and k_sem_take is called before the isr's are called. Signed-off-by: Sudan Landge <sudan.landge@arm.com>
This commit is contained in:
parent
5f91f17e68
commit
a1e3083def
1 changed files with 9 additions and 0 deletions
|
@ -119,6 +119,15 @@ ZTEST(vector_table, test_arm_irq_vector_table)
|
|||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* It is recommended to have a DSB followed by ISB while
|
||||
* enabling interrupts using NVIC. Also without this, the
|
||||
* test fails in scenarios where CONFIG_ROMSTART_RELOCATION_ROM is
|
||||
* enabled e.g. MPS3 Corstone310.
|
||||
*/
|
||||
__DSB(); /* Ensure write to NVIC completes before continuing */
|
||||
__ISB(); /* Ensure that IRQ is executed */
|
||||
|
||||
zassert_false((k_sem_take(&sem[0], K_NO_WAIT) || k_sem_take(&sem[1], K_NO_WAIT) ||
|
||||
k_sem_take(&sem[2], K_NO_WAIT)),
|
||||
NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue