diff options
Diffstat (limited to 'os/hal')
-rw-r--r-- | os/hal/ports/SAMA/SAMA5D2x/hal_lld.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/os/hal/ports/SAMA/SAMA5D2x/hal_lld.c b/os/hal/ports/SAMA/SAMA5D2x/hal_lld.c index e1a23c14b..f598bf856 100644 --- a/os/hal/ports/SAMA/SAMA5D2x/hal_lld.c +++ b/os/hal/ports/SAMA/SAMA5D2x/hal_lld.c @@ -60,6 +60,10 @@ */
void hal_lld_init(void) {
+#if (SAMA_HAL_IS_SECURE == TRUE) /* The Matrix is PAS and PMC is always configured secure */
+ /* Disabling PMC write protection. */
+ pmcDisableWP();
+
/* Configures peripherals as not-secure */
MATRIX0->MATRIX_SPSELR[0] = 0xFFFFFFFF;
MATRIX0->MATRIX_SPSELR[1] = 0xFFFFFFFF;
@@ -71,10 +75,6 @@ void hal_lld_init(void) { /* Configures PMC and RTC as secure */
mtxConfigPeriphSecurity(MATRIX1, ID_SYSC, SECURE_PER);
-#if (SAMA_HAL_IS_SECURE == TRUE) /* The Matrix is PAS and PMC is always configured secure */
- /* Disabling PMC write protection. */
- pmcDisableWP();
-
/* Enabling matrix clock */
pmcEnableH32MX();
pmcEnableH64MX();
|