armc_boot: Support cortex-m7 chips

Signed-off-by: Konstantin Vogel <konstantin.vogel@gmx.net>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
D4SK 2021-05-30 01:15:49 +01:00 committed by Kevin O'Connor
parent a05650f33c
commit 28b3c9e88c
1 changed files with 5 additions and 0 deletions

View File

@ -46,8 +46,13 @@ reset_handler_stage_two(void)
SCB->ICSR = SCB_ICSR_PENDSVCLR_Msk | SCB_ICSR_PENDSTCLR_Msk;
// Reset all system interrupt priorities
#if __CORTEX_M >= 7
for (i = 0; i < ARRAY_SIZE(SCB->SHPR); i++)
SCB->SHPR[i] = 0;
#else
for (i = 0; i < ARRAY_SIZE(SCB->SHP); i++)
SCB->SHP[i] = 0;
#endif
__DSB();
__ISB();