Skip to content

Commit d716c4d

Browse files
mattia-moffadanielinux
authored andcommitted
Fix test-app TZEN
1 parent af8d655 commit d716c4d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

hal/nrf54l.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ static void hal_handle_approtect(void)
382382
#endif
383383
}
384384

385-
#ifdef TZEN
385+
#if defined(TZEN) && TZ_SECURE()
386386
/* Make a single peripheral non-secure */
387387
static void spu_periph_set_ns(uint32_t periph_s_addr)
388388
{
@@ -473,7 +473,7 @@ static void periph_unsecure(void)
473473
spu_periph_set_ns(GPIO_P0_S_BASE);
474474
spu_gpio_pins_set_ns(SPU30_BASE, 0);
475475
}
476-
#endif /* TZEN */
476+
#endif /* defined(TZEN) && TZ_SECURE() */
477477

478478
void hal_init(void)
479479
{
@@ -486,7 +486,7 @@ void hal_init(void)
486486
clock_init();
487487
#endif
488488

489-
#ifdef TZEN
489+
#if defined(TZEN) && TZ_SECURE()
490490
hal_tz_init();
491491
#endif
492492

@@ -500,7 +500,7 @@ void hal_prepare_boot(void)
500500
{
501501
clock_deinit();
502502

503-
#ifdef TZEN
503+
#if defined(TZEN) && TZ_SECURE()
504504
periph_unsecure();
505505
DSB();
506506
ISB();

0 commit comments

Comments
 (0)